mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Extend zpool-iostat to account for ZIO_PRIORITY_REBUILD (#12319)
Previously, zpool-iostat did not display any data regarding rebuild I/Os in either the latency/size histograms (-w/-l/-r) or the queue data (-q). This fix essentially utilizes the existing infrastructure for tracking rebuild queue data and displays this data in the proper places within zpool-iostat's output. Signed-off-by: Trevor Bautista <tbautista@newmexicoconsortium.org> Signed-off-by: Trevor Bautista <tbautista@lanl.gov> Co-authored-by: Trevor Bautista <tbautista@newmexicoconsortium.org> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov>
This commit is contained in:
@@ -256,6 +256,9 @@ vdev_config_generate_stats(vdev_t *vd, nvlist_t *nv)
|
||||
fnvlist_add_uint64(nvx, ZPOOL_CONFIG_VDEV_TRIM_ACTIVE_QUEUE,
|
||||
vsx->vsx_active_queue[ZIO_PRIORITY_TRIM]);
|
||||
|
||||
fnvlist_add_uint64(nvx, ZPOOL_CONFIG_VDEV_REBUILD_ACTIVE_QUEUE,
|
||||
vsx->vsx_active_queue[ZIO_PRIORITY_REBUILD]);
|
||||
|
||||
/* ZIOs pending */
|
||||
fnvlist_add_uint64(nvx, ZPOOL_CONFIG_VDEV_SYNC_R_PEND_QUEUE,
|
||||
vsx->vsx_pend_queue[ZIO_PRIORITY_SYNC_READ]);
|
||||
@@ -275,6 +278,9 @@ vdev_config_generate_stats(vdev_t *vd, nvlist_t *nv)
|
||||
fnvlist_add_uint64(nvx, ZPOOL_CONFIG_VDEV_TRIM_PEND_QUEUE,
|
||||
vsx->vsx_pend_queue[ZIO_PRIORITY_TRIM]);
|
||||
|
||||
fnvlist_add_uint64(nvx, ZPOOL_CONFIG_VDEV_REBUILD_PEND_QUEUE,
|
||||
vsx->vsx_pend_queue[ZIO_PRIORITY_REBUILD]);
|
||||
|
||||
/* Histograms */
|
||||
fnvlist_add_uint64_array(nvx, ZPOOL_CONFIG_VDEV_TOT_R_LAT_HISTO,
|
||||
vsx->vsx_total_histo[ZIO_TYPE_READ],
|
||||
@@ -316,6 +322,10 @@ vdev_config_generate_stats(vdev_t *vd, nvlist_t *nv)
|
||||
vsx->vsx_queue_histo[ZIO_PRIORITY_TRIM],
|
||||
ARRAY_SIZE(vsx->vsx_queue_histo[ZIO_PRIORITY_TRIM]));
|
||||
|
||||
fnvlist_add_uint64_array(nvx, ZPOOL_CONFIG_VDEV_REBUILD_LAT_HISTO,
|
||||
vsx->vsx_queue_histo[ZIO_PRIORITY_REBUILD],
|
||||
ARRAY_SIZE(vsx->vsx_queue_histo[ZIO_PRIORITY_REBUILD]));
|
||||
|
||||
/* Request sizes */
|
||||
fnvlist_add_uint64_array(nvx, ZPOOL_CONFIG_VDEV_SYNC_IND_R_HISTO,
|
||||
vsx->vsx_ind_histo[ZIO_PRIORITY_SYNC_READ],
|
||||
@@ -341,6 +351,10 @@ vdev_config_generate_stats(vdev_t *vd, nvlist_t *nv)
|
||||
vsx->vsx_ind_histo[ZIO_PRIORITY_TRIM],
|
||||
ARRAY_SIZE(vsx->vsx_ind_histo[ZIO_PRIORITY_TRIM]));
|
||||
|
||||
fnvlist_add_uint64_array(nvx, ZPOOL_CONFIG_VDEV_IND_REBUILD_HISTO,
|
||||
vsx->vsx_ind_histo[ZIO_PRIORITY_REBUILD],
|
||||
ARRAY_SIZE(vsx->vsx_ind_histo[ZIO_PRIORITY_REBUILD]));
|
||||
|
||||
fnvlist_add_uint64_array(nvx, ZPOOL_CONFIG_VDEV_SYNC_AGG_R_HISTO,
|
||||
vsx->vsx_agg_histo[ZIO_PRIORITY_SYNC_READ],
|
||||
ARRAY_SIZE(vsx->vsx_agg_histo[ZIO_PRIORITY_SYNC_READ]));
|
||||
@@ -365,6 +379,10 @@ vdev_config_generate_stats(vdev_t *vd, nvlist_t *nv)
|
||||
vsx->vsx_agg_histo[ZIO_PRIORITY_TRIM],
|
||||
ARRAY_SIZE(vsx->vsx_agg_histo[ZIO_PRIORITY_TRIM]));
|
||||
|
||||
fnvlist_add_uint64_array(nvx, ZPOOL_CONFIG_VDEV_AGG_REBUILD_HISTO,
|
||||
vsx->vsx_agg_histo[ZIO_PRIORITY_REBUILD],
|
||||
ARRAY_SIZE(vsx->vsx_agg_histo[ZIO_PRIORITY_REBUILD]));
|
||||
|
||||
/* IO delays */
|
||||
fnvlist_add_uint64(nvx, ZPOOL_CONFIG_VDEV_SLOW_IOS, vs->vs_slow_ios);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user