]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_db: print freecount in xfs_inobt_rec as unsigned
authorEric Sandeen <sandeen@redhat.com>
Tue, 30 Oct 2018 21:51:59 +0000 (16:51 -0500)
committerEric Sandeen <sandeen@redhat.com>
Tue, 30 Oct 2018 21:51:59 +0000 (16:51 -0500)
commitcb5de90b6c641ebaa9e2ccad7f6c121a2967fbf2
treef4413e9a628a2511bf37c9a832245365de3b644c
parent7cf2aa1adc94093331f4ad0139c637b392765a0c
xfs_db: print freecount in xfs_inobt_rec as unsigned

"freecount" in the xfs_inobt_rec is unsigned, so xfs_db should
print it as such.

Not doing so tickles a bug in getbitval() where we try to handle
sign extension for signed fields and fail badly on big endian
machines, causing us to incorrectly report negative numbers when
printing structures even when the number is nowhere near the
signed maximum value.

So this fix works around that bug by properly marking this field
as unsigned, because I have yet to convince myself of the proper
fix for the underlying bug.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201453
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/btblock.c