]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: save the metadata pool id MDSRank class's private member 42059/head
authorXiubo Li <xiubli@redhat.com>
Tue, 11 May 2021 04:03:51 +0000 (12:03 +0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 28 Jun 2021 19:29:32 +0000 (12:29 -0700)
commitefe814561a4a3a3cd9c27d2671a1cbcff8a309b3
tree8d7b2c381e42ab25d3d02e3bc030ca84f6f3db8e
parent2e1902f3a43860da461e68ebea5ef8dd48418278
mds: save the metadata pool id MDSRank class's private member

There is one rare case that when mds daemon received a new mdsmap
and during decoding it, the metadata_pool will be reset to -1, if
other threads try to get it from old mdsmap it will get a invalid
pool id.

This can also help get rid of the mds_lock else where.

Fixes: https://tracker.ceph.com/issues/50389
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 5cc44b63f433c29c6fb933ae3072ac6270e7d333)
src/mds/CDir.cc
src/mds/CInode.cc
src/mds/MDBalancer.cc
src/mds/MDCache.cc
src/mds/MDLog.cc
src/mds/MDSRank.cc
src/mds/MDSRank.h
src/mds/MDSTable.cc
src/mds/OpenFileTable.cc
src/mds/Server.cc
src/mds/SessionMap.cc