]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Rescan enclosure sysfs path on import
authorTony Hutter <hutter2@llnl.gov>
Mon, 4 Oct 2021 19:32:16 +0000 (12:32 -0700)
committerTony Hutter <hutter2@llnl.gov>
Tue, 2 Nov 2021 23:31:05 +0000 (16:31 -0700)
commit586b5d366edfaaed28a9b39b89e20350226edf97
treef8cc17b21eb20bfd3af3ff47c3ca59c397c4ae29
parent27d9c6ae2be9368524c9dff800071a8eac5bea09
Rescan enclosure sysfs path on import

When you create a pool, zfs writes vd->vdev_enc_sysfs_path with the
enclosure sysfs path to the fault LEDs, like:

    vdev_enc_sysfs_path = /sys/class/enclosure/0:0:1:0/SLOT8

However, this enclosure path doesn't get updated on successive imports
even if enclosure path to the disk changes.  This patch fixes the issue.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #11950
Closes #12095
cmd/zpool/Makefile.am
cmd/zpool/zpool_iter.c
cmd/zpool/zpool_main.c
cmd/zpool/zpool_util.h
include/libzutil.h
lib/libzutil/os/freebsd/zutil_import_os.c
lib/libzutil/os/linux/zutil_import_os.c
lib/libzutil/zutil_import.c
module/zfs/vdev.c