Skip to content

Commit ae21c15

Browse files
committed
Merge PR ceph#57688 into main
* refs/pull/57688/head: tools/first-damage: Don't skip stray directory object Reviewed-by: Dhairya Parmar <[email protected]> Reviewed-by: Venky Shankar <[email protected]> Reviewed-by: Patrick Donnelly <[email protected]>
2 parents 25e4ee2 + 8d11b07 commit ae21c15

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tools/cephfs/first-damage.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,15 @@
6464
LOST_FOUND_INODE = "4.00000000"
6565

6666
DIR_PATTERN = re.compile(r'[0-9a-fA-F]{8,}\.[0-9a-fA-F]+')
67+
STRAY_DIR_PATTERN = re.compile(r'6[0-9a-fA-F]{2,}\.[0-9a-fA-F]+')
6768

6869
CACHE = set()
6970

7071
def traverse(MEMO, ioctx):
7172
for o in ioctx.list_objects():
72-
if not DIR_PATTERN.fullmatch(o.key) and o.key not in [ROOT_INODE, LOST_FOUND_INODE]:
73+
if (not DIR_PATTERN.fullmatch(o.key) and
74+
not STRAY_DIR_PATTERN.fullmatch(o.key)
75+
and o.key not in [ROOT_INODE, LOST_FOUND_INODE]):
7376
log.debug("skipping %s", o.key)
7477
continue
7578
elif o.key in CACHE:

0 commit comments

Comments
 (0)