Skip to content

Commit

Permalink
Add enumerated vdev names to 'zpool iostat -v' and 'zpool list -v'
Browse files Browse the repository at this point in the history
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:
Reviewed-by:
Signed-off-by: Akash B <[email protected]>
Issue openzfs#12510
  • Loading branch information
akashb-22 committed Jan 28, 2022
1 parent c70bb2f commit b90539d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/zpool/zpool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4850,7 +4850,7 @@ print_vdev_stats(zpool_handle_t *zhp, const char *name, nvlist_t *oldnv,
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);
Expand Down Expand Up @@ -4894,7 +4894,7 @@ print_vdev_stats(zpool_handle_t *zhp, const char *name, nvlist_t *oldnv,
}

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);
Expand Down Expand Up @@ -6216,7 +6216,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);
}
Expand Down Expand Up @@ -6250,7 +6250,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);
Expand Down

0 comments on commit b90539d

Please sign in to comment.