]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/first-damage: Don't skip stray directory object 57688/head
authorKotresh HR <khiremat@redhat.com>
Fri, 24 May 2024 07:02:32 +0000 (12:32 +0530)
committerKotresh HR <khiremat@redhat.com>
Fri, 24 May 2024 07:19:53 +0000 (12:49 +0530)
Signed-off-by: Kotresh HR <khiremat@redhat.com>
src/tools/cephfs/first-damage.py

index 23dc5032976927e90086fed98fe3906eef5a9778..fbfcc36fd5b5723a437754e3152547272bcb8320 100644 (file)
@@ -64,12 +64,15 @@ ROOT_INODE  = "1.00000000"
 LOST_FOUND_INODE  = "4.00000000"
 
 DIR_PATTERN = re.compile(r'[0-9a-fA-F]{8,}\.[0-9a-fA-F]+')
+STRAY_DIR_PATTERN = re.compile(r'6[0-9a-fA-F]{2,}\.[0-9a-fA-F]+')
 
 CACHE = set()
 
 def traverse(MEMO, ioctx):
     for o in ioctx.list_objects():
-        if not DIR_PATTERN.fullmatch(o.key) and o.key not in [ROOT_INODE, LOST_FOUND_INODE]:
+        if (not DIR_PATTERN.fullmatch(o.key) and
+            not STRAY_DIR_PATTERN.fullmatch(o.key)
+            and o.key not in [ROOT_INODE, LOST_FOUND_INODE]):
             log.debug("skipping %s", o.key)
             continue
         elif o.key in CACHE: