]> granicus.if.org Git - zfs/commit
Remove races from scrub / resilver tests
authorTom Caputi <tcaputi@datto.com>
Wed, 28 Nov 2018 18:12:08 +0000 (13:12 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 28 Nov 2018 18:12:08 +0000 (10:12 -0800)
commitcef48f14da6eec8a9095a0272f1cd7d9d60ca476
tree52f2cb54823712b25c09d0ef3af05067d98b0042
parent00369f333809c2d38629abd8ff1fe0383ccd5154
Remove races from scrub / resilver tests

Currently, several tests in the ZFS Test Suite that attempt to
test scrub and resilver behavior occasionally fail. A big reason
for this is that these tests use a combination of zinject and
zfs_scan_vdev_limit to attempt to slow these operations enough
to verify their test commands. This method works most of the time,
but provides no guarantees and leads to flaky behavior. This patch
adds a new tunable, zfs_scan_suspend_progress, that ensures that
scans make no progress, guaranteeing that tests can be run without
racing.

This patch also changes zfs_remove_max_bytes_pause to match this
new tunable. This provides some consistency between these two
similar tunables and ensures that the tunable will not misbehave
on 32-bit systems.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8111
14 files changed:
module/zfs/dsl_scan.c
module/zfs/vdev_removal.c
tests/zfs-tests/tests/functional/cli_root/zpool_import/cleanup.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_device_replaced.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_import/import_rewind_device_replaced.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.cfg
tests/zfs-tests/tests/functional/cli_root/zpool_resilver/zpool_resilver.cfg
tests/zfs-tests/tests/functional/cli_root/zpool_resilver/zpool_resilver_restart.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_scrub/cleanup.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_002_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_003_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_004_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_resilver.ksh
tests/zfs-tests/tests/functional/removal/removal.kshlib