Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc88466f authored by David Chinner's avatar David Chinner Committed by Lachlan McIlroy
Browse files

[XFS] Catch unwritten extent conversion errors.



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: default avatarDavid Chinner <dgc@sgi.com>
Signed-off-by: default avatarNiv Sardi <xaiki@sgi.com>
Signed-off-by: default avatarLachlan McIlroy <lachlan@sgi.com>
parent 958d4ec6
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -243,8 +243,12 @@ xfs_end_bio_unwritten(
	size_t			size = ioend->io_size;
	size_t			size = ioend->io_size;


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