mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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
This commit is contained in:
@@ -159,6 +159,16 @@ void color_start(char *color);
|
||||
void color_end(void);
|
||||
int printf_color(char *color, char *format, ...);
|
||||
|
||||
/*
|
||||
* These functions are used by the ZFS libraries and cmd/zpool code, but are
|
||||
* not exported in the ABI.
|
||||
*/
|
||||
typedef int (*pool_vdev_iter_f)(void *, nvlist_t *, void *);
|
||||
int for_each_vdev_cb(void *zhp, nvlist_t *nv, pool_vdev_iter_f func,
|
||||
void *data);
|
||||
int for_each_vdev_in_nvlist(nvlist_t *nvroot, pool_vdev_iter_f func,
|
||||
void *data);
|
||||
void update_vdevs_config_dev_sysfs_path(nvlist_t *config);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user