mirror of
https://github.com/ceph/ceph
synced 2024-12-18 17:37:38 +00:00
tools/first-damage: Fix struct unpack
The first field is a 64 bit integer, the script was unpacking it as 32 bit integer. Fixed the same. Also printing the 'first' value in debug Signed-off-by: Kotresh HR <khiremat@redhat.com>
This commit is contained in:
parent
9637ffe6f9
commit
df2d65c5ae
@ -85,7 +85,8 @@ def traverse(MEMO, ioctx):
|
||||
nkey = None
|
||||
for (dnk, val) in it:
|
||||
log.debug(f'\t{dnk}: val size {len(val)}')
|
||||
(first,) = struct.unpack('<I', val[:4])
|
||||
(first,) = struct.unpack('<Q', val[:8])
|
||||
log.debug(f'\t{dnk}: first {first}')
|
||||
if first > NEXT_SNAP:
|
||||
log.warning(f"found {o.key}:{dnk} first (0x{first:x}) > NEXT_SNAP (0x{NEXT_SNAP:x})")
|
||||
if REPAIR_NOSNAP and dnk.endswith(b"_head") and first == CEPH_NOSNAP:
|
||||
|
Loading…
Reference in New Issue
Block a user