diff options
author | Akash B <[email protected]> | 2022-02-04 03:59:29 +0530 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2022-02-16 17:58:55 -0800 |
commit | 9221ff1888c9d8b80ffd9c45b44231ad19c0e9fb (patch) | |
tree | c1ada1b0d5a60968453afa8269a646b2e37e5d33 /cmd | |
parent | 72a82f312f9fd0abd5b15f1d847e448a56353ec7 (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')
-rw-r--r-- | cmd/zpool/zpool_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 9cf0163ab..b93a6196b 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -4825,7 +4825,7 @@ children: continue; vname = zpool_vdev_name(g_zfs, zhp, newchild[c], - cb->cb_name_flags); + cb->cb_name_flags | VDEV_NAME_TYPE_ID); ret += print_vdev_stats(zhp, vname, oldnv ? oldchild[c] : NULL, newchild[c], cb, depth + 2); free(vname); @@ -4868,7 +4868,7 @@ children: } vname = zpool_vdev_name(g_zfs, zhp, newchild[c], - cb->cb_name_flags); + cb->cb_name_flags | VDEV_NAME_TYPE_ID); ret += print_vdev_stats(zhp, vname, oldnv ? oldchild[c] : NULL, newchild[c], cb, depth + 2); free(vname); @@ -6182,7 +6182,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); } @@ -6216,7 +6216,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); |