summaryrefslogtreecommitdiff
path: root/fs/xfs/uuid.h
diff options
context:
space:
mode:
authorDavid Jeffery <djeffery@redhat.com>2015-08-28 07:50:45 +0300
committerDave Chinner <david@fromorbit.com>2015-08-28 07:50:45 +0300
commitc9eb256eda4420c06bb10f5e8fbdbe1a34bc98e0 (patch)
tree5c5ab2b3839cf6160a67821c8dddfe240d930846 /fs/xfs/uuid.h
parentdfdd4ac66c2f921ecec730a2b24b0b13e10346b2 (diff)
downloadlinux-c9eb256eda4420c06bb10f5e8fbdbe1a34bc98e0.tar.xz
xfs: return errors from partial I/O failures to files
There is an issue with xfs's error reporting in some cases of I/O partially failing and partially succeeding. Calls like fsync() can report success even though not all I/O was successful in partial-failure cases such as one disk of a RAID0 array being offline. The issue can occur when there are more than one bio per xfs_ioend struct. Each call to xfs_end_bio() for a bio completing will write a value to ioend->io_error. If a successful bio completes after any failed bio, no error is reported do to it writing 0 over the error code set by any failed bio. The I/O error information is now lost and when the ioend is completed only success is reported back up the filesystem stack. xfs_end_bio() should only set ioend->io_error in the case of BIO_UPTODATE being clear. ioend->io_error is initialized to 0 at allocation so only needs to be updated by a failed bio. Also check that ioend->io_error is 0 so that the first error reported will be the error code returned. Cc: stable@vger.kernel.org Signed-off-by: David Jeffery <djeffery@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/uuid.h')
0 files changed, 0 insertions, 0 deletions