ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xiubo Li <xiubli@redhat.com>
To: Jeff Layton <jlayton@kernel.org>
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, 5 Nov 2021 21:22:19 +0800	[thread overview]
Message-ID: <b8cc0800-ff3c-d3e8-bc72-c9b0a1e463dd@redhat.com> (raw)
In-Reply-To: <a8651d8cec901eff76d35f2ef9d05b093d1e1d1a.camel@kernel.org>


On 11/5/21 6:29 PM, Jeff Layton wrote:
> 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.
Yeah, it should be.


      reply	other threads:[~2021-11-05 13:22 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
2021-11-05 13:22   ` Xiubo Li [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=b8cc0800-ff3c-d3e8-bc72-c9b0a1e463dd@redhat.com \
    --to=xiubli@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=khiremat@redhat.com \
    --cc=pdonnell@redhat.com \
    --cc=vshankar@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).