From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org, david@fromorbit.com,
Dave Chinner <dchinner@redhat.com>
Subject: Re: [PATCH 4/7] xfs: rename btree cursor private btree member flags
Date: Thu, 12 Mar 2020 06:42:15 -0400 [thread overview]
Message-ID: <20200312104215.GD60753@bfoster> (raw)
In-Reply-To: <158398470751.1307855.8464463416155765479.stgit@magnolia>
On Wed, Mar 11, 2020 at 08:45:07PM -0700, Darrick J. Wong wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> BPRV is not longer appropriate because bc_private is going away.
> Script:
>
> $ sed -i 's/BTCUR_BPRV/BTCUR_BMBT/g' fs/xfs/*[ch] fs/xfs/*/*[ch]
>
> With manual cleanup to the definitions in fs/xfs/libxfs/xfs_btree.h
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> [darrick: change "BC_BT" to "BTCUR_BMBT", fix subject line typo]
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/libxfs/xfs_bmap.c | 8 ++++----
> fs/xfs/libxfs/xfs_bmap_btree.c | 4 ++--
> fs/xfs/libxfs/xfs_btree.c | 2 +-
> fs/xfs/libxfs/xfs_btree.h | 4 ++--
> 4 files changed, 9 insertions(+), 9 deletions(-)
>
>
> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
> index fc8f6d65576c..8057486c02b5 100644
> --- a/fs/xfs/libxfs/xfs_bmap.c
> +++ b/fs/xfs/libxfs/xfs_bmap.c
> @@ -690,7 +690,7 @@ xfs_bmap_extents_to_btree(
> * Need a cursor. Can't allocate until bb_level is filled in.
> */
> cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork);
> - cur->bc_ino.flags = wasdel ? XFS_BTCUR_BPRV_WASDEL : 0;
> + cur->bc_ino.flags = wasdel ? XFS_BTCUR_BMBT_WASDEL : 0;
> /*
> * Convert to a btree with two levels, one record in root.
> */
> @@ -1528,7 +1528,7 @@ xfs_bmap_add_extent_delay_real(
>
> ASSERT(!isnullstartblock(new->br_startblock));
> ASSERT(!bma->cur ||
> - (bma->cur->bc_ino.flags & XFS_BTCUR_BPRV_WASDEL));
> + (bma->cur->bc_ino.flags & XFS_BTCUR_BMBT_WASDEL));
>
> XFS_STATS_INC(mp, xs_add_exlist);
>
> @@ -2752,7 +2752,7 @@ xfs_bmap_add_extent_hole_real(
> struct xfs_bmbt_irec old;
>
> ASSERT(!isnullstartblock(new->br_startblock));
> - ASSERT(!cur || !(cur->bc_ino.flags & XFS_BTCUR_BPRV_WASDEL));
> + ASSERT(!cur || !(cur->bc_ino.flags & XFS_BTCUR_BMBT_WASDEL));
>
> XFS_STATS_INC(mp, xs_add_exlist);
>
> @@ -4188,7 +4188,7 @@ xfs_bmapi_allocate(
>
> if (bma->cur)
> bma->cur->bc_ino.flags =
> - bma->wasdel ? XFS_BTCUR_BPRV_WASDEL : 0;
> + bma->wasdel ? XFS_BTCUR_BMBT_WASDEL : 0;
>
> bma->got.br_startoff = bma->offset;
> bma->got.br_startblock = bma->blkno;
> diff --git a/fs/xfs/libxfs/xfs_bmap_btree.c b/fs/xfs/libxfs/xfs_bmap_btree.c
> index 71b60f2a9979..295a59cf8840 100644
> --- a/fs/xfs/libxfs/xfs_bmap_btree.c
> +++ b/fs/xfs/libxfs/xfs_bmap_btree.c
> @@ -230,7 +230,7 @@ xfs_bmbt_alloc_block(
> }
>
> args.minlen = args.maxlen = args.prod = 1;
> - args.wasdel = cur->bc_ino.flags & XFS_BTCUR_BPRV_WASDEL;
> + args.wasdel = cur->bc_ino.flags & XFS_BTCUR_BMBT_WASDEL;
> if (!args.wasdel && args.tp->t_blk_res == 0) {
> error = -ENOSPC;
> goto error0;
> @@ -644,7 +644,7 @@ xfs_bmbt_change_owner(
> cur = xfs_bmbt_init_cursor(ip->i_mount, tp, ip, whichfork);
> if (!cur)
> return -ENOMEM;
> - cur->bc_ino.flags |= XFS_BTCUR_BPRV_INVALID_OWNER;
> + cur->bc_ino.flags |= XFS_BTCUR_BMBT_INVALID_OWNER;
>
> error = xfs_btree_change_owner(cur, new_owner, buffer_list);
> xfs_btree_del_cursor(cur, error);
> diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
> index 8c6e128c8ae8..4ef9f0b42c7f 100644
> --- a/fs/xfs/libxfs/xfs_btree.c
> +++ b/fs/xfs/libxfs/xfs_btree.c
> @@ -1743,7 +1743,7 @@ xfs_btree_lookup_get_block(
>
> /* Check the inode owner since the verifiers don't. */
> if (xfs_sb_version_hascrc(&cur->bc_mp->m_sb) &&
> - !(cur->bc_ino.flags & XFS_BTCUR_BPRV_INVALID_OWNER) &&
> + !(cur->bc_ino.flags & XFS_BTCUR_BMBT_INVALID_OWNER) &&
> (cur->bc_flags & XFS_BTREE_LONG_PTRS) &&
> be64_to_cpu((*blkp)->bb_u.l.bb_owner) !=
> cur->bc_ino.ip->i_ino)
> diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h
> index 4a1c98bdfaad..00a58ac8b696 100644
> --- a/fs/xfs/libxfs/xfs_btree.h
> +++ b/fs/xfs/libxfs/xfs_btree.h
> @@ -220,8 +220,8 @@ typedef struct xfs_btree_cur
> short forksize; /* fork's inode space */
> char whichfork; /* data or attr fork */
> char flags; /* flags */
> -#define XFS_BTCUR_BPRV_WASDEL (1<<0) /* was delayed */
> -#define XFS_BTCUR_BPRV_INVALID_OWNER (1<<1) /* for ext swap */
> +#define XFS_BTCUR_BMBT_WASDEL (1 << 0) /* was delayed */
> +#define XFS_BTCUR_BMBT_INVALID_OWNER (1 << 1) /* for ext swap */
> } b;
> } bc_private; /* per-btree type data */
> #define bc_ag bc_private.a
>
next prev parent reply other threads:[~2020-03-12 10:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 3:44 [PATCH v2 0/7] xfs: make btree cursor private unions anonymous Darrick J. Wong
2020-03-12 3:44 ` [PATCH 1/7] xfs: introduce new private btree cursor names Darrick J. Wong
2020-03-12 10:41 ` Brian Foster
2020-03-12 3:44 ` [PATCH 2/7] xfs: convert btree cursor ag-private member name Darrick J. Wong
2020-03-12 10:42 ` Brian Foster
2020-03-12 3:45 ` [PATCH 3/7] xfs: convert btree cursor inode-private member names Darrick J. Wong
2020-03-12 10:42 ` Brian Foster
2020-03-12 3:45 ` [PATCH 4/7] xfs: rename btree cursor private btree member flags Darrick J. Wong
2020-03-12 10:42 ` Brian Foster [this message]
2020-03-12 3:45 ` [PATCH 5/7] xfs: make btree cursor private union anonymous Darrick J. Wong
2020-03-12 10:49 ` Brian Foster
2020-03-12 3:45 ` [PATCH 6/7] xfs: make the btree cursor union members named structure Darrick J. Wong
2020-03-12 10:49 ` Brian Foster
2020-03-12 23:44 ` Darrick J. Wong
2020-03-13 4:32 ` Dave Chinner
2020-03-12 3:45 ` [PATCH 7/7] xfs: make the btree ag cursor private union anonymous Darrick J. Wong
2020-03-12 10:49 ` Brian Foster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200312104215.GD60753@bfoster \
--to=bfoster@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=dchinner@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).