xfs: reduce the size of nr_ops for refcount btree cursors
authorDarrick J. Wong <djwong@kernel.org>
Thu, 23 Sep 2021 16:41:13 +0000 (09:41 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 19 Oct 2021 18:45:14 +0000 (11:45 -0700)
We're never going to run more than 4 billion btree operations on a
refcount cursor, so shrink the field to an unsigned int to reduce the
structure size.  Fix whitespace alignment too.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_btree.h

index 49ecc496238fb8f9bf43ad4a3e753c361ad73837..1018bcc43d660a1ddb3a2fdac67417cbd62d43ed 100644 (file)
@@ -181,18 +181,18 @@ union xfs_btree_irec {
 
 /* Per-AG btree information. */
 struct xfs_btree_cur_ag {
-       struct xfs_perag        *pag;
+       struct xfs_perag                *pag;
        union {
                struct xfs_buf          *agbp;
                struct xbtree_afakeroot *afake; /* for staging cursor */
        };
        union {
                struct {
-                       unsigned long nr_ops;   /* # record updates */
-                       int     shape_changes;  /* # of extent splits */
+                       unsigned int    nr_ops; /* # record updates */
+                       unsigned int    shape_changes;  /* # of extent splits */
                } refc;
                struct {
-                       bool    active;         /* allocation cursor state */
+                       bool            active; /* allocation cursor state */
                } abt;
        };
 };