From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/3] xfs: handle errors from ->free_blocks in xfs_btree_kill_iroot
Date: Thu, 14 Jan 2016 12:32:16 -0500 [thread overview]
Message-ID: <20160114173214.GA11448@bfoster.bfoster> (raw)
In-Reply-To: <1452707454-15229-2-git-send-email-hch@lst.de>
On Wed, Jan 13, 2016 at 06:50:52PM +0100, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/libxfs/xfs_btree.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
> index a0eb18c..3143577 100644
> --- a/fs/xfs/libxfs/xfs_btree.c
> +++ b/fs/xfs/libxfs/xfs_btree.c
> @@ -3209,6 +3209,7 @@ xfs_btree_kill_iroot(
> int level;
> int index;
> int numrecs;
> + int error;
> #ifdef DEBUG
> union xfs_btree_ptr ptr;
> int i;
> @@ -3272,8 +3273,6 @@ xfs_btree_kill_iroot(
> cpp = xfs_btree_ptr_addr(cur, 1, cblock);
> #ifdef DEBUG
> for (i = 0; i < numrecs; i++) {
> - int error;
> -
> error = xfs_btree_check_ptr(cur, cpp, i, level - 1);
> if (error) {
> XFS_BTREE_TRACE_CURSOR(cur, XBT_ERROR);
> @@ -3283,7 +3282,11 @@ xfs_btree_kill_iroot(
> #endif
> xfs_btree_copy_ptrs(cur, pp, cpp, numrecs);
>
> - cur->bc_ops->free_block(cur, cbp);
> + error = cur->bc_ops->free_block(cur, cbp);
> + if (error) {
> + XFS_BTREE_TRACE_CURSOR(cur, XBT_ERROR);
> + return error;
> + }
> XFS_BTREE_STATS_INC(cur, free);
>
> cur->bc_bufs[level - 1] = NULL;
> --
> 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
next 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 [this message]
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
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=20160114173214.GA11448@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox