Message ID | 20130308015723.GA23616@dastard (mailing list archive) |
---|---|
State | Deferred, archived |
Headers | show |
Dave Chinner <david@fromorbit.com> writes: > Add the the patch below. If you still see errors, then they are real > IO errors from the block device. This patch fixes the problem for me. The patch works both when dm-raid1 returns -EIO and when it returns -EWOULDBLOCK. Thanks for your help. Cheers, Matteo -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 50eb603..82b70bd 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -1336,6 +1336,12 @@ _xfs_buf_ioapply( int size; int i; + /* + * Make sure we capture only current IO errors rather than stale errors + * left over from previous use of the buffer (e.g. failed readahead). + */ + bp->b_error = 0; + if (bp->b_flags & XBF_WRITE) { if (bp->b_flags & XBF_SYNCIO) rw = WRITE_SYNC;