]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: kick rdlock if waiting for dirfragtreelock 21901/head
authorPatrick Donnelly <pdonnell@redhat.com>
Sun, 29 Apr 2018 01:42:03 +0000 (18:42 -0700)
committerPrashant D <pdhange@redhat.com>
Wed, 9 May 2018 03:38:20 +0000 (23:38 -0400)
Fixes: https://tracker.ceph.com/issues/23919
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 9e12aa5d3b3757efe7109c055e631b7bfb787871)

src/mds/MDCache.cc

index 7911fd03004b93890ec5ba14c0433497f7e0ac2c..b54f3e1b1bb38795a4cf11ac548e333b5447d43e 100644 (file)
@@ -6742,8 +6742,9 @@ bool MDCache::trim_inode(CDentry *dn, CInode *in, CDir *con, map<mds_rank_t, MCa
     // This is because that unconnected replicas are problematic for
     // subtree migration.
     //
-    if (!in->is_auth() && !in->dirfragtreelock.can_read(-1))
+    if (!in->is_auth() && !mds->locker->rdlock_try(&in->dirfragtreelock, -1, nullptr)) {
       return true;
+    }
 
     // DIR
     list<CDir*> dfls;