diff options
author | Matthew Macy <[email protected]> | 2020-09-03 20:04:09 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-03 20:04:09 -0700 |
commit | ac6e5fb202a95277cd7886eb7b6acc3ec53d8def (patch) | |
tree | b016a947bae0eee38318eca6c19d619045a7de65 /module/zfs/vdev_trim.c | |
parent | f30703f6fc831bdeb5e7a11b5f1c01d6d9cb7799 (diff) |
Replace cv_{timed}wait_sig with cv_{timed}wait_idle where appropriate
There are a number of places where cv_?_sig is used simply for
accounting purposes but the surrounding code has no ability to
cope with actually receiving a signal. On FreeBSD it is possible
to send signals to individual kernel threads so this could
enable undesirable behavior.
This patch adds routines on Linux that will do the same idle
accounting as _sig without making the task interruptible. On
FreeBSD cv_*_idle are all aliases for cv_*
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #10843
Diffstat (limited to 'module/zfs/vdev_trim.c')
-rw-r--r-- | module/zfs/vdev_trim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/vdev_trim.c b/module/zfs/vdev_trim.c index 3f8c34806..7383e1493 100644 --- a/module/zfs/vdev_trim.c +++ b/module/zfs/vdev_trim.c @@ -481,7 +481,7 @@ vdev_trim_range(trim_args_t *ta, uint64_t start, uint64_t size) if (ta->trim_type == TRIM_TYPE_MANUAL) { while (vd->vdev_trim_rate != 0 && !vdev_trim_should_stop(vd) && vdev_trim_calculate_rate(ta) > vd->vdev_trim_rate) { - cv_timedwait_sig(&vd->vdev_trim_io_cv, + cv_timedwait_idle(&vd->vdev_trim_io_cv, &vd->vdev_trim_io_lock, ddi_get_lbolt() + MSEC_TO_TICK(10)); } |