linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org, david@fromorbit.com
Subject: Re: [PATCH 05/13] xfs: make xfs_buf_read_map return an error code
Date: Tue, 21 Jan 2020 16:20:46 -0800	[thread overview]
Message-ID: <20200122002046.GQ8247@magnolia> (raw)
In-Reply-To: <20200121225228.GA11169@infradead.org>

On Tue, Jan 21, 2020 at 02:52:28PM -0800, Christoph Hellwig wrote:
> On Mon, Jan 20, 2020 at 02:57:01PM -0800, Darrick J. Wong wrote:
> > @@ -831,7 +833,8 @@ xfs_buf_read_map(
> >  		XFS_STATS_INC(target->bt_mount, xb_get_read);
> >  		bp->b_ops = ops;
> >  		_xfs_buf_read(bp, flags);
> > -		return bp;
> > +		*bpp = bp;
> > +		return 0;
> 
> _xfs_buf_read can return an error, and we are losing that here.  So
> we should return the value from _xfs_buf_read, an ensure *bpp is NULL
> if it returns an error.  That also means all the b_error check in the
> callers of xfs_buf_read_map and xfs_buf_read (and with that the biggest
> wart in the buffer cache API) can go away.

I rearrange responsibility for dealing with buffer error handling in the
patch "xfs: move buffer read io error logging to xfs_buf_read_map" later
in this series.  Was that not what you were expecting?

Though looking at that patch I guess we could set @error directly to the
return values of xfs_buf_reverify/_xfs_buf_read.

--D

  reply	other threads:[~2020-01-22  0:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20 22:56 [PATCH v3 00/13] xfs: make buffer functions return error codes Darrick J. Wong
2020-01-20 22:56 ` [PATCH 01/13] xfs: make xfs_buf_alloc return an error code Darrick J. Wong
2020-01-20 22:56 ` [PATCH 02/13] xfs: make xfs_buf_read " Darrick J. Wong
2020-01-20 22:56 ` [PATCH 03/13] xfs: make xfs_buf_get " Darrick J. Wong
2020-01-20 22:56 ` [PATCH 04/13] xfs: make xfs_buf_get_uncached " Darrick J. Wong
2020-01-20 22:57 ` [PATCH 05/13] xfs: make xfs_buf_read_map " Darrick J. Wong
2020-01-21 22:52   ` Christoph Hellwig
2020-01-22  0:20     ` Darrick J. Wong [this message]
2020-01-22 22:12       ` Christoph Hellwig
2020-01-23  7:40         ` Darrick J. Wong
2020-01-20 22:57 ` [PATCH 06/13] xfs: make xfs_buf_get_map " Darrick J. Wong
2020-01-20 22:57 ` [PATCH 07/13] xfs: make xfs_trans_get_buf_map " Darrick J. Wong
2020-01-20 22:57 ` [PATCH 08/13] xfs: make xfs_trans_get_buf " Darrick J. Wong
2020-01-20 22:57 ` [PATCH 09/13] xfs: remove the xfs_btree_get_buf[ls] functions Darrick J. Wong
2020-01-20 22:57 ` [PATCH 10/13] xfs: make xfs_*read_agf return EAGAIN to ALLOC_FLAG_TRYLOCK callers Darrick J. Wong
2020-01-20 22:57 ` [PATCH 11/13] xfs: remove unnecessary null pointer checks from _read_agf callers Darrick J. Wong
2020-01-20 22:57 ` [PATCH 12/13] xfs: move buffer read io error logging to xfs_buf_read_map Darrick J. Wong
2020-01-20 22:57 ` [PATCH 13/13] xfs: fix xfs_buf_ioerror_alert location reporting 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=20200122002046.GQ8247@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --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).