diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index dc474e3739f3..547cfb72d1c4 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -379,6 +379,7 @@ typedef enum { VDEV_PROP_TRIM_SUPPORT, VDEV_PROP_TRIM_ERRORS, VDEV_PROP_SLOW_IOS, + VDEV_PROP_SIT_OUT_READS, VDEV_NUM_PROPS } vdev_prop_t; diff --git a/lib/libzfs/libzfs.abi b/lib/libzfs/libzfs.abi index 1f9fde6677d8..f2aef8754460 100644 --- a/lib/libzfs/libzfs.abi +++ b/lib/libzfs/libzfs.abi @@ -5917,7 +5917,8 @@ - + + diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index f256535e8ea0..fd7a580f793c 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -5477,6 +5477,8 @@ zpool_get_vdev_prop_value(nvlist_t *nvprop, vdev_prop_t prop, char *prop_name, /* Only use if provided by the RAIDZ VDEV above */ if (prop == VDEV_PROP_RAIDZ_EXPANDING) return (ENOENT); + if (prop == VDEV_PROP_SIT_OUT_READS) + return (ENOENT); } if (vdev_prop_index_to_string(prop, intval, (const char **)&strval) != 0) diff --git a/man/man7/vdevprops.7 b/man/man7/vdevprops.7 index 34d4026b1009..844864518c1e 100644 --- a/man/man7/vdevprops.7 +++ b/man/man7/vdevprops.7 @@ -104,12 +104,19 @@ Comma separated list of children of this vdev The number of children belonging to this vdev .It Sy read_errors , write_errors , checksum_errors , initialize_errors , trim_errors The number of errors of each type encountered by this vdev +.It Sy sit_out_reads +True when a slow disk outlier was detected and the vdev is currently in a sit +out state. +While sitting out, the vdev will not participate in normal reads, instead its +data will be reconstructed as needed from parity. .It Sy slow_ios The number of slow I/Os encountered by this vdev, These represent I/O operations that didn't complete in .Sy zio_slow_io_ms milliseconds .Pq Sy 30000 No by default . +Can also be incremented when a vdev was determined to be a raidz leaf latency +outlier. .It Sy null_ops , read_ops , write_ops , free_ops , claim_ops , trim_ops The number of I/O operations of each type performed by this vdev .It Xo diff --git a/module/zcommon/zpool_prop.c b/module/zcommon/zpool_prop.c index ea9eda4b316d..461fc7faefe2 100644 --- a/module/zcommon/zpool_prop.c +++ b/module/zcommon/zpool_prop.c @@ -466,6 +466,9 @@ vdev_prop_init(void) zprop_register_index(VDEV_PROP_RAIDZ_EXPANDING, "raidz_expanding", 0, PROP_READONLY, ZFS_TYPE_VDEV, "on | off", "RAIDZ_EXPANDING", boolean_table, sfeatures); + zprop_register_index(VDEV_PROP_SIT_OUT_READS, "sit_out_reads", 0, + PROP_READONLY, ZFS_TYPE_VDEV, "on | off", "SIT_OUT_READS", + boolean_table, sfeatures); zprop_register_index(VDEV_PROP_TRIM_SUPPORT, "trim_support", 0, PROP_READONLY, ZFS_TYPE_VDEV, "on | off", "TRIMSUP", boolean_table, sfeatures); diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index 98d8b7d20b3d..7781af50f8d2 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -6362,6 +6362,20 @@ vdev_prop_get(vdev_t *vd, nvlist_t *innvl, nvlist_t *outnvl) ZPROP_SRC_NONE); } continue; + case VDEV_PROP_SIT_OUT_READS: + /* Only expose this for a draid or raidz leaf */ + if (vd->vdev_ops->vdev_op_leaf && + vd->vdev_top != NULL && + (vd->vdev_top->vdev_ops == + &vdev_raidz_ops || + vd->vdev_top->vdev_ops == + &vdev_draid_ops)) { + vdev_prop_add_list(outnvl, propname, + NULL, + vd->vdev_read_sit_out_expire != 0, + ZPROP_SRC_NONE); + } + continue; case VDEV_PROP_TRIM_SUPPORT: /* only valid for leaf vdevs */ if (vd->vdev_ops->vdev_op_leaf) {