summaryrefslogtreecommitdiff
path: root/include/uapi/linux/btrfs.h
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2022-03-17 10:25:39 -0700
committerDavid Sterba <dsterba@suse.com>2022-07-25 17:45:32 +0200
commitb7c14f23fb604fc66edae7514ed9b4b93930b5ba (patch)
tree4446835cabec6d9d17c8e8e6b665f15400540096 /include/uapi/linux/btrfs.h
parent54cab6aff811d328c5add37e0faf32f6328741ea (diff)
btrfs: send: add stream v2 definitions
This adds the definitions of the new commands for send stream version 2 and their respective attributes: fallocate, FS_IOC_SETFLAGS (a.k.a. chattr), and encoded writes. It also documents two changes to the send stream format in v2: the receiver shouldn't assume a maximum command size, and the DATA attribute is encoded differently to allow for writes larger than 64k. These will be implemented in subsequent changes, and then the ioctl will accept the new version and flag. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/uapi/linux/btrfs.h')
-rw-r--r--include/uapi/linux/btrfs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index d956b2993970..b6f26a434b10 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -777,6 +777,13 @@ struct btrfs_ioctl_received_subvol_args {
*/
#define BTRFS_SEND_FLAG_VERSION 0x8
+/*
+ * Send compressed data using the ENCODED_WRITE command instead of decompressing
+ * the data and sending it with the WRITE command. This requires protocol
+ * version >= 2.
+ */
+#define BTRFS_SEND_FLAG_COMPRESSED 0x10
+
#define BTRFS_SEND_FLAG_MASK \
(BTRFS_SEND_FLAG_NO_FILE_DATA | \
BTRFS_SEND_FLAG_OMIT_STREAM_HEADER | \