From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 3/3] xfs: move buffer invalidation to xfs_btree_free_block
Date: Thu, 14 Jan 2016 12:32:29 -0500 [thread overview]
Message-ID: <20160114173228.GC11448@bfoster.bfoster> (raw)
In-Reply-To: <1452707454-15229-4-git-send-email-hch@lst.de>
On Wed, Jan 13, 2016 at 06:50:54PM +0100, Christoph Hellwig wrote:
> ... instead of leaving it in the methods.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/libxfs/xfs_alloc_btree.c | 2 --
> fs/xfs/libxfs/xfs_bmap_btree.c | 1 -
> fs/xfs/libxfs/xfs_btree.c | 4 +++-
> fs/xfs/libxfs/xfs_ialloc_btree.c | 12 ++----------
> 4 files changed, 5 insertions(+), 14 deletions(-)
>
> diff --git a/fs/xfs/libxfs/xfs_alloc_btree.c b/fs/xfs/libxfs/xfs_alloc_btree.c
> index 444626d..d9b42425 100644
> --- a/fs/xfs/libxfs/xfs_alloc_btree.c
> +++ b/fs/xfs/libxfs/xfs_alloc_btree.c
> @@ -118,8 +118,6 @@ xfs_allocbt_free_block(
> xfs_extent_busy_insert(cur->bc_tp, be32_to_cpu(agf->agf_seqno), bno, 1,
> XFS_EXTENT_BUSY_SKIP_DISCARD);
> xfs_trans_agbtree_delta(cur->bc_tp, -1);
> -
> - xfs_trans_binval(cur->bc_tp, bp);
> return 0;
> }
>
> diff --git a/fs/xfs/libxfs/xfs_bmap_btree.c b/fs/xfs/libxfs/xfs_bmap_btree.c
> index 1637c37..e37508a 100644
> --- a/fs/xfs/libxfs/xfs_bmap_btree.c
> +++ b/fs/xfs/libxfs/xfs_bmap_btree.c
> @@ -531,7 +531,6 @@ xfs_bmbt_free_block(
>
> xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
> xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L);
> - xfs_trans_binval(tp, bp);
> return 0;
> }
>
> diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
> index 77afb4a..1f88e1c 100644
> --- a/fs/xfs/libxfs/xfs_btree.c
> +++ b/fs/xfs/libxfs/xfs_btree.c
> @@ -302,8 +302,10 @@ xfs_btree_free_block(
> int error;
>
> error = cur->bc_ops->free_block(cur, bp);
> - if (!error)
> + if (!error) {
> + xfs_trans_binval(cur->bc_tp, bp);
> XFS_BTREE_STATS_INC(cur, free);
> + }
> return error;
> }
>
> diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c
> index c679f3c..89c21d7 100644
> --- a/fs/xfs/libxfs/xfs_ialloc_btree.c
> +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c
> @@ -125,16 +125,8 @@ xfs_inobt_free_block(
> struct xfs_btree_cur *cur,
> struct xfs_buf *bp)
> {
> - xfs_fsblock_t fsbno;
> - int error;
> -
> - fsbno = XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(bp));
> - error = xfs_free_extent(cur->bc_tp, fsbno, 1);
> - if (error)
> - return error;
> -
> - xfs_trans_binval(cur->bc_tp, bp);
> - return error;
> + return xfs_free_extent(cur->bc_tp,
> + XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(bp)), 1);
> }
>
> STATIC int
> --
> 1.9.1
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2016-01-14 17:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 17:50 a couple minor btree free_block patches Christoph Hellwig
2016-01-13 17:50 ` [PATCH 1/3] xfs: handle errors from ->free_blocks in xfs_btree_kill_iroot Christoph Hellwig
2016-01-14 17:32 ` Brian Foster
2016-01-13 17:50 ` [PATCH 2/3] xfs: factor btree block freeing into a helper Christoph Hellwig
2016-01-14 17:32 ` Brian Foster
2016-01-13 17:50 ` [PATCH 3/3] xfs: move buffer invalidation to xfs_btree_free_block Christoph Hellwig
2016-01-14 17:32 ` Brian Foster [this message]
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=20160114173228.GC11448@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=hch@lst.de \
--cc=xfs@oss.sgi.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.