]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: note damaged dentry with first gt last
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 24 Aug 2022 17:12:21 +0000 (13:12 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 30 Mar 2023 02:09:49 +0000 (22:09 -0400)
Only when loaded in cache.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 956eff7e02498511b597aadb85c686b78c44ea8a)

src/mds/CDir.cc

index bf7559df5623f92b36e5bcc62b77c52c30ea0198..b4ac908d55c6a62487d2b09734079d5a557e2abb 100644 (file)
@@ -1771,6 +1771,11 @@ CDentry *CDir::_load_dentry(
            << " [" << first << "," << last << "]"
            << dendl;
 
+  if (first > last) {
+    go_bad_dentry(last, dname);
+    /* try to continue */
+  }
+
   bool stale = false;
   if (snaps && last != CEPH_NOSNAP) {
     set<snapid_t>::const_iterator p = snaps->lower_bound(first);