Implemented zpool scrub pause/resume
This issue tracks the port of scrub pause from ZoL: https://github.com/zfsonlinux/zfs/pull/6167
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. Description 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. If you're testing this change, you probably want to include the patch from #6164 Motivation and Context Scrub pausing can be an I/O intensive operation and people have been asking for the ability to pause a scrub for a while. This allows one to preserve scrub progress while freeing up bandwidth for other I/O. How Has This Been Tested? Unit testing and zfs-tests. to the pool.
This patch will also include the patch from https://github.com/zfsonlinux/zfs/pull/6164
In certain cases (dsl_scan_sync() is one), we may end up calling bpobj_iterate() on an empty bpobj. Even though we don't end up modifying the bpobj it still gets dirtied, causing unneeded writes to the pool. The fix adds an early bail from bpobj_iterate_impl() if bpobj is empty to prevent unneeded writes to the pool.
Updated by Electric Monk almost 5 years ago
- Status changed from In Progress to Closed
- % Done changed from 80 to 100
commit 1702cce751c5cb7ead878d0205a6c90b027e3de8 Author: Alek Pinchuk <firstname.lastname@example.org> Date: 2017-08-21T19:29:56.000Z 8414 Implemented zpool scrub pause/resume Reviewed by: George Melikov <email@example.com> Reviewed by: Brian Behlendorf <firstname.lastname@example.org> Reviewed by: Brad Lewis <email@example.com> Reviewed by: Serapheim Dimitropoulos <firstname.lastname@example.org> Reviewed by: Matt Ahrens <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>