summaryrefslogtreecommitdiff
path: root/usr/src/boot/lib/libstand/zfs/zfsimpl.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/boot/lib/libstand/zfs/zfsimpl.c')
-rw-r--r--usr/src/boot/lib/libstand/zfs/zfsimpl.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/usr/src/boot/lib/libstand/zfs/zfsimpl.c b/usr/src/boot/lib/libstand/zfs/zfsimpl.c
index fba9f1fc59..7d0d79b922 100644
--- a/usr/src/boot/lib/libstand/zfs/zfsimpl.c
+++ b/usr/src/boot/lib/libstand/zfs/zfsimpl.c
@@ -1106,6 +1106,7 @@ vdev_init_from_nvlist(const unsigned char *nvlist, vdev_t *pvdev,
const unsigned char *kids;
int nkids, i, is_new;
uint64_t is_offline, is_faulted, is_degraded, is_removed, isnt_present;
+ uint64_t is_log;
if (nvlist_find(nvlist, ZPOOL_CONFIG_GUID, DATA_TYPE_UINT64,
NULL, &guid) ||
@@ -1129,6 +1130,7 @@ vdev_init_from_nvlist(const unsigned char *nvlist, vdev_t *pvdev,
}
is_offline = is_removed = is_faulted = is_degraded = isnt_present = 0;
+ is_log = 0;
nvlist_find(nvlist, ZPOOL_CONFIG_OFFLINE, DATA_TYPE_UINT64, NULL,
&is_offline);
@@ -1140,6 +1142,8 @@ vdev_init_from_nvlist(const unsigned char *nvlist, vdev_t *pvdev,
&is_degraded);
nvlist_find(nvlist, ZPOOL_CONFIG_NOT_PRESENT, DATA_TYPE_UINT64, NULL,
&isnt_present);
+ nvlist_find(nvlist, ZPOOL_CONFIG_IS_LOG, DATA_TYPE_UINT64, NULL,
+ &is_log);
vdev = vdev_find(guid);
if (!vdev) {
@@ -1226,6 +1230,7 @@ vdev_init_from_nvlist(const unsigned char *nvlist, vdev_t *pvdev,
return (ENOMEM);
vdev->v_name = name;
}
+ vdev->v_islog = is_log == 1;
} else {
is_new = 0;
}
@@ -1429,6 +1434,12 @@ vdev_status(vdev_t *vdev, int indent)
{
vdev_t *kid;
int ret;
+
+ if (vdev->v_islog) {
+ (void)pager_output(" logs\n");
+ indent++;
+ }
+
ret = print_state(indent, vdev->v_name, vdev->v_state);
if (ret != 0)
return (ret);
@@ -1759,12 +1770,6 @@ vdev_probe(vdev_phys_read_t *phys_read, void *read_priv, spa_t **spap)
return (EIO);
}
- if (nvlist_find(nvlist, ZPOOL_CONFIG_IS_LOG, DATA_TYPE_UINT64,
- NULL, &val) == 0 && val != 0) {
- free(nvlist);
- return (EIO);
- }
-
/*
* Create the pool if this is the first time we've seen it.
*/
@@ -1839,6 +1844,9 @@ vdev_probe(vdev_phys_read_t *phys_read, void *read_priv, spa_t **spap)
return (EIO);
}
+ if (vdev->v_islog)
+ spa->spa_with_log = vdev->v_islog;
+
/* Record boot vdev for spa. */
if (is_newer == 1)
spa->spa_boot_vdev = vdev;