Re: [PATCH 4/4] xfs: check owner of dir3 blocks

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

 



On Thu, Mar 05, 2020 at 08:51:28AM -0800, Christoph Hellwig wrote:
> On Fri, Feb 28, 2020 at 05:49:01PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > 
> > Check the owner field of dir3 block headers.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> 
> Looks good,
> 
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> 
> > +		xfs_verifier_error(*bpp, -EFSCORRUPTED, fa);
> > +		(*bpp)->b_flags &= ~XBF_DONE;
> > +		xfs_trans_brelse(tp, *bpp);
> > +		*bpp = NULL;
> > +		return -EFSCORRUPTED;
> 
> Although I wonder if we should factor this repeated sniplet into a
> helper..

Yes.  Dave and I were discussing in patch 1 that
xfs_buf_corruption_error() is the correct function to call for a buffer
that we've decided is corrupt outside of a read verifier, so this all
becomes:

if (fa) {
	xfs_buf_corruption_error(*bpp...);
	xfs_trans_brelse(tp, *bpp);
	*bpp = NULL;
	return -EFSCORRUPTED;
}

(We also observed that xfs_buf_corruption_error ought to stale the
corrupt buffer to get it out of the system asap.)

--D



[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