mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
xfs: remove spurious XBF_DONE clearing on readahead validation failure
Both callers of ->verify_read already do this, so don't duplicate the flag manipulation. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
b6ba780af0
commit
7a4eae80b5
|
|
@ -252,8 +252,8 @@ xfs_dquot_buf_read_verify(
|
|||
/*
|
||||
* readahead errors are silent and simply leave the buffer as !done so a real
|
||||
* read will then be run with the xfs_dquot_buf_ops verifier. See
|
||||
* xfs_inode_buf_verify() for why we use EIO and ~XBF_DONE here rather than
|
||||
* reporting the failure.
|
||||
* xfs_inode_buf_verify() for why we use EIO here rather than reporting the
|
||||
* failure.
|
||||
*/
|
||||
static void
|
||||
xfs_dquot_buf_readahead_verify(
|
||||
|
|
@ -262,10 +262,8 @@ xfs_dquot_buf_readahead_verify(
|
|||
struct xfs_mount *mp = bp->b_mount;
|
||||
|
||||
if (!xfs_dquot_buf_verify_crc(mp, bp, true) ||
|
||||
xfs_dquot_buf_verify(mp, bp, true) != NULL) {
|
||||
xfs_dquot_buf_verify(mp, bp, true) != NULL)
|
||||
xfs_buf_ioerror(bp, -EIO);
|
||||
bp->b_flags &= ~XBF_DONE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -29,12 +29,14 @@
|
|||
* has not had the inode cores stamped into it. Hence for readahead, the buffer
|
||||
* may be potentially invalid.
|
||||
*
|
||||
* If the readahead buffer is invalid, we need to mark it with an error and
|
||||
* clear the DONE status of the buffer so that a followup read will re-read it
|
||||
* from disk. We don't report the error otherwise to avoid warnings during log
|
||||
* recovery and we don't get unnecessary panics on debug kernels. We use EIO here
|
||||
* because all we want to do is say readahead failed; there is no-one to report
|
||||
* the error to, so this will distinguish it from a non-ra verifier failure.
|
||||
* If the readahead buffer is invalid, we need to mark it with an error so that a
|
||||
* followup read will re-read it from disk.
|
||||
*
|
||||
* We don't report the error otherwise to avoid warnings during log recovery and
|
||||
* we don't get unnecessary panics on debug kernels. Use EIO here because all
|
||||
* we want to do is say readahead failed; there is no-one to report the error
|
||||
* to, so this will distinguish it from a non-ra verifier failure.
|
||||
*
|
||||
* Changes to this readahead error behaviour also need to be reflected in
|
||||
* xfs_dquot_buf_readahead_verify().
|
||||
*/
|
||||
|
|
@ -64,7 +66,6 @@ xfs_inode_buf_verify(
|
|||
if (unlikely(!di_ok ||
|
||||
XFS_TEST_ERROR(mp, XFS_ERRTAG_ITOBP_INOTOBP))) {
|
||||
if (readahead) {
|
||||
bp->b_flags &= ~XBF_DONE;
|
||||
xfs_buf_ioerror(bp, -EIO);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user