Thread (4 messages) 4 messages, 4 authors, 2021-02-11

Re: [PATCH] xfs: restore shutdown check in mapped write fault path

From: Gao Xiang <hidden>
Date: 2021-02-11 07:03:02

On Wed, Feb 10, 2021 at 12:01:12PM -0500, Brian Foster wrote:
XFS triggers an iomap warning in the write fault path due to a
!PageUptodate() page if a write fault happens to occur on a page
that recently failed writeback. The iomap writeback error handling
code can clear the Uptodate flag if no portion of the page is
submitted for I/O. This is reproduced by fstest generic/019, which
combines various forms of I/O with simulated disk failures that
inevitably lead to filesystem shutdown (which then unconditionally
fails page writeback).

This is a regression introduced by commit f150b4234397 ("xfs: split
the iomap ops for buffered vs direct writes") due to the removal of
a shutdown check and explicit error return in the ->iomap_begin()
path used by the write fault path. The explicit error return
historically translated to a SIGBUS, but now carries on with iomap
processing where it complains about the unexpected state. Restore
the shutdown check to xfs_buffered_write_iomap_begin() to restore
historical behavior.

Fixes: f150b4234397 ("xfs: split the iomap ops for buffered vs direct writes")
Signed-off-by: Brian Foster <redacted>
Taking some time on the internal discussion thread, I also think
SIGBUS is also appropriate after fs shutdown rather than dirty
this page anyway.

Reviewed-by: Gao Xiang <redacted>

Thanks,
Gao Xiang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help