summaryrefslogtreecommitdiff
path: root/fs/btrfs/send.c
diff options
context:
space:
mode:
authorBoris Burkov <boris@bur.io>2022-09-27 09:30:39 -0700
committerDavid Sterba <dsterba@suse.com>2022-10-11 14:46:55 +0200
commit9971a741c5f44fd72e664c35be9bc6fedb8a3498 (patch)
treed338dae0e361b89123a5f29161eb685e18ad9b3a /fs/btrfs/send.c
parent96dbcc0072acf4f9565a16e8da96e57e5cee1068 (diff)
downloadlinux-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.c')
-rw-r--r--fs/btrfs/send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 4ef4167072b8..178347666235 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -6469,7 +6469,7 @@ static int finish_inode_if_needed(struct send_ctx *sctx, int at_end)
if (ret < 0)
goto out;
}
- if (sctx->cur_inode_needs_verity) {
+ if (sctx->proto >= 3 && sctx->cur_inode_needs_verity) {
ret = process_verity(sctx);
if (ret < 0)
goto out;