]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: fix printing of reverse mapping record blockcounts
authorDarrick J. Wong <djwong@kernel.org>
Wed, 23 Nov 2022 17:09:22 +0000 (09:09 -0800)
committerCarlos Maiolino <cem@kernel.org>
Fri, 9 Dec 2022 09:18:19 +0000 (10:18 +0100)
FLDT_EXTLEN is the correct type for a 32-bit block count within an AG;
FLDT_REXTLEN is the type for a 21-bit file mapping block count.  This
code should have been using the first type, not the second.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
db/btblock.c

index 24c6566980f9b4f7ec2fc87fff573f4fd5466ef9..c563fb0389a055d05b6e38daf00598e72429a727 100644 (file)
@@ -727,7 +727,7 @@ const field_t       rmapbt_key_flds[] = {
 
 const field_t  rmapbt_rec_flds[] = {
        { "startblock", FLDT_AGBLOCK, OI(RMAPBT_STARTBLOCK_BITOFF), C1, 0, TYP_DATA },
-       { "blockcount", FLDT_REXTLEN, OI(RMAPBT_BLOCKCOUNT_BITOFF), C1, 0, TYP_NONE },
+       { "blockcount", FLDT_EXTLEN, OI(RMAPBT_BLOCKCOUNT_BITOFF), C1, 0, TYP_NONE },
        { "owner", FLDT_INT64D, OI(RMAPBT_OWNER_BITOFF), C1, 0, TYP_NONE },
        { "offset", FLDT_RFILEOFFD, OI(RMAPBT_OFFSET_BITOFF), C1, 0, TYP_NONE },
        { "extentflag", FLDT_REXTFLG, OI(RMAPBT_EXNTFLAG_BITOFF), C1, 0,