]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: kick rdlock if waiting for dirfragtreelock
authorPatrick Donnelly <pdonnell@redhat.com>
Sun, 29 Apr 2018 01:42:03 +0000 (18:42 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 30 Apr 2018 17:04:08 +0000 (10:04 -0700)
Fixes: https://tracker.ceph.com/issues/23919
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/MDCache.cc

index 6803eeadee2ff23714bf4ac173f0880091f8cb2a..a471996bc023168d89fdd41ed3564911dbcaca74 100644 (file)
@@ -6900,8 +6900,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;