From 43395d6a56e1dd57a00c223ab18e30a0101f3830 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 6 Jan 2022 14:13:23 -0800 Subject: [PATCH] xfs: compact deferred intent item structures Source kernel commit: 9e253954acf53227f33d307f5ac5ff94c1ca5880 Rearrange these structs to reduce the amount of unused padding bytes. This saves eight bytes for each of the three structs changed here, which means they're now all (rmap/bmap are 64 bytes, refc is 32 bytes) even powers of two. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Signed-off-by: Darrick J. Wong --- libxfs/xfs_bmap.h | 2 +- libxfs/xfs_refcount.h | 2 +- libxfs/xfs_rmap.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libxfs/xfs_bmap.h b/libxfs/xfs_bmap.h index 2cd7717cf..db01fe83b 100644 --- a/libxfs/xfs_bmap.h +++ b/libxfs/xfs_bmap.h @@ -257,8 +257,8 @@ enum xfs_bmap_intent_type { struct xfs_bmap_intent { struct list_head bi_list; enum xfs_bmap_intent_type bi_type; - struct xfs_inode *bi_owner; int bi_whichfork; + struct xfs_inode *bi_owner; struct xfs_bmbt_irec bi_bmap; }; diff --git a/libxfs/xfs_refcount.h b/libxfs/xfs_refcount.h index 02cb3aa40..894045968 100644 --- a/libxfs/xfs_refcount.h +++ b/libxfs/xfs_refcount.h @@ -32,8 +32,8 @@ enum xfs_refcount_intent_type { struct xfs_refcount_intent { struct list_head ri_list; enum xfs_refcount_intent_type ri_type; - xfs_fsblock_t ri_startblock; xfs_extlen_t ri_blockcount; + xfs_fsblock_t ri_startblock; }; void xfs_refcount_increase_extent(struct xfs_trans *tp, diff --git a/libxfs/xfs_rmap.h b/libxfs/xfs_rmap.h index fd67904ed..85dd98ac3 100644 --- a/libxfs/xfs_rmap.h +++ b/libxfs/xfs_rmap.h @@ -159,8 +159,8 @@ enum xfs_rmap_intent_type { struct xfs_rmap_intent { struct list_head ri_list; enum xfs_rmap_intent_type ri_type; - uint64_t ri_owner; int ri_whichfork; + uint64_t ri_owner; struct xfs_bmbt_irec ri_bmap; }; -- 2.47.3