aboutsummaryrefslogtreecommitdiffstats
path: root/include/libzfs.h
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2020-03-04 15:07:11 -0800
committerGitHub <[email protected]>2020-03-04 15:07:11 -0800
commit2288d4196821ae4b5fa375e8e519f6e83f26abad (patch)
tree49c49baf2112da27d14ea2f90e09a333d1ab99da /include/libzfs.h
parentb3212d2fa6ab8d7d8373373e8a6b8acbbf45508e (diff)
Add trim support to zpool wait
Manual trims fall into the category of long-running pool activities which people might want to wait synchronously for. This change adds support to 'zpool wait' for waiting for manual trim operations to complete. It also adds a '-w' flag to 'zpool trim' which can be used to turn 'zpool trim' into a synchronous operation. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Serapheim Dimitropoulos <[email protected]> Signed-off-by: John Gallagher <[email protected]> Closes #10071
Diffstat (limited to 'include/libzfs.h')
-rw-r--r--include/libzfs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libzfs.h b/include/libzfs.h
index 05abfdf89..7f728e3a5 100644
--- a/include/libzfs.h
+++ b/include/libzfs.h
@@ -269,6 +269,9 @@ typedef struct trimflags {
/* request a secure trim, requires support from device */
boolean_t secure;
+ /* after starting trim, block until trim completes */
+ boolean_t wait;
+
/* trim at the requested rate in bytes/second */
uint64_t rate;
} trimflags_t;