]> git.karo-electronics.de Git - linux-beck.git/commit
xfs: uncached buffer reads need to return an error
authorDave Chinner <dchinner@redhat.com>
Mon, 12 Nov 2012 11:54:02 +0000 (22:54 +1100)
committerBen Myers <bpm@sgi.com>
Fri, 16 Nov 2012 03:34:05 +0000 (21:34 -0600)
commiteab4e63368b4cfa597dbdac66d1a7a836a693b7d
tree37d6756a3fd9e43ecf65d1b4a3950ecd34ad653f
parentc3f8fc73ac97b76a12692088ef9cace9af8422c0
xfs: uncached buffer reads need to return an error

With verification being done as an IO completion callback, different
errors can be returned from a read. Uncached reads only return a
buffer or NULL on failure, which means the verification error cannot
be returned to the caller.

Split the error handling for these reads into two - a failure to get
a buffer will still return NULL, but a read error will return a
referenced buffer with b_error set rather than NULL. The caller is
responsible for checking the error state of the buffer returned.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Phil White <pwhite@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_buf.c
fs/xfs/xfs_fsops.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_rtalloc.c