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>
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: