diff options
author | Brian Behlendorf <[email protected]> | 2016-03-26 14:17:26 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-03-30 09:30:34 -0700 |
commit | c35b188246899714c156a52fdea179eab3717e92 (patch) | |
tree | 389d64ec0167aa2813668631f88ed5fae5969d5b /module/zfs/zio_inject.c | |
parent | 967798d04afc801e70bb12590e8325a32fb998dd (diff) |
Fix zpool_scrub_* test cases
The zpool_scrub_002, zpool_scrub_003, zpool_scrub_004 test cases fail
reliably when running against small pools or fast storage. This
occurs because the scrub/resilver operation completes before subsequent
commands can be run.
A one second delay has been added to 10% of zio's in order to ensure
the scrub/resilver operation will run for at least several seconds.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4450
Diffstat (limited to 'module/zfs/zio_inject.c')
-rw-r--r-- | module/zfs/zio_inject.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/module/zfs/zio_inject.c b/module/zfs/zio_inject.c index 69836dff3..a6eca8715 100644 --- a/module/zfs/zio_inject.c +++ b/module/zfs/zio_inject.c @@ -379,6 +379,10 @@ zio_handle_io_delay(zio_t *zio) if (handler->zi_record.zi_cmd != ZINJECT_DELAY_IO) continue; + if (handler->zi_record.zi_freq != 0 && + spa_get_random(100) >= handler->zi_record.zi_freq); + continue; + if (vd->vdev_guid == handler->zi_record.zi_guid) { seconds = handler->zi_record.zi_timer; break; |