diff options
author | Alek P <[email protected]> | 2017-07-06 22:16:13 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-07-06 22:16:13 -0700 |
commit | 0ea05c64f8d08c20439dd2a06e949a2aa4115101 (patch) | |
tree | 28c543bbb096dfdb9809c754722445fa699d6ec4 /include/libzfs.h | |
parent | 94b25662c51696ec081494e69efb5896566dede2 (diff) |
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 <[email protected]>
Reviewed by: Thomas Caputi <[email protected]>
Reviewed-by: Serapheim Dimitropoulos <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alek Pinchuk <[email protected]>
Closes #6167
Diffstat (limited to 'include/libzfs.h')
-rw-r--r-- | include/libzfs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libzfs.h b/include/libzfs.h index 62a61406a..c03ff5710 100644 --- a/include/libzfs.h +++ b/include/libzfs.h @@ -147,6 +147,7 @@ typedef enum zfs_error { EZFS_DIFF, /* general failure of zfs diff */ EZFS_DIFFDATA, /* bad zfs diff data */ EZFS_POOLREADONLY, /* pool is in read-only mode */ + EZFS_SCRUB_PAUSED, /* scrub currently paused */ EZFS_UNKNOWN } zfs_error_t; @@ -260,7 +261,7 @@ typedef struct splitflags { /* * Functions to manipulate pool and vdev state */ -extern int zpool_scan(zpool_handle_t *, pool_scan_func_t); +extern int zpool_scan(zpool_handle_t *, pool_scan_func_t, pool_scrub_cmd_t); extern int zpool_clear(zpool_handle_t *, const char *, nvlist_t *); extern int zpool_reguid(zpool_handle_t *); extern int zpool_reopen(zpool_handle_t *); |