]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: no assert on frozen dir when scrub path 32071/head
authorZhi Zhang <willzzhang@tencent.com>
Fri, 11 Oct 2019 03:10:48 +0000 (11:10 +0800)
committerNathan Cutler <ncutler@suse.com>
Fri, 6 Dec 2019 13:16:54 +0000 (14:16 +0100)
It's too strict and unnecessary for asok command "scrub_path" to
assert when it checked a frozen dir's rstat, just return false instead.

Fixes: https://tracker.ceph.com/issues/42251
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
(cherry picked from commit 76cb4da65ddca986e1515f4a85e6976f20f26a9b)

src/mds/CDir.cc

index d3461fba2e0707e84bf580c356a6a74432dd6e06..ead659fcca1c95df8e72082ff1e3002c9ebd9147 100644 (file)
@@ -229,9 +229,10 @@ bool CDir::check_rstats(bool scrub)
 
   dout(25) << "check_rstats on " << this << dendl;
   if (!is_complete() || !is_auth() || is_frozen()) {
-    ceph_assert(!scrub);
-    dout(10) << "check_rstats bailing out -- incomplete or non-auth or frozen dir!" << dendl;
-    return true;
+    dout(3) << "check_rstats " << (scrub ? "(scrub) " : "")
+            << "bailing out -- incomplete or non-auth or frozen dir on " 
+            << *this << dendl;
+    return !scrub;
   }
 
   frag_info_t frag_info;