diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/vdev.c | 9 | ||||
-rw-r--r-- | module/zfs/vdev_label.c | 4 | ||||
-rw-r--r-- | module/zfs/zfs_fm.c | 6 |
3 files changed, 19 insertions, 0 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index f7e91430f..8a4d48a1d 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -488,6 +488,11 @@ vdev_alloc(spa_t *spa, vdev_t **vdp, nvlist_t *nv, vdev_t *parent, uint_t id, if (nvlist_lookup_string(nv, ZPOOL_CONFIG_PHYS_PATH, &vd->vdev_physpath) == 0) vd->vdev_physpath = spa_strdup(vd->vdev_physpath); + + if (nvlist_lookup_string(nv, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH, + &vd->vdev_enc_sysfs_path) == 0) + vd->vdev_enc_sysfs_path = spa_strdup(vd->vdev_enc_sysfs_path); + if (nvlist_lookup_string(nv, ZPOOL_CONFIG_FRU, &vd->vdev_fru) == 0) vd->vdev_fru = spa_strdup(vd->vdev_fru); @@ -673,6 +678,10 @@ vdev_free(vdev_t *vd) spa_strfree(vd->vdev_devid); if (vd->vdev_physpath) spa_strfree(vd->vdev_physpath); + + if (vd->vdev_enc_sysfs_path) + spa_strfree(vd->vdev_enc_sysfs_path); + if (vd->vdev_fru) spa_strfree(vd->vdev_fru); diff --git a/module/zfs/vdev_label.c b/module/zfs/vdev_label.c index 95bf4392f..4edbfa41e 100644 --- a/module/zfs/vdev_label.c +++ b/module/zfs/vdev_label.c @@ -375,6 +375,10 @@ vdev_config_generate(spa_t *spa, vdev_t *vd, boolean_t getstats, fnvlist_add_string(nv, ZPOOL_CONFIG_PHYS_PATH, vd->vdev_physpath); + if (vd->vdev_enc_sysfs_path != NULL) + fnvlist_add_string(nv, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH, + vd->vdev_enc_sysfs_path); + if (vd->vdev_fru != NULL) fnvlist_add_string(nv, ZPOOL_CONFIG_FRU, vd->vdev_fru); diff --git a/module/zfs/zfs_fm.c b/module/zfs/zfs_fm.c index 15dbdc2a0..0f8ac28c1 100644 --- a/module/zfs/zfs_fm.c +++ b/module/zfs/zfs_fm.c @@ -986,6 +986,12 @@ zfs_post_state_change(spa_t *spa, vdev_t *vd, uint64_t laststate) FM_EREPORT_PAYLOAD_ZFS_VDEV_PHYSPATH, vd->vdev_physpath); } + if (vd->vdev_enc_sysfs_path) { + (void) nvlist_add_string(aux, + FM_EREPORT_PAYLOAD_ZFS_VDEV_ENC_SYSFS_PATH, + vd->vdev_enc_sysfs_path); + } + (void) nvlist_add_uint64(aux, FM_EREPORT_PAYLOAD_ZFS_VDEV_LASTSTATE, laststate); } |