diff mbox series

[1/7] xfs: introduce new private btree cursor names

Message ID 20200305014537.11236-2-david@fromorbit.com (mailing list archive)
State Superseded
Headers show
Series xfs: make btree cursor private unions anonymous | expand

Commit Message

Dave Chinner March 5, 2020, 1:45 a.m. UTC
From: Dave Chinner <dchinner@redhat.com>

Just the defines of the new names - the conversion will be in
scripted commits after this.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 fs/xfs/libxfs/xfs_btree.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Darrick J. Wong March 5, 2020, 2:29 a.m. UTC | #1
On Thu, Mar 05, 2020 at 12:45:31PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> Just the defines of the new names - the conversion will be in
> scripted commits after this.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
>  fs/xfs/libxfs/xfs_btree.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h
> index 3eff7c321d43..bd5a2bfca64e 100644
> --- a/fs/xfs/libxfs/xfs_btree.h
> +++ b/fs/xfs/libxfs/xfs_btree.h
> @@ -224,6 +224,8 @@ typedef struct xfs_btree_cur
>  #define	XFS_BTCUR_BPRV_INVALID_OWNER	(1<<1)		/* for ext swap */
>  		} b;
>  	}		bc_private;	/* per-btree type data */
> +#define bc_ag	bc_private.a
> +#define bc_bt	bc_private.b

Hm. I get that the historical meaning of "b" was for "bmbt", but it's
not a great descriptor since the fields in bc_private.b are really for
inode-rooted btrees, of which the bmbt is currently the only user.  If
we ever get around to adding the realtime rmapbt, then "bc_bt" is going
to seem a bit anachronistic.

bc_ino, perhaps?

--D

>  } xfs_btree_cur_t;
>  
>  /* cursor flags */
> -- 
> 2.24.0.rc0
>
Dave Chinner March 5, 2020, 2:47 a.m. UTC | #2
On Wed, Mar 04, 2020 at 06:29:01PM -0800, Darrick J. Wong wrote:
> On Thu, Mar 05, 2020 at 12:45:31PM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> > 
> > Just the defines of the new names - the conversion will be in
> > scripted commits after this.
> > 
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > ---
> >  fs/xfs/libxfs/xfs_btree.h | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h
> > index 3eff7c321d43..bd5a2bfca64e 100644
> > --- a/fs/xfs/libxfs/xfs_btree.h
> > +++ b/fs/xfs/libxfs/xfs_btree.h
> > @@ -224,6 +224,8 @@ typedef struct xfs_btree_cur
> >  #define	XFS_BTCUR_BPRV_INVALID_OWNER	(1<<1)		/* for ext swap */
> >  		} b;
> >  	}		bc_private;	/* per-btree type data */
> > +#define bc_ag	bc_private.a
> > +#define bc_bt	bc_private.b
> 
> Hm. I get that the historical meaning of "b" was for "bmbt", but it's
> not a great descriptor since the fields in bc_private.b are really for
> inode-rooted btrees, of which the bmbt is currently the only user.  If
> we ever get around to adding the realtime rmapbt, then "bc_bt" is going
> to seem a bit anachronistic.
> 
> bc_ino, perhaps?

Sure, makes no difference to me. It's just a case of running sed
over all the patches before I rebase the series...

Cheers,

Dave.
diff mbox series

Patch

diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h
index 3eff7c321d43..bd5a2bfca64e 100644
--- a/fs/xfs/libxfs/xfs_btree.h
+++ b/fs/xfs/libxfs/xfs_btree.h
@@ -224,6 +224,8 @@  typedef struct xfs_btree_cur
 #define	XFS_BTCUR_BPRV_INVALID_OWNER	(1<<1)		/* for ext swap */
 		} b;
 	}		bc_private;	/* per-btree type data */
+#define bc_ag	bc_private.a
+#define bc_bt	bc_private.b
 } xfs_btree_cur_t;
 
 /* cursor flags */