Skip to content

Commit af71de4

Browse files
authored
Merge pull request ceph#57689 from kotreshhr/fix_unpack_first_damage
tools/first-damage: Fix struct unpack Reviewed-by: Venky Shankar <[email protected]>
2 parents 9637ffe + df2d65c commit af71de4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/cephfs/first-damage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ def traverse(MEMO, ioctx):
8585
nkey = None
8686
for (dnk, val) in it:
8787
log.debug(f'\t{dnk}: val size {len(val)}')
88-
(first,) = struct.unpack('<I', val[:4])
88+
(first,) = struct.unpack('<Q', val[:8])
89+
log.debug(f'\t{dnk}: first {first}')
8990
if first > NEXT_SNAP:
9091
log.warning(f"found {o.key}:{dnk} first (0x{first:x}) > NEXT_SNAP (0x{NEXT_SNAP:x})")
9192
if REPAIR_NOSNAP and dnk.endswith(b"_head") and first == CEPH_NOSNAP:

0 commit comments

Comments
 (0)