提交 cc88466f 编写于 作者: D David Chinner 提交者: Lachlan McIlroy

[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: NDavid Chinner <dgc@sgi.com>
Signed-off-by: NNiv Sardi <xaiki@sgi.com>
Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
上级 958d4ec6
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册