]> git.proxmox.com Git - mirror_zfs.git/commit - cmd/zpool/zpool_main.c
Rescan enclosure sysfs path on import
authorTony Hutter <hutter2@llnl.gov>
Mon, 4 Oct 2021 19:32:16 +0000 (12:32 -0700)
committerGitHub <noreply@github.com>
Mon, 4 Oct 2021 19:32:16 +0000 (12:32 -0700)
commit2a8430a260595a8f01f34bb695e455517cc0ae11
tree4452f11043180bd29b474e3adf4fbc3c1cc4d02b
parentaad91df0752580e3e67b72f3e6dc391da69c830f
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