From: Yan, Zheng Date: Mon, 1 Feb 2021 05:54:04 +0000 (+0800) Subject: mds: don't start purging inodes in the middle of recovery X-Git-Tag: v17.1.0~2726^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2e72738592a775bf96e33d6bd1b3fd2380b59f0d;p=ceph.git mds: don't start purging inodes in the middle of recovery when mds enter clientreplay/active state, it will start purging each log segments' purging_inodes. Signed-off-by: "Yan, Zheng" Fixes: https://tracker.ceph.com/issues/49074 --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 61a67d8a50ec..6da8bb93db53 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -820,7 +820,8 @@ void Server::_session_logged(Session *session, uint64_t state_seq, bool open, ve ceph_assert(ls); session->info.prealloc_inos.subtract(inos_to_purge); ls->purging_inodes.insert(inos_to_purge); - mdcache->purge_inodes(inos_to_purge, ls); + if (mds->is_clientreplay() || mds->is_active() || mds->is_stopping()) + mdcache->purge_inodes(inos_to_purge, ls); } if (inos_to_free.size()) {