Re: [PATCH 2/9] xfs: make xfs_buf_read return an error code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 16, 2020 at 08:15:38AM -0800, Christoph Hellwig wrote:
> On Wed, Jan 15, 2020 at 09:03:52AM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > 
> > Convert xfs_buf_read() to return numeric error codes like most
> > everywhere else in xfs.
> 
> It also does a few more things:
> 
> > +	error = bp->b_error;
> > +	if (error) {
> > +		xfs_buf_ioerror_alert(bp, __func__);
> 
> Adds a new call to xfs_buf_ioerror_alert, which exists in most callers.
> 
> > +		xfs_buf_stale(bp);
> > +		xfs_buf_relse(bp);
> > +
> > +		/* bad CRC means corrupted metadata */
> > +		if (error == -EFSBADCRC)
> > +			error = -EFSCORRUPTED;
> 
> .. and it remaps this error value.
> 
> Both of which look sensible to me, so with that mentioned in the
> commit log:

Fixed.

--D

> Reviewed-by: Christoph Hellwig <hch@xxxxxx>



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux