diff options
Diffstat (limited to 'include/libzfs.h')
-rw-r--r-- | include/libzfs.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/libzfs.h b/include/libzfs.h index 3405bb99b..b604f1194 100644 --- a/include/libzfs.h +++ b/include/libzfs.h @@ -143,6 +143,9 @@ typedef enum zfs_error { EZFS_INITIALIZING, /* currently initializing */ EZFS_NO_INITIALIZE, /* no active initialize */ EZFS_WRONG_PARENT, /* invalid parent dataset (e.g ZVOL) */ + EZFS_TRIMMING, /* currently trimming */ + EZFS_NO_TRIM, /* no active trim */ + EZFS_TRIM_NOTSUP, /* device does not support trim */ EZFS_UNKNOWN } zfs_error_t; @@ -253,12 +256,26 @@ typedef struct splitflags { int name_flags; } splitflags_t; +typedef struct trimflags { + /* requested vdevs are for the entire pool */ + boolean_t fullpool; + + /* request a secure trim, requires support from device */ + boolean_t secure; + + /* trim at the requested rate in bytes/second */ + uint64_t rate; +} trimflags_t; + /* * Functions to manipulate pool and vdev state */ extern int zpool_scan(zpool_handle_t *, pool_scan_func_t, pool_scrub_cmd_t); extern int zpool_initialize(zpool_handle_t *, pool_initialize_func_t, nvlist_t *); +extern int zpool_trim(zpool_handle_t *, pool_trim_func_t, nvlist_t *, + trimflags_t *); + extern int zpool_clear(zpool_handle_t *, const char *, nvlist_t *); extern int zpool_reguid(zpool_handle_t *); extern int zpool_reopen_one(zpool_handle_t *, void *); |