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