]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: check for buffer errors before waiting
authorDave Chinner <dchinner@redhat.com>
Mon, 23 Apr 2012 05:58:46 +0000 (15:58 +1000)
committerBen Myers <bpm@sgi.com>
Mon, 14 May 2012 21:20:42 +0000 (16:20 -0500)
commit94da6a41a1a3149e94f3c82c39bd524c0fcde16a
tree2b3117e20f1e739d5cb560b1b1b32f3fdc8e3ee5
parentffe56492a2cc1ae4f03274029f2d690313bf42d8
xfs: check for buffer errors before waiting

If we call xfs_buf_iowait() on a buffer that failed dispatch due to
an IO error, it will wait forever for an Io that does not exist.
This is hndled in xfs_buf_read, but there is other code that calls
xfs_buf_iowait directly that doesn't.

Rather than make the call sites have to handle checking for dispatch
errors and then checking for completion errors, make
xfs_buf_iowait() check for dispatch errors on the buffer before
waiting. This means we handle both dispatch and completion errors
with one set of error handling at the caller sites.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf.h
fs/xfs/xfs_log_recover.c