Skip to content

Commit 0e24421

Browse files
lxbszidryomov
authored andcommitted
ceph: fix mdsmap decode when there are MDS's beyond max_mds
If the max_mds is decreased in a cephfs cluster, there is a window of time before the MDSs are removed. If a map goes out during this period, the mdsmap may show the decreased max_mds but still shows those MDSes as in or in the export target list. Ensure that we don't fail the map decode in that case. Cc: [email protected] URL: https://tracker.ceph.com/issues/52436 Fixes: d517b39 ("ceph: reconnect to the export targets on new mdsmaps") Signed-off-by: Xiubo Li <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent e90334e commit 0e24421

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

fs/ceph/mdsmap.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,6 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end, bool msgr2)
263263
goto nomem;
264264
for (j = 0; j < num_export_targets; j++) {
265265
target = ceph_decode_32(&pexport_targets);
266-
if (target >= m->possible_max_rank) {
267-
err = -EIO;
268-
goto corrupt;
269-
}
270266
info->export_targets[j] = target;
271267
}
272268
} else {

0 commit comments

Comments
 (0)