On Mon, Jun 22, 2020 at 08:50:10PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > The data fork scrubber calls filemap_write_and_wait to flush dirty pages > and delalloc reservations out to disk prior to checking the data fork's > extent mappings. Unfortunately, this means that scrub can consume the > EIO/ENOSPC errors that would otherwise have stayed around in the address > space until (we hope) the writer application calls fsync to persist data > and collect errors. The end result is that programs that wrote to a > file might never see the error code and proceed as if nothing were > wrong. > > xfs_scrub is not in a position to notify file writers about the > writeback failure, and it's only here to check metadata, not file > contents. Therefore, if writeback fails, we should stuff the error code > back into the address space so that an fsync by the writer application > can pick that up. > > Fixes: 99d9d8d05da2 ("xfs: scrub inode block mappings") > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > --- > v2: explain why it's ok to keep going even if writeback fails Looks good. Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> -- Dave Chinner david@xxxxxxxxxxxxx