xfs: don't verify buffers after IO errors
PATCH 1/1 xfs: don't verify buffers after IO errors
From: Dave Chinner <[email protected]>
When we read a buffer, we might get an error from the underlying block device and not the real data. Hence if we get an IO error, we shouldn't run the verifier but instead just pass the IO error straight through.
--- fs/xfs/xfs_buf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/xfs/xfs_buf.c +3 -1
@@ -1022,7 +1022,9 @@ xfs_buf_iodone_work(bool read = !!(bp->b_flags &XBF_READ ); bp->b_flags &= ~(XBF_READ |XBF_WRITE |XBF_READ_AHEAD ); -if (read && bp->b_ops) + +/* only validate buffers that were read without errors */ +if (read && bp->b_ops && !bp->b_error && (bp->b_flags &XBF_DONE )) bp->b_ops->verify_read (bp);if (bp->b_iodone)
Signature · 6 lines
1.7.10 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 9 lines · Dave Chinner
From: Dave Chinner<[email protected]>
When we read a buffer, we might get an error from the underlying block device and not the real data. Hence if we get an IO error, we shouldn't run the verifier but instead just pass the IO error straight through.
Signed-off-by Dave Chinner<[email protected]>---
Looks good. needs to go into Linux 3.7/8 stable?
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Mark,
Quoted 8 lines · Mark Tinguely
Quoted 7 lines · Dave Chinner
From: Dave Chinner<[email protected]>
When we read a buffer, we might get an error from the underlying block device and not the real data. Hence if we get an IO error, we shouldn't run the verifier but instead just pass the IO error straight through.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Dave Chinner<[email protected]>---
Looks good. needs to go into Linux 3.7/8 stable?
Reviewed-by Mark Tinguely <[email protected]>
$ git describe 1813dd64057490e7a0678a885c4fe6d02f78bdc1 v3.7-rc1-70-g1813dd6
3.7 and 3.8 is correct.
-Ben
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 8 lines · Mark Tinguely
Quoted 7 lines · Dave Chinner
From: Dave Chinner<[email protected]>
When we read a buffer, we might get an error from the underlying block device and not the real data. Hence if we get an IO error, we shouldn't run the verifier but instead just pass the IO error straight through.
Quoted 4 lines
Quoted 2 lines
Signed-off-by Dave Chinner<[email protected]>---
Looks good. needs to go into Linux 3.7/8 stable?
It's not a critical fix - it just makes logs noisy and changes the error from, say, EIO to EFSCORRUPTED. The end result will be the same, though....
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Ben Myers
AppliedQuoted 8 lines · Dave Chinner
From: Dave Chinner <[email protected]>
When we read a buffer, we might get an error from the underlying block device and not the real data. Hence if we get an IO error, we shouldn't run the verifier but instead just pass the IO error straight through.
Signed-off-by Dave Chinner <[email protected]>
Applied.
-Ben
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs