Displaying 4 results from an estimated 4 matches for "btrfs_send_flag_no_file_data".
2013 Jan 07
3
[PATCH] btrfs: add "no file data" flag to btrfs send ioctl
This patch adds the flag, BTRFS_SEND_FLAG_NO_FILE_DATA to the btrfs send
ioctl code. When this flag is set, the btrfs send code will never write file
data into the stream (thus also avoiding expensive reads of that data in the
first place). BTRFS_SEND_C_UPDATE_EXTENT commands will be sent (instead of
BTRFS_SEND_C_WRITE) with an offset, length pair indi...
2013 Apr 10
0
[PATCH] Btrfs-progs: add send option for using new end-cmd semantic
...uot;,
diff --git a/ioctl.h b/ioctl.h
index e841913..f8b9f07 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -373,7 +373,20 @@ struct btrfs_ioctl_received_subvol_args {
* search of clone sources doesn''t find an extent. UPDATE_EXTENT
* commands will be sent instead of WRITE commands.
*/
-#define BTRFS_SEND_FLAG_NO_FILE_DATA 0x1
+#define BTRFS_SEND_FLAG_NO_FILE_DATA 0x1
+
+/*
+ * Do not add the leading stream header. Used when multiple snapshots
+ * are sent back to back.
+ */
+#define BTRFS_SEND_FLAG_OMIT_STREAM_HEADER 0x2
+
+/*
+ * Omit the command at the end of the stream that indicated the end
+ * of the stream. T...
2013 Feb 10
3
Re: Diff using send-receive code
Hello,
We''re a team of 4 final year computer science students and are
working on generating a diff between file system snapshots using the
send receive code.
The output of our utility looks like this-
(I''ve tested it on a small subvol with minimal changes just to give an idea)
root@nafisa-M-6319:/mnt/btrfs# btrfs sub diff -p /mnt/btrfs/snap1
/mnt/btrfs/snap2
2013 Apr 06
3
btrfs-progs: re-add send-test
...read, &r);
+ if (ret < 0) {
+ ret = errno;
+ fprintf(stderr, "ERROR: pthread create failed. %s\n",
+ strerror(ret));
+ goto out;
+ }
+
+ io_send.send_fd = pipefd[1];
+ io_send.clone_sources_count = 0;
+ io_send.clone_sources = NULL;
+ io_send.parent_root = 0;
+ io_send.flags = BTRFS_SEND_FLAG_NO_FILE_DATA;
+
+ ret = ioctl(subvol_fd, BTRFS_IOC_SEND, &io_send);
+ if (ret) {
+ ret = errno;
+ fprintf(stderr, "ERROR: send ioctl failed with %d: %s\n", ret,
+ strerror(ret));
+ goto out;
+ }
+
+ close(pipefd[1]);
+
+ ret = pthread_join(t_read, &t_err);
+ if (ret) {
+ fprintf(stderr,...