From: Anand Jain <anand.jain@oracle.com>
To: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Cc: boris@bur.io
Subject: Re: [PATCH] btrfs: send: update command for protocol version check
Date: Mon, 10 Oct 2022 05:59:13 +0800 [thread overview]
Message-ID: <986b5abb-9111-475d-177b-5be6940bf759@oracle.com> (raw)
In-Reply-To: <20221007154025.13949-1-dsterba@suse.com>
On 10/7/22 23:40, David Sterba wrote:
> For a protocol and command compatibility we have a helper that hasn't
> been updated for v3 yet. We use it for verity so update where necessary.
>
> Fixes: 38622010a6de ("btrfs: send: add support for fs-verity")
> Signed-off-by: David Sterba <dsterba@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
> ---
> fs/btrfs/send.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
> index 178347666235..ec6e1752af2c 100644
> --- a/fs/btrfs/send.c
> +++ b/fs/btrfs/send.c
> @@ -348,6 +348,7 @@ static bool proto_cmd_ok(const struct send_ctx *sctx, int cmd)
> switch (sctx->proto) {
> case 1: return cmd <= BTRFS_SEND_C_MAX_V1;
> case 2: return cmd <= BTRFS_SEND_C_MAX_V2;
> + case 3: return cmd <= BTRFS_SEND_C_MAX_V3;
> default: return false;
> }
> }
> @@ -6469,7 +6470,9 @@ static int finish_inode_if_needed(struct send_ctx *sctx, int at_end)
> if (ret < 0)
> goto out;
> }
> - if (sctx->proto >= 3 && sctx->cur_inode_needs_verity) {
> +
> + if (proto_cmd_ok(sctx, BTRFS_SEND_C_ENABLE_VERITY)
> + && sctx->cur_inode_needs_verity) {
> ret = process_verity(sctx);
> if (ret < 0)
> goto out;
prev parent reply other threads:[~2022-10-09 21:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-07 15:40 [PATCH] btrfs: send: update command for protocol version check David Sterba
2022-10-09 21:59 ` Anand Jain [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=986b5abb-9111-475d-177b-5be6940bf759@oracle.com \
--to=anand.jain@oracle.com \
--cc=boris@bur.io \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox