]> granicus.if.org Git - zfs/commit
Clear enclosure sysfs path from VDEV label when sysfs path isn't present
authorTony Hutter <hutter2@llnl.gov>
Fri, 10 Feb 2017 23:18:31 +0000 (15:18 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 10 Feb 2017 23:18:31 +0000 (15:18 -0800)
commit65a736bc0df16561bac14bee6bf9a6752cf8bc39
tree38ecdf8551d9186bce11bbbb59d68fe5fadbca73
parent449705dbef3008f1cf69ea59276bd07720e4beb2
Clear enclosure sysfs path from VDEV label when sysfs path isn't present

This clears vdev_enc_sysfs_path from the label if the VDEV's
/sys/class/block/<dev>/device/enclosure_device path isn't present.

This is important in the case where a disk that is labeled with
vdev_enc_sysfs_path is pulled out and put into another enclosure.
In that case, it's possible that the old sysfs path would be used to
turn on the fault LED for the disk's old slot postion, assuming the
new slot didn't have a LED sysfs entry.

Reviewed-by: Don Brady <don.brady@intel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #5524
Closes #5773
lib/libzfs/libzfs_import.c