aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys/fs/zfs.h
diff options
context:
space:
mode:
authorChristian Schwarz <[email protected]>2019-11-10 23:24:14 -0800
committerBrian Behlendorf <[email protected]>2020-02-11 13:19:12 -0800
commita73f361fdb2c0a7778e70b482e316054fc2d8630 (patch)
tree094642f07952d4149c2dab358a35910961d0c42e /include/sys/fs/zfs.h
parent7b49bbc8164a8a5cd31cf1ba7a6cd88269fec8d0 (diff)
Implement bookmark copying
This feature allows copying existing bookmarks using zfs bookmark fs#target fs#newbookmark There are some niche use cases for such functionality, e.g. when using bookmarks as markers for replication progress. Copying redaction bookmarks produces a normal bookmark that cannot be used for redacted send (we are not duplicating the redaction object). ZCP support for bookmarking (both creation and copying) will be implemented in a separate patch based on this work. Overview: - Terminology: - source = existing snapshot or bookmark - new/bmark = new bookmark - Implement bookmark copying in `dsl_bookmark.c` - create new bookmark node - copy source's `zbn_phys` to new's `zbn_phys` - zero-out redaction object id in copy - Extend existing bookmark ioctl nvlist schema to accept bookmarks as sources - => `dsl_bookmark_create_nvl_validate` is authoritative - use `dsl_dataset_is_before` check for both snapshot and bookmark sources - Adjust CLI - refactor shortname expansion logic in `zfs_do_bookmark` - Update man pages - warn about redaction bookmark handling - Add test cases - CLI - pyyzfs libzfs_core bindings Reviewed-by: Matt Ahrens <[email protected]> Reviewed-by: Paul Dagnelie <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Christian Schwarz <[email protected]> Closes #9571
Diffstat (limited to 'include/sys/fs/zfs.h')
-rw-r--r--include/sys/fs/zfs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h
index 3e2c00235..f919bd9b1 100644
--- a/include/sys/fs/zfs.h
+++ b/include/sys/fs/zfs.h
@@ -1310,6 +1310,8 @@ typedef enum zfs_ioc {
* not described precisely by generic errno codes.
*
* These numbers should not change over time. New entries should be appended.
+ *
+ * (Keep in sync with contrib/pyzfs/libzfs_core/_constants.py)
*/
typedef enum {
ZFS_ERR_CHECKPOINT_EXISTS = 1024,
@@ -1327,6 +1329,7 @@ typedef enum {
ZFS_ERR_SPILL_BLOCK_FLAG_MISSING,
ZFS_ERR_UNKNOWN_SEND_STREAM_FEATURE,
ZFS_ERR_EXPORT_IN_PROGRESS,
+ ZFS_ERR_BOOKMARK_SOURCE_NOT_ANCESTOR,
} zfs_errno_t;
/*