mirror_zfs/cmd/zed
Ameer Hamza 0c928f7a37 ZED: Fix device type detection and pool iteration logic
During hotplug REMOVED events, devid matching fails for partition-based
spares because devid information is not stored in pool config for
partitioned devices. However, when devid is populated by the hotplug
event, the original code skipped the search logic entirely, skipping
vdev_guid matching and resulting in wrong device type detection that
caused spares to be incorrectly identified as l2arc devices.
Additionally, fix zfs_agent_iter_pool() to use the return value from
zfs_agent_iter_vdev() instead of relying on search parameters, which
was previously ignored. Also add pool_guid optimization to enable
targeted pool searching when pool_guid is available.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #17545
2025-08-05 12:32:28 -04:00
..
agents ZED: Fix device type detection and pool iteration logic 2025-08-05 12:32:28 -04:00
zed.d Fixed zfs_notify_email for programs like sendmail 2025-04-16 09:59:45 -07:00
.gitignore Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
Makefile.am Replace EXTRA_DIST with dist_noinst_DATA 2022-05-26 09:24:50 -07:00
zed_conf.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_conf.h SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_disk_event.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_disk_event.h SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_event.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_event.h SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_exec.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_exec.h SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_file.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_file.h SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_log.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_log.h SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_strings.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed_strings.h SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zed.h SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00