Skip to content

Commit 3243af4

Browse files
committed
mds: do not path traverse a damaged dirfrag
Fixes: https://tracker.ceph.com/issues/69695 Signed-off-by: Patrick Donnelly <[email protected]>
1 parent c4bd819 commit 3243af4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/mds/MDCache.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8452,6 +8452,13 @@ int MDCache::path_traverse(const MDRequestRef& mdr, MDSContextFactory& cf,
84528452
}
84538453
}
84548454
ceph_assert(curdir);
8455+
8456+
if (mds->damage_table.is_dirfrag_damaged(curdir)) {
8457+
dout(4) << "traverse: stopped lookup at dirfrag "
8458+
<< *curdir << "/" << path[depth] << " snap=" << snapid << dendl;
8459+
return -CEPHFS_EIO;
8460+
}
8461+
84558462
if (pdir) {
84568463
*pdir = curdir;
84578464
}

0 commit comments

Comments
 (0)