]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: do not path traverse a damaged dirfrag
authorPatrick Donnelly <pdonnell@ibm.com>
Tue, 28 Jan 2025 18:06:36 +0000 (13:06 -0500)
committerIgor Golikov <igolikov@redhat.com>
Wed, 15 Oct 2025 11:53:51 +0000 (11:53 +0000)
Fixes: https://tracker.ceph.com/issues/69695
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 3243af47d60558227263203cdc4f9b9f0ebb3f5e)

Conflicts:
src/mds/MDCache.cc: no pdir

src/mds/MDCache.cc

index e4eab741d82fd13012f0c809c8454c420a82b6f9..810d568ef13f0174363408b4413c31ab201debbf 100644 (file)
@@ -8388,6 +8388,12 @@ int MDCache::path_traverse(MDRequestRef& mdr, MDSContextFactory& cf,
     }
     ceph_assert(curdir);
 
+    if (mds->damage_table.is_dirfrag_damaged(curdir)) {
+      dout(4) << "traverse: stopped lookup at dirfrag "
+              << *curdir << "/" << path[depth] << " snap=" << snapid << dendl;
+      return -CEPHFS_EIO;
+    }
+
 #ifdef MDS_VERIFY_FRAGSTAT
     if (curdir->is_complete())
       curdir->verify_fragstat();