public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: don't verify buffers after IO errors
@ 2013-02-27  2:25 Dave Chinner
  2013-02-28 15:37 ` Mark Tinguely
  2013-03-07 18:46 ` Ben Myers
  0 siblings, 2 replies; 5+ messages in thread
From: Dave Chinner @ 2013-02-27  2:25 UTC (permalink / raw)
  To: xfs

From: Dave Chinner <dchinner@redhat.com>

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 <dchinner@redhat.com>
---
 fs/xfs/xfs_buf.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 4e8f0df..50eb603 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -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)
-- 
1.7.10

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] xfs: don't verify buffers after IO errors
  2013-02-27  2:25 [PATCH] xfs: don't verify buffers after IO errors Dave Chinner
@ 2013-02-28 15:37 ` Mark Tinguely
  2013-02-28 17:24   ` Ben Myers
  2013-02-28 19:34   ` Dave Chinner
  2013-03-07 18:46 ` Ben Myers
  1 sibling, 2 replies; 5+ messages in thread
From: Mark Tinguely @ 2013-02-28 15:37 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs

On 02/26/13 20:25, Dave Chinner wrote:
> From: Dave Chinner<dchinner@redhat.com>
>
> 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<dchinner@redhat.com>
> ---

Looks good. needs to go into Linux 3.7/8 stable?

Reviewed-by: Mark Tinguely <tinguely@sgi.com>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xfs: don't verify buffers after IO errors
  2013-02-28 15:37 ` Mark Tinguely
@ 2013-02-28 17:24   ` Ben Myers
  2013-02-28 19:34   ` Dave Chinner
  1 sibling, 0 replies; 5+ messages in thread
From: Ben Myers @ 2013-02-28 17:24 UTC (permalink / raw)
  To: Mark Tinguely; +Cc: xfs

Mark,

On Thu, Feb 28, 2013 at 09:37:50AM -0600, Mark Tinguely wrote:
> On 02/26/13 20:25, Dave Chinner wrote:
> >From: Dave Chinner<dchinner@redhat.com>
> >
> >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<dchinner@redhat.com>
> >---
> 
> Looks good. needs to go into Linux 3.7/8 stable?
> 
> Reviewed-by: Mark Tinguely <tinguely@sgi.com>

$ git describe 1813dd64057490e7a0678a885c4fe6d02f78bdc1
v3.7-rc1-70-g1813dd6

3.7 and 3.8 is correct.

-Ben

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xfs: don't verify buffers after IO errors
  2013-02-28 15:37 ` Mark Tinguely
  2013-02-28 17:24   ` Ben Myers
@ 2013-02-28 19:34   ` Dave Chinner
  1 sibling, 0 replies; 5+ messages in thread
From: Dave Chinner @ 2013-02-28 19:34 UTC (permalink / raw)
  To: Mark Tinguely; +Cc: xfs

On Thu, Feb 28, 2013 at 09:37:50AM -0600, Mark Tinguely wrote:
> On 02/26/13 20:25, Dave Chinner wrote:
> >From: Dave Chinner<dchinner@redhat.com>
> >
> >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<dchinner@redhat.com>
> >---
> 
> 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.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xfs: don't verify buffers after IO errors
  2013-02-27  2:25 [PATCH] xfs: don't verify buffers after IO errors Dave Chinner
  2013-02-28 15:37 ` Mark Tinguely
@ 2013-03-07 18:46 ` Ben Myers
  1 sibling, 0 replies; 5+ messages in thread
From: Ben Myers @ 2013-03-07 18:46 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs

On Wed, Feb 27, 2013 at 01:25:54PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> 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 <dchinner@redhat.com>

Applied.

-Ben

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-07 18:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-27  2:25 [PATCH] xfs: don't verify buffers after IO errors Dave Chinner
2013-02-28 15:37 ` Mark Tinguely
2013-02-28 17:24   ` Ben Myers
2013-02-28 19:34   ` Dave Chinner
2013-03-07 18:46 ` Ben Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox