Skip to content

Commit

Permalink
[XFS] Catch unwritten extent conversion errors.
Browse files Browse the repository at this point in the history
On unwritten I/O completion, we fail to propagate an error when converting
the extent to a written extent. This means that the I/O silently fails.
propagate the error onto the ioend so that the inode is marked with an
error appropriately.

SGI-PV: 980084
SGI-Modid: xfs-linux-melb:xfs-kern:30826a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
  • Loading branch information
David Chinner authored and Lachlan McIlroy committed Apr 18, 2008
1 parent 958d4ec commit cc88466
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@ xfs_end_bio_unwritten(
size_t size = ioend->io_size;

if (likely(!ioend->io_error)) {
if (!XFS_FORCED_SHUTDOWN(ip->i_mount))
xfs_iomap_write_unwritten(ip, offset, size);
if (!XFS_FORCED_SHUTDOWN(ip->i_mount)) {
int error;
error = xfs_iomap_write_unwritten(ip, offset, size);
if (error)
ioend->io_error = error;
}
xfs_setfilesize(ioend);
}
xfs_destroy_ioend(ioend);
Expand Down

0 comments on commit cc88466

Please sign in to comment.