From: Kotresh HR Date: Fri, 24 May 2024 07:02:32 +0000 (+0530) Subject: tools/first-damage: Don't skip stray directory object X-Git-Tag: v20.0.0~1852^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8d11b078ac6a18e7c2626d06edda26d5ac5d5438;p=ceph.git tools/first-damage: Don't skip stray directory object Signed-off-by: Kotresh HR --- diff --git a/src/tools/cephfs/first-damage.py b/src/tools/cephfs/first-damage.py index 23dc503297692..fbfcc36fd5b57 100644 --- a/src/tools/cephfs/first-damage.py +++ b/src/tools/cephfs/first-damage.py @@ -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: