]> git.proxmox.com Git - mirror_zfs.git/commit
zed: misc vdev_enc_sysfs_path fixes
authorTony Hutter <hutter2@llnl.gov>
Tue, 7 Nov 2023 17:09:24 +0000 (09:09 -0800)
committerTony Hutter <hutter2@llnl.gov>
Mon, 29 Jan 2024 23:11:56 +0000 (15:11 -0800)
commit59112ca27d94edd793dbfda6ed5d2fc7a97dddaa
treeec47da59ecc7d94575756e98c0521486299d8a24
parent992d8871ebe172ab8da6e08ac7c31344267f6cdd
zed: misc vdev_enc_sysfs_path fixes

There have been rare cases where the VDEV_ENC_SYSFS_PATH value that zed
gets passed is stale.  To mitigate this, dynamically check the sysfs
path at the time of zed event processing, and use the dynamic value if
possible.  Note that there will be other times when we can not
dynamically detect the sysfs path (like if a disk disappears) and have
to rely on the old value for things like turning on the fault LED.  That
is to say, we can't just blindly use the dynamic path in every case.

Also:
- Add enclosure sysfs entry when running 'zpool add'
- Fix 'slot' and 'enc' zpool.d scripts for nvme

Reviewed-by: Don Brady <dev.fs.zfs@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #15462
cmd/zed/agents/zfs_mod.c
cmd/zed/zed_event.c
cmd/zpool/zpool.d/ses
cmd/zpool/zpool_vdev.c
include/libzutil.h
lib/libzfs/libzfs.abi
lib/libzutil/os/freebsd/zutil_import_os.c
lib/libzutil/os/linux/zutil_import_os.c