ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: xiubli@redhat.com
Cc: idryomov@gmail.com, vshankar@redhat.com, pdonnell@redhat.com,
	khiremat@redhat.com, ceph-devel@vger.kernel.org
Subject: Re: [PATCH] ceph: fix incorrectly decoding the mdsmap bug
Date: Fri, 05 Nov 2021 06:29:48 -0400	[thread overview]
Message-ID: <a8651d8cec901eff76d35f2ef9d05b093d1e1d1a.camel@kernel.org> (raw)
In-Reply-To: <20211105093418.261469-1-xiubli@redhat.com>

On Fri, 2021-11-05 at 17:34 +0800, xiubli@redhat.com wrote:
> From: Xiubo Li <xiubli@redhat.com>
> 
> When decreasing the 'max_mds' in the cephfs cluster, when the extra
> MDS or MDSes are not removed yet, the mdsmap may only decreased the
> 'max_mds' but still having the that or those MDSes 'in' or in the
> export targets list.
> 
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---
>  fs/ceph/mdsmap.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/fs/ceph/mdsmap.c b/fs/ceph/mdsmap.c
> index 61d67cbcb367..30387733765d 100644
> --- a/fs/ceph/mdsmap.c
> +++ b/fs/ceph/mdsmap.c
> @@ -263,10 +263,6 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end, bool msgr2)
>  				goto nomem;
>  			for (j = 0; j < num_export_targets; j++) {
>  				target = ceph_decode_32(&pexport_targets);
> -				if (target >= m->possible_max_rank) {
> -					err = -EIO;
> -					goto corrupt;
> -				}
>  				info->export_targets[j] = target;
>  			}
>  		} else {

Thanks Xiubo, looks good. Given the severity when mdsmap decoding fails,
I think we should probably mark this for stable too. Let me know if you
have any objections.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2021-11-05 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05  9:34 [PATCH] ceph: fix incorrectly decoding the mdsmap bug xiubli
2021-11-05 10:29 ` Jeff Layton [this message]
2021-11-05 13:22   ` 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=a8651d8cec901eff76d35f2ef9d05b093d1e1d1a.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=khiremat@redhat.com \
    --cc=pdonnell@redhat.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;
as well as URLs for NNTP newsgroup(s).