summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_btree.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2020-03-11 01:57:51 +0100
committerDarrick J. Wong <darrick.wong@oracle.com>2020-03-13 18:37:15 +0100
commitc4aa10d041968f55f00fe8ca768b6f45f4066a69 (patch)
tree95c8b2e353fc6ce34799652109068db21265262d /fs/xfs/libxfs/xfs_btree.h
parentxfs: make the btree cursor union members named structure (diff)
downloadlinux-c4aa10d041968f55f00fe8ca768b6f45f4066a69.tar.xz
linux-c4aa10d041968f55f00fe8ca768b6f45f4066a69.zip
xfs: make the btree ag cursor private union anonymous
This is much less widely used than the bc_private union was, so this is done as a single patch. The named union xfs_btree_cur_private goes away and is embedded into the struct xfs_btree_cur_ag as an anonymous union, and the code is modified via this script: $ sed -i 's/priv\.\([abt|refc]\)/\1/g' fs/xfs/*[ch] fs/xfs/*/*[ch] Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree.h')
-rw-r--r--fs/xfs/libxfs/xfs_btree.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h
index 8fd458947320..133b858bf096 100644
--- a/fs/xfs/libxfs/xfs_btree.h
+++ b/fs/xfs/libxfs/xfs_btree.h
@@ -177,22 +177,19 @@ union xfs_btree_irec {
struct xfs_refcount_irec rc;
};
-/* Per-AG btree private information. */
-union xfs_btree_cur_private {
- struct {
- unsigned long nr_ops; /* # record updates */
- int shape_changes; /* # of extent splits */
- } refc;
- struct {
- bool active; /* allocation cursor state */
- } abt;
-};
-
/* Per-AG btree information. */
struct xfs_btree_cur_ag {
- struct xfs_buf *agbp;
- xfs_agnumber_t agno;
- union xfs_btree_cur_private priv;
+ struct xfs_buf *agbp;
+ xfs_agnumber_t agno;
+ union {
+ struct {
+ unsigned long nr_ops; /* # record updates */
+ int shape_changes; /* # of extent splits */
+ } refc;
+ struct {
+ bool active; /* allocation cursor state */
+ } abt;
+ };
};
/* Btree-in-inode cursor information */