]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_logprint: Fix super block buffer interpretation issue
authorChi Zhiling <chizhiling@kylinos.cn>
Thu, 16 Jan 2025 09:09:39 +0000 (17:09 +0800)
committerAndrey Albershteyn <aalbersh@kernel.org>
Fri, 24 Jan 2025 11:32:01 +0000 (12:32 +0100)
commit3eb8c349c5cda8f95ef390b1b08cc05328896ad8
tree9be3d47bc4619a7e5e7142b5c8286bcbc63b9316
parent34738ff0ee80de73c4fd3078a89a7bef39be46b6
xfs_logprint: Fix super block buffer interpretation issue

When using xfs_logprint to interpret the buffer of the super block, the
icount will always be 6360863066640355328 (0x5846534200001000). This is
because the offset of icount is incorrect, causing xfs_logprint to
misinterpret the MAGIC number as icount.
This patch fixes the offset value of the SB counters in xfs_logprint.

Before this patch:
icount: 6360863066640355328  ifree: 5242880  fdblks: 0  frext: 0

After this patch:
icount: 10240  ifree: 4906  fdblks: 37  frext: 0

Suggested-by: Darrick J. Wong <djwong@kernel.org>
Suggested-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Chi Zhiling <chizhiling@kylinos.cn>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
logprint/log_misc.c
logprint/log_print_all.c