btrfs: send: allow protocol version 3 with CONFIG_BTRFS_DEBUG
authorBoris Burkov <boris@bur.io>
Tue, 27 Sep 2022 16:30:39 +0000 (09:30 -0700)
committerDavid Sterba <dsterba@suse.com>
Tue, 11 Oct 2022 12:46:55 +0000 (14:46 +0200)
commit9971a741c5f44fd72e664c35be9bc6fedb8a3498
treed338dae0e361b89123a5f29161eb685e18ad9b3a
parent96dbcc0072acf4f9565a16e8da96e57e5cee1068
btrfs: send: allow protocol version 3 with CONFIG_BTRFS_DEBUG

We haven't finalized send stream v3 yet, so gate the send stream version
behind CONFIG_BTRFS_DEBUG as we want some way to test it.

The original verity send did not check the protocol version, so add that
actual protection as well.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/send.c
fs/btrfs/send.h