Skip to content

RFC Experimental btrfs send/receive (btrfs-progs)

Alexander Block linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Btrfs-progs: add BTRFS_IOC_SUBVOL_GET/SETFLAGS to ioctl.hioctl.h+2 -00 replies
2/6Btrfs-progs: update ioctl.h to support clone range ioctlioctl.h+9 -10 replies
3/6Btrfs-progs: print inode transid and dir item data field in debug-treeprint-tree.c+8 -10 replies
4/6Btrfs-progs: update btrfs-progs for subvol uuid+times supportctree.h ioctl.h print-tree.c+112 -190 replies
5/6Btrfs-progs: update ioctl.h to support btrfs send ioctlioctl.h+11 -00 replies
6/6Btrfs-progs: add btrfs send/receive commandsMakefile btrfs.c cmds-receive.c +7 more+2673 -35 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/6] Experimental btrfs send/receive (btrfs-progs)

Hello all,

This is the user space side of btrfs send/receive.

You can apply them manually or use my git repo:

git://github.com/ablock84/btrfs-progs.git (branch send)

The branch is based on Hugo's integration-20120605 branch. I had to add a temporary commit to fix a bug introduced in one of the strncpy/overflow patches that got into btrfs-progs. This fix is not part of the btrfs send/receive patchset, but you'll probably need it if you want to base on the integration branch. I hope this is not required in the future when a new integration branch comes out.

Example usage:

Multiple snapshots at once:
btrfs send /mnt/snap[123] > snap123.btrfs

Single snapshot with manual parent:
btrfs send -p /mnt/snap3 /mnt/snap4 > snap4.btrfs

Receive both streams:
btrfs receive /mnt2 < snap123.btrfs
btrfs receive /mnt2 < snap4.btrfs

(Please give suggestions for a file extension)

Please read the kernel side email as well, especially the warnings!

Alex.

Alexander Block (6):
Btrfs-progs: add BTRFS_IOC_SUBVOL_GET/SETFLAGS to ioctl.h
Btrfs-progs: update ioctl.h to support clone range ioctl
Btrfs-progs: print inode transid and dir item data field in
debug-tree
Btrfs-progs: update btrfs-progs for subvol uuid+times support
Btrfs-progs: update ioctl.h to support btrfs send ioctl
Btrfs-progs: add btrfs send/receive commands

 Makefile       |    7 +-
 btrfs.c        |    2 +
 cmds-receive.c |  910 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 cmds-send.c    |  677 +++++++++++++++++++++++++++++++++++++++++
 commands.h     |    4 +
 ctree.h        |   40 ++-
 ioctl.h        |   35 ++-
 print-tree.c   |   88 ++++--
 send-stream.c  |  480 ++++++++++++++++++++++++++++++
 send-stream.h  |   58 ++++
 send-utils.c   |  337 +++++++++++++++++++++
 send-utils.h   |   69 +++++
 send.h         |  132 ++++++++
 13 files changed, 2815 insertions(+), 24 deletions(-)
 create mode 100644 cmds-receive.c
 create mode 100644 cmds-send.c
 create mode 100644 send-stream.c
 create mode 100644 send-stream.h
 create mode 100644 send-utils.c
 create mode 100644 send-utils.h
 create mode 100644 send.h
Signature · 1 line
1.7.10