]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/cephfs/DataScan: test equality of link including frag
authorPatrick Donnelly <pdonnell@ibm.com>
Wed, 29 Jan 2025 16:23:58 +0000 (11:23 -0500)
committerPatrick Donnelly <pdonnell@ibm.com>
Thu, 30 Jan 2025 04:19:53 +0000 (23:19 -0500)
To address the possibility of two primary links existing in different
fragments.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
src/tools/cephfs/DataScan.cc

index 0da8ff9dede910a39b520c2c25aeccf298c3044d..281af410c2a960c46ad03542df82b44665bbf4bb 100644 (file)
@@ -1291,7 +1291,7 @@ int DataScan::scan_links()
 
     for (auto& q : p.second) {
       // in the middle of dir fragmentation?
-      if (newest.dirino == q.dirino && newest.name == q.name) {
+      if (newest == q) {
        snaps.insert(make_move_iterator(begin(q.snaps)),
                     make_move_iterator(end(q.snaps)));
        continue;