From 9c5e88b1ded19cb4b19b9d767d5c71b34c189540 Mon Sep 17 00:00:00 2001 From: Paul Zuchowski <31706010+PaulZ-98@users.noreply.github.com> Date: Fri, 15 Feb 2019 15:41:38 -0500 Subject: zfs should optionally send holds Add -h switch to zfs send command to send dataset holds. If holds are present in the stream, zfs receive will create them on the target dataset, unless the zfs receive -h option is used to skip receive of holds. Reviewed-by: Alek Pinchuk Reviewed-by: loli10K Reviewed-by: Brian Behlendorf Reviewed by: Paul Dagnelie Signed-off-by: Paul Zuchowski Closes #7513 --- include/libzfs.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/libzfs.h') diff --git a/include/libzfs.h b/include/libzfs.h index 72d956b41..65b06f7a8 100644 --- a/include/libzfs.h +++ b/include/libzfs.h @@ -645,6 +645,9 @@ typedef struct sendflags { /* only send received properties (ie. -b) */ boolean_t backup; + + /* include snapshot holds in send stream */ + boolean_t holds; } sendflags_t; typedef boolean_t (snapfilter_cb_t)(zfs_handle_t *, void *); @@ -707,6 +710,12 @@ typedef struct recvflags { /* do not mount file systems as they are extracted (private) */ boolean_t nomount; + + /* Was holds flag set in the compound header? */ + boolean_t holds; + + /* skip receive of snapshot holds */ + boolean_t skipholds; } recvflags_t; extern int zfs_receive(libzfs_handle_t *, const char *, nvlist_t *, -- cgit v1.2.3