CEPH filesystem development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: xiubli@redhat.com
Cc: idryomov@gmail.com, vshankar@redhat.com, ceph-devel@vger.kernel.org
Subject: Re: [PATCH v3] ceph: skip the memories when received a higher version of message
Date: Tue, 01 Mar 2022 09:43:04 -0500	[thread overview]
Message-ID: <5c32c1228db8bd8916665e02c0bf70d70ba89e4e.camel@kernel.org> (raw)
In-Reply-To: <20220301143927.513492-1-xiubli@redhat.com>

On Tue, 2022-03-01 at 22:39 +0800, xiubli@redhat.com wrote:
> From: Xiubo Li <xiubli@redhat.com>
> 
> We should skip the extra memories which are from the higher version
> just likes the libcephfs client does.
> 
> URL: https://tracker.ceph.com/issues/54430
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---
>  fs/ceph/mds_client.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 94b4c6508044..608d077f2eeb 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -313,6 +313,7 @@ static int parse_reply_info_lease(void **p, void *end,
>  {
>  	u8 struct_v;
>  	u32 struct_len;
> +	void *lend;
>  
>  	if (features == (u64)-1) {
>  		u8 struct_compat;
> @@ -332,6 +333,7 @@ static int parse_reply_info_lease(void **p, void *end,
>  		*altname = NULL;
>  	}
>  
> +	lend = *p + struct_len;
>  	ceph_decode_need(p, end, struct_len, bad);
>  	*lease = *p;
>  	*p += sizeof(**lease);
> @@ -347,6 +349,7 @@ static int parse_reply_info_lease(void **p, void *end,
>  			*altname_len = 0;
>  		}
>  	}
> +	*p = lend;
>  	return 0;
>  bad:
>  	return -EIO;

Feel free to fold this into the appropriate patch in wip-fscrypt if you
like...

Reviewed-by: Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2022-03-01 14:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-01 14:39 [PATCH v3] ceph: skip the memories when received a higher version of message xiubli
2022-03-01 14:43 ` Jeff Layton [this message]
2022-03-01 14:45   ` Xiubo Li
2022-03-02  6:17   ` Xiubo Li

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=5c32c1228db8bd8916665e02c0bf70d70ba89e4e.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=vshankar@redhat.com \
    --cc=xiubli@redhat.com \
    /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