From: Kotresh HR Date: Fri, 24 May 2024 08:08:24 +0000 (+0530) Subject: tools/first-damage: Fix struct unpack X-Git-Tag: v20.0.0~1870^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=df2d65c5ae9d593366d74b22b0565941e678e6c9;p=ceph.git 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 --- diff --git a/src/tools/cephfs/first-damage.py b/src/tools/cephfs/first-damage.py index 23dc503297692..b8bfdf9271d80 100644 --- a/src/tools/cephfs/first-damage.py +++ b/src/tools/cephfs/first-damage.py @@ -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(' 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: