From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org,
Allison Collins <allison.henderson@oracle.com>
Subject: Re: [PATCH 4/9] xfs: remove the mappedbno argument to xfs_attr3_leaf_read
Date: Mon, 18 Nov 2019 13:22:58 -0800 [thread overview]
Message-ID: <20191118212258.GY6219@magnolia> (raw)
In-Reply-To: <20191116182214.23711-5-hch@lst.de>
On Sat, Nov 16, 2019 at 07:22:09PM +0100, Christoph Hellwig wrote:
> This argument is always hard coded to -1, so remove it.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Heh, neat!
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> fs/xfs/libxfs/xfs_attr.c | 10 +++++-----
> fs/xfs/libxfs/xfs_attr_leaf.c | 17 ++++++++---------
> fs/xfs/libxfs/xfs_attr_leaf.h | 3 +--
> fs/xfs/xfs_attr_list.c | 5 +++--
> 4 files changed, 17 insertions(+), 18 deletions(-)
>
> diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
> index 510ca6974604..ebe6b0575f40 100644
> --- a/fs/xfs/libxfs/xfs_attr.c
> +++ b/fs/xfs/libxfs/xfs_attr.c
> @@ -589,7 +589,7 @@ xfs_attr_leaf_addname(
> */
> dp = args->dp;
> args->blkno = 0;
> - error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
> + error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, &bp);
> if (error)
> return error;
>
> @@ -715,7 +715,7 @@ xfs_attr_leaf_addname(
> * remove the "old" attr from that block (neat, huh!)
> */
> error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno,
> - -1, &bp);
> + &bp);
> if (error)
> return error;
>
> @@ -769,7 +769,7 @@ xfs_attr_leaf_removename(
> */
> dp = args->dp;
> args->blkno = 0;
> - error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
> + error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, &bp);
> if (error)
> return error;
>
> @@ -813,7 +813,7 @@ xfs_attr_leaf_get(xfs_da_args_t *args)
> trace_xfs_attr_leaf_get(args);
>
> args->blkno = 0;
> - error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
> + error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, &bp);
> if (error)
> return error;
>
> @@ -1173,7 +1173,7 @@ xfs_attr_node_removename(
> ASSERT(state->path.blk[0].bp);
> state->path.blk[0].bp = NULL;
>
> - error = xfs_attr3_leaf_read(args->trans, args->dp, 0, -1, &bp);
> + error = xfs_attr3_leaf_read(args->trans, args->dp, 0, &bp);
> if (error)
> goto out;
>
> diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c
> index 85ec5945d29f..9c0cdb51955e 100644
> --- a/fs/xfs/libxfs/xfs_attr_leaf.c
> +++ b/fs/xfs/libxfs/xfs_attr_leaf.c
> @@ -430,13 +430,12 @@ xfs_attr3_leaf_read(
> struct xfs_trans *tp,
> struct xfs_inode *dp,
> xfs_dablk_t bno,
> - xfs_daddr_t mappedbno,
> struct xfs_buf **bpp)
> {
> int err;
>
> - err = xfs_da_read_buf(tp, dp, bno, mappedbno, bpp,
> - XFS_ATTR_FORK, &xfs_attr3_leaf_buf_ops);
> + err = xfs_da_read_buf(tp, dp, bno, -1, bpp, XFS_ATTR_FORK,
> + &xfs_attr3_leaf_buf_ops);
> if (!err && tp && *bpp)
> xfs_trans_buf_set_type(tp, *bpp, XFS_BLFT_ATTR_LEAF_BUF);
> return err;
> @@ -1159,7 +1158,7 @@ xfs_attr3_leaf_to_node(
> error = xfs_da_grow_inode(args, &blkno);
> if (error)
> goto out;
> - error = xfs_attr3_leaf_read(args->trans, dp, 0, -1, &bp1);
> + error = xfs_attr3_leaf_read(args->trans, dp, 0, &bp1);
> if (error)
> goto out;
>
> @@ -1994,7 +1993,7 @@ xfs_attr3_leaf_toosmall(
> if (blkno == 0)
> continue;
> error = xfs_attr3_leaf_read(state->args->trans, state->args->dp,
> - blkno, -1, &bp);
> + blkno, &bp);
> if (error)
> return error;
>
> @@ -2730,7 +2729,7 @@ xfs_attr3_leaf_clearflag(
> /*
> * Set up the operation.
> */
> - error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
> + error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, &bp);
> if (error)
> return error;
>
> @@ -2797,7 +2796,7 @@ xfs_attr3_leaf_setflag(
> /*
> * Set up the operation.
> */
> - error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
> + error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, &bp);
> if (error)
> return error;
>
> @@ -2859,7 +2858,7 @@ xfs_attr3_leaf_flipflags(
> /*
> * Read the block containing the "old" attr
> */
> - error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp1);
> + error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, &bp1);
> if (error)
> return error;
>
> @@ -2868,7 +2867,7 @@ xfs_attr3_leaf_flipflags(
> */
> if (args->blkno2 != args->blkno) {
> error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno2,
> - -1, &bp2);
> + &bp2);
> if (error)
> return error;
> } else {
> diff --git a/fs/xfs/libxfs/xfs_attr_leaf.h b/fs/xfs/libxfs/xfs_attr_leaf.h
> index 16208a7743df..f4a188e28b7b 100644
> --- a/fs/xfs/libxfs/xfs_attr_leaf.h
> +++ b/fs/xfs/libxfs/xfs_attr_leaf.h
> @@ -108,8 +108,7 @@ int xfs_attr_leaf_order(struct xfs_buf *leaf1_bp,
> struct xfs_buf *leaf2_bp);
> int xfs_attr_leaf_newentsize(struct xfs_da_args *args, int *local);
> int xfs_attr3_leaf_read(struct xfs_trans *tp, struct xfs_inode *dp,
> - xfs_dablk_t bno, xfs_daddr_t mappedbno,
> - struct xfs_buf **bpp);
> + xfs_dablk_t bno, struct xfs_buf **bpp);
> void xfs_attr3_leaf_hdr_from_disk(struct xfs_da_geometry *geo,
> struct xfs_attr3_icleaf_hdr *to,
> struct xfs_attr_leafblock *from);
> diff --git a/fs/xfs/xfs_attr_list.c b/fs/xfs/xfs_attr_list.c
> index 0ec6606149a2..426f93cfb2ea 100644
> --- a/fs/xfs/xfs_attr_list.c
> +++ b/fs/xfs/xfs_attr_list.c
> @@ -380,7 +380,8 @@ xfs_attr_node_list(
> break;
> cursor->blkno = leafhdr.forw;
> xfs_trans_brelse(context->tp, bp);
> - error = xfs_attr3_leaf_read(context->tp, dp, cursor->blkno, -1, &bp);
> + error = xfs_attr3_leaf_read(context->tp, dp, cursor->blkno,
> + &bp);
> if (error)
> return error;
> }
> @@ -500,7 +501,7 @@ xfs_attr_leaf_list(xfs_attr_list_context_t *context)
> trace_xfs_attr_leaf_list(context);
>
> context->cursor->blkno = 0;
> - error = xfs_attr3_leaf_read(context->tp, context->dp, 0, -1, &bp);
> + error = xfs_attr3_leaf_read(context->tp, context->dp, 0, &bp);
> if (error)
> return error;
>
> --
> 2.20.1
>
next prev parent reply other threads:[~2019-11-18 21:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-16 18:22 RFC: clean up the dabuf mappedbno interface Christoph Hellwig
2019-11-16 18:22 ` [PATCH 1/9] xfs: simplify mappedbno case from xfs_da_get_buf and xfs_da_read_buf Christoph Hellwig
2019-11-18 21:21 ` Darrick J. Wong
2019-11-16 18:22 ` [PATCH 2/9] xfs: improve the xfs_dabuf_map calling conventions Christoph Hellwig
2019-11-17 18:35 ` Darrick J. Wong
2019-11-18 6:25 ` Christoph Hellwig
2019-11-19 17:12 ` Darrick J. Wong
2019-11-19 17:15 ` Christoph Hellwig
2019-11-16 18:22 ` [PATCH 3/9] xfs: remove the mappedbno argument to xfs_da_reada_buf Christoph Hellwig
2019-11-18 21:22 ` Darrick J. Wong
2019-11-16 18:22 ` [PATCH 4/9] xfs: remove the mappedbno argument to xfs_attr3_leaf_read Christoph Hellwig
2019-11-18 21:22 ` Darrick J. Wong [this message]
2019-11-16 18:22 ` [PATCH 5/9] xfs: remove the mappedbno argument to xfs_dir3_leaf_read Christoph Hellwig
2019-11-18 21:23 ` Darrick J. Wong
2019-11-18 21:23 ` Darrick J. Wong
2019-11-16 18:22 ` [PATCH 6/9] xfs: remove the mappedbno argument to xfs_dir3_leafn_read Christoph Hellwig
2019-11-18 21:23 ` Darrick J. Wong
2019-11-16 18:22 ` [PATCH 7/9] xfs: split xfs_da3_node_read Christoph Hellwig
2019-11-18 21:24 ` Darrick J. Wong
2019-11-16 18:22 ` [PATCH 8/9] xfs: remove the mappedbno argument to xfs_da_read_buf Christoph Hellwig
2019-11-18 21:29 ` Darrick J. Wong
2019-11-16 18:22 ` [PATCH 9/9] xfs: remove the mappedbno argument to xfs_da_get_buf Christoph Hellwig
2019-11-18 21:32 ` Darrick J. Wong
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=20191118212258.GY6219@magnolia \
--to=darrick.wong@oracle.com \
--cc=allison.henderson@oracle.com \
--cc=hch@lst.de \
--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).