mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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 <behlendorf1@llnl.gov> Reviewed-by: Dipak Ghosh <dipak.ghosh@hpe.com> Signed-off-by: Akash B <akash-b@hpe.com> Closes #12510 Closes #13031
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user