remarkable-linux/include
Stefan Behrens c2c71324ec Btrfs: allow omitting stream header and end-cmd for btrfs send
Two new flags are added to allow omitting the stream header and the
end command for btrfs send streams. This is used in cases where you
send multiple snapshots back-to-back in one stream.

This used to be encoded like this (with 2 snapshots in this example):
<stream header> + <sequence of commands> + <end cmd> +
<stream header> + <sequence of commands> + <end cmd> + EOF

The new format (if the two new flags are used) is this one:
<stream header> + <sequence of commands> +
                  <sequence of commands> + <end cmd>

Note that the currently existing receivers treat <end cmd> only as
an indication that a new <stream header> is following. This means,
you can just skip the sequence <end cmd> <stream header> without
loosing compatibility. As long as an EOF is following, the currently
existing receivers handle the new format (if the two new flags are
used) exactly as the old one.

So what is the benefit of this change? The goal is to be able to use
a single stream (one TCP connection) to multiplex a request/response
handshake plus Btrfs send streams, all in the same stream. In this
case you cannot evaluate an EOF condition as an end of the Btrfs send
stream. You need something else, and the <end cmd> is just perfect
for this purpose.

The summary is:
The format change is driven by the need to send several Btrfs send
streams over a single TCP connections, with the ability for a repeated
request/response handshake in the middle. And this format change does
not break any existing tool, it is completely compatible.

You could compare the old behaviour of the Btrfs send stream to the
one of ftp where you need a seperate request/response channel and
newly opened data transfer channels for each file, while the new
behaviour is more like http using a single stream for everything.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
2013-05-06 15:54:44 -04:00
..
acpi Fixes: 2013-03-12 20:25:53 -07:00
asm-generic x86-32: Fix possible incomplete TLB invalidate with PAE pagetables 2013-04-12 16:56:47 -07:00
clocksource ImgTec Meta architecture changes for v3.9-rc1 2013-03-03 12:06:09 -08:00
crypto
drm drm/radeon: add Richland pci ids 2013-03-15 18:47:19 -04:00
keys
linux Merge branch 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-20 18:40:36 -07:00
math-emu
media
memory
misc
net net: fix incorrect credentials passing 2013-04-20 16:56:42 -04:00
pcmcia
ras
rdma
rxrpc
scsi libfc, fcoe, bnx2fc: Split fc_disc_init into fc_disc_{init, config} 2013-03-25 16:03:03 -07:00
sound Merge remote-tracking branch 'asoc/fix/max98090' into asoc-next 2013-03-26 14:08:03 +00:00
target
trace Revert "block: add missing block_bio_complete() tracepoint" 2013-04-18 09:00:26 -07:00
uapi Btrfs: allow omitting stream header and end-cmd for btrfs send 2013-05-06 15:54:44 -04:00
video ARM: at91: fix LCD-wiring mode 2013-03-13 11:05:04 +01:00
xen for-linus-20130331 2013-03-31 11:38:59 -07:00
Kbuild