Skip to content

Commit 6dc5a60

Browse files
committed
Merge PR ceph#54202 into main
* refs/pull/54202/head: mds: fix `dump dir` indicate dir is not cached Reviewed-by: Venky Shankar <[email protected]> Reviewed-by: Dhairya Parmar <[email protected]>
2 parents 9fd7ad5 + 5fb2f98 commit 6dc5a60

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/mds/MDSRank.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3388,8 +3388,14 @@ void MDSRank::command_dump_dir(Formatter *f, const cmdmap_t &cmdmap, std::ostrea
33883388
in->dirfragtree.get_leaves_under(frag_t(), leaves);
33893389
for (const auto& leaf : leaves) {
33903390
CDir *dir = in->get_dirfrag(leaf);
3391-
if (dir)
3391+
if (dir) {
33923392
mdcache->dump_dir(f, dir, dentry_dump);
3393+
} else {
3394+
f->open_object_section("frag");
3395+
f->dump_stream("frag") << leaf;
3396+
f->dump_string("status", "dirfrag not in cache");
3397+
f->close_section();
3398+
}
33933399
}
33943400
f->close_section();
33953401
}

0 commit comments

Comments
 (0)