xfs: compact deferred intent item structures
authorDarrick J. Wong <djwong@kernel.org>
Tue, 12 Oct 2021 22:29:33 +0000 (15:29 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 22 Oct 2021 23:04:36 +0000 (16:04 -0700)
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 <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
fs/xfs/libxfs/xfs_bmap.h
fs/xfs/libxfs/xfs_refcount.h
fs/xfs/libxfs/xfs_rmap.h

index 2cd7717cf7531e4d5d975eda8edb22908a3e1067..db01fe83bb8ae767cc816d9a9f655273b241c969 100644 (file)
@@ -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;
 };
 
index 02cb3aa405be5119a5c6b687aae14922fc9b4925..894045968bc6a1078850699bf7c0f779f19e2fff 100644 (file)
@@ -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,
index fd67904ed446fea5d21e1b58932d587568c114dd..85dd98ac3f12f6030ed2875c4f3add21caca8fba 100644 (file)
@@ -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;
 };