In case the directory was merged but the stale sub directories
maybe still kept in the loaded_anchor_map, then it will add the
sub directores' parent frag CDir, the merged CDir, into the leaves
vector for more than once.
Fixes: https://tracker.ceph.com/issues/48517
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
} else {
frag_vec_t leaves;
diri->dirfragtree.get_leaves_under(fg, leaves);
- if (leaves.empty())
- leaves.push_back(diri->dirfragtree[fg.value()]);
for (auto& leaf : leaves) {
if (diri->is_auth()) {
dir = diri->get_or_open_dirfrag(mdcache, leaf);