]> granicus.if.org Git - zfs/commit
Implemented zpool scrub pause/resume
authorAlek P <alek-p@users.noreply.github.com>
Fri, 7 Jul 2017 05:16:13 +0000 (22:16 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 7 Jul 2017 05:16:13 +0000 (22:16 -0700)
commit0ea05c64f8d08c20439dd2a06e949a2aa4115101
tree28c543bbb096dfdb9809c754722445fa699d6ec4
parent94b25662c51696ec081494e69efb5896566dede2
Implemented zpool scrub pause/resume

Currently, there is no way to pause a scrub. Pausing may
be useful when the pool is busy with other I/O to preserve
bandwidth.

This patch adds the ability to pause and resume scrubbing.
This is achieved by maintaining a persistent on-disk scrub state.
While the state is 'paused' we do not scrub any more blocks.
We do however perform regular scan housekeeping such as
freeing async destroyed and deadlist blocks while paused.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Thomas Caputi <tcaputi@datto.com>
Reviewed-by: Serapheim Dimitropoulos <serapheimd@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alek Pinchuk <apinchuk@datto.com>
Closes #6167
17 files changed:
cmd/zpool/zpool_main.c
include/libzfs.h
include/sys/dsl_scan.h
include/sys/fs/zfs.h
include/sys/spa.h
include/sys/spa_impl.h
lib/libzfs/libzfs_pool.c
lib/libzfs/libzfs_util.c
man/man8/zpool.8
module/zfs/dsl_scan.c
module/zfs/spa.c
module/zfs/spa_misc.c
module/zfs/zfs_ioctl.c
tests/zfs-tests/include/libtest.shlib
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_user/misc/zpool_scrub_001_neg.ksh