linux_dsm_epyc7002/fs/xfs/scrub
Darrick J. Wong eb0efe5063 xfs: don't eat an EIO/ENOSPC writeback error when scrubbing data fork
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: 99d9d8d05d ("xfs: scrub inode block mappings")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2020-07-06 10:46:56 -07:00
..
agheader_repair.c xfs: replace open-coded bitmap weight logic 2020-03-18 08:12:23 -07:00
agheader.c xfs: remove XFS_BUF_TO_SBP 2020-03-11 09:11:39 -07:00
alloc.c xfs: convert btree cursor ag-private member name 2020-03-13 10:37:14 -07:00
attr.c xfs: mark extended attr corrupt when lookup-by-hash fails 2020-03-12 07:58:13 -07:00
attr.h xfs: only allocate memory for scrubbing attributes when we need it 2019-07-05 10:29:56 -07:00
bitmap.c xfs: replace open-coded bitmap weight logic 2020-03-18 08:12:23 -07:00
bitmap.h xfs: replace open-coded bitmap weight logic 2020-03-18 08:12:23 -07:00
bmap.c xfs: don't eat an EIO/ENOSPC writeback error when scrubbing data fork 2020-07-06 10:46:56 -07:00
btree.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
btree.h xfs: const-ify xfs_owner_info arguments 2018-12-12 08:47:16 -08:00
common.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
common.h xfs: periodically yield scrub threads to the scheduler 2019-11-07 13:00:53 -08:00
dabtree.c xfs: move the fork format fields into struct xfs_ifork 2020-05-19 09:40:58 -07:00
dabtree.h xfs: refactor btree node scrubbing 2019-11-10 16:54:19 -08:00
dir.c xfs: move the fork format fields into struct xfs_ifork 2020-05-19 09:40:58 -07:00
fscounters.c xfs: remove unnecessary null pointer checks from _read_agf callers 2020-01-26 14:32:27 -08:00
health.c xfs: fix missing header includes 2019-11-07 13:00:53 -08:00
health.h xfs: scrub should only cross-reference with healthy btrees 2019-04-16 10:01:57 -07:00
ialloc.c xfs: remove unused iget_flags param from xfs_imap_to_bp() 2020-05-07 08:27:49 -07:00
inode.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
parent.c xfs: move the per-fork nextents fields into struct xfs_ifork 2020-05-19 09:40:58 -07:00
quota.c xfs: add missing early termination checks to record scrubbing functions 2019-11-06 08:07:41 -08:00
refcount.c xfs: convert btree cursor ag-private member name 2020-03-13 10:37:14 -07:00
repair.c xfs: rename xfs_bitmap to xbitmap 2020-03-18 08:12:23 -07:00
repair.h xfs: rename xfs_bitmap to xbitmap 2020-03-18 08:12:23 -07:00
rmap.c xfs: convert btree cursor ag-private member name 2020-03-13 10:37:14 -07:00
rtbitmap.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
scrub.c xfs: prohibit fs freezing when using empty transactions 2020-03-26 08:19:24 -07:00
scrub.h xfs: add online scrub for superblock counters 2019-04-30 08:19:13 -07:00
symlink.c fs: xfs: Remove KM_NOSLEEP and KM_SLEEP. 2019-08-26 12:06:22 -07:00
trace.c xfs: convert btree cursor inode-private member names 2020-03-13 10:37:14 -07:00
trace.h xfs: convert btree cursor inode-private member names 2020-03-13 10:37:14 -07:00
xfs_scrub.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00