aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zpool/zpool_main.c
diff options
context:
space:
mode:
authorAkash B <[email protected]>2022-02-04 03:59:29 +0530
committerGitHub <[email protected]>2022-02-03 14:29:29 -0800
commit7b468ed2d81ec7fe68358af9467b8704420fd6b9 (patch)
tree16a8620f2db0c20e874896f7da0eadd41134bf20 /cmd/zpool/zpool_main.c
parentf3b08dfd7f32ccb466e0a55a446948d6c07e497a (diff)
Add enumerated vdev names to 'zpool iostat -v' and 'zpool list -v'
This commit adds enumerated names to disambiguate between the different vdevs. Previously only 'zpool status' showed enumerated vdev names, now 'zpool list -v' and 'zpool iostat -v' also shows the enumerated vdev names. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Dipak Ghosh <[email protected]> Signed-off-by: Akash B <[email protected]> Closes #12510 Closes #13031
Diffstat (limited to 'cmd/zpool/zpool_main.c')
-rw-r--r--cmd/zpool/zpool_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index 2c608ee4d..5d8d18255 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -4846,7 +4846,7 @@ children:
continue;
vname = zpool_vdev_name(g_zfs, zhp, newchild[c],
- cb->cb_vdevs.cb_name_flags);
+ cb->cb_vdevs.cb_name_flags | VDEV_NAME_TYPE_ID);
ret += print_vdev_stats(zhp, vname, oldnv ? oldchild[c] : NULL,
newchild[c], cb, depth + 2);
free(vname);
@@ -4890,7 +4890,7 @@ children:
}
vname = zpool_vdev_name(g_zfs, zhp, newchild[c],
- cb->cb_vdevs.cb_name_flags);
+ cb->cb_vdevs.cb_name_flags | VDEV_NAME_TYPE_ID);
ret += print_vdev_stats(zhp, vname, oldnv ?
oldchild[c] : NULL, newchild[c], cb, depth + 2);
free(vname);
@@ -6212,7 +6212,7 @@ print_list_stats(zpool_handle_t *zhp, const char *name, nvlist_t *nv,
continue;
vname = zpool_vdev_name(g_zfs, zhp, child[c],
- cb->cb_name_flags);
+ cb->cb_name_flags | VDEV_NAME_TYPE_ID);
print_list_stats(zhp, vname, child[c], cb, depth + 2, B_FALSE);
free(vname);
}
@@ -6246,7 +6246,7 @@ print_list_stats(zpool_handle_t *zhp, const char *name, nvlist_t *nv,
printed = B_TRUE;
}
vname = zpool_vdev_name(g_zfs, zhp, child[c],
- cb->cb_name_flags);
+ cb->cb_name_flags | VDEV_NAME_TYPE_ID);
print_list_stats(zhp, vname, child[c], cb, depth + 2,
B_FALSE);
free(vname);