json_stats.c: Do not print value of vs_noalloc

The vs_noalloc member of the vdev_stat structure was implemented in
2a673e76a9. It is not available in ZFS
2.1.5, so code using it needs to be disabled.
This commit is contained in:
Mateusz Piotrowski 2023-05-10 13:27:29 +02:00 committed by Geoff Amey
parent bcde0da8e4
commit 676d1dcc8c
1 changed files with 2 additions and 0 deletions

View File

@ -210,9 +210,11 @@ static void vdev_to_json(vdev_t *v, pool_scan_stat_t *ps, jprint_t *jp)
/* (removing) */
jp_printf(jp, "vs_scan_removing: %b",
v->vdev_stat.vs_scan_removing != 0);
#if 0 /* XXX: The vs_noalloc member is not available in ZFS 2.1.5. */
/* (non-allocating) */
jp_printf(jp, "vs_noalloc: %b",
v->vdev_stat.vs_noalloc != 0);
#endif
/* (awaiting resilver) */
jp_printf(jp, "vs_resilver_deferred: %b",
v->vdev_stat.vs_resilver_deferred);