diff options
author | Boris Burkov <boris@bur.io> | 2022-09-27 09:30:39 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-10-11 14:46:55 +0200 |
commit | 9971a741c5f44fd72e664c35be9bc6fedb8a3498 (patch) | |
tree | d338dae0e361b89123a5f29161eb685e18ad9b3a /fs/btrfs/send.h | |
parent | 96dbcc0072acf4f9565a16e8da96e57e5cee1068 (diff) | |
download | linux-9971a741c5f44fd72e664c35be9bc6fedb8a3498.tar.gz |
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>
Diffstat (limited to 'fs/btrfs/send.h')
-rw-r--r-- | fs/btrfs/send.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/send.h b/fs/btrfs/send.h index 0a4537775e0c..f7585cfa7e52 100644 --- a/fs/btrfs/send.h +++ b/fs/btrfs/send.h @@ -10,7 +10,12 @@ #include <linux/types.h> #define BTRFS_SEND_STREAM_MAGIC "btrfs-stream" +/* Conditional support for the upcoming protocol version. */ +#ifdef CONFIG_BTRFS_DEBUG +#define BTRFS_SEND_STREAM_VERSION 3 +#else #define BTRFS_SEND_STREAM_VERSION 2 +#endif /* * In send stream v1, no command is larger than 64K. In send stream v2, no limit |