From f3c0424bb583423db80009c29f73e484aad840b4 Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Mon, 25 Sep 2023 18:19:50 +0530 Subject: [PATCH] mds: do not simplify fragset Problem: Frags in simplified fragset aren't found as is on the replica during scrub. fragset::simplify() computes the bit representation of the least common ancestor of the frags. When this representation is forwarded to the replicas, the ScrubStack::handle_scrub() method in the OP_QUEUEDIR case simply searches this simplified representation in the list of (unsimplified) frags ... which it fails to find. Hence we get to see the "no frag 10*" type of logs. Solution: Do not simplify fragset when forwarding fragset to replica for scrub. Fixes: https://tracker.ceph.com/issues/62658 Signed-off-by: Milind Changire --- src/mds/ScrubStack.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mds/ScrubStack.cc b/src/mds/ScrubStack.cc index 6d799343f14..742c464f4d3 100644 --- a/src/mds/ScrubStack.cc +++ b/src/mds/ScrubStack.cc @@ -320,7 +320,7 @@ void ScrubStack::scrub_dir_inode(CInode *in, bool *added_children, bool *done) frag_vec_t frags; in->dirfragtree.get_leaves(frags); - dout(20) << __func__ << "recursive mode, frags " << frags << dendl; + dout(20) << __func__ << " recursive mode, frags " << frags << dendl; for (auto &fg : frags) { if (queued.contains(fg)) continue; @@ -366,7 +366,6 @@ void ScrubStack::scrub_dir_inode(CInode *in, bool *added_children, bool *done) scrub_r.tag = header->get_tag(); for (auto& p : scrub_remote) { - p.second.simplify(); dout(20) << __func__ << " forward " << p.second << " to mds." << p.first << dendl; auto r = make_message(MMDSScrub::OP_QUEUEDIR, in->ino(), std::move(p.second), header->get_tag(), -- 2.39.5