From: xiubli@redhat.com
To: jlayton@kernel.org
Cc: idryomov@gmail.com, vshankar@redhat.com, pdonnell@redhat.com,
khiremat@redhat.com, ceph-devel@vger.kernel.org,
Xiubo Li <xiubli@redhat.com>
Subject: [PATCH] ceph: fix incorrectly decoding the mdsmap bug
Date: Fri, 5 Nov 2021 17:34:18 +0800 [thread overview]
Message-ID: <20211105093418.261469-1-xiubli@redhat.com> (raw)
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 {
--
2.31.1
next reply other threads:[~2021-11-05 9:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-05 9:34 xiubli [this message]
2021-11-05 10:29 ` [PATCH] ceph: fix incorrectly decoding the mdsmap bug Jeff Layton
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=20211105093418.261469-1-xiubli@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).