diff options
author | 2020-07-23 22:45:59 -0700 | |
---|---|---|
committer | 2020-08-05 09:24:16 -0700 | |
commit | 60263d5889e6dc5987dc51b801be4955ff2e4aa7 (patch) | |
tree | cb8418c747e19055b1416e993c3b00578046f520 /fs/xfs/xfs_file.c | |
parent | xfs: use ENOTBLK for direct I/O to buffered I/O fallback (diff) | |
download | linux-60263d5889e6dc5987dc51b801be4955ff2e4aa7.tar.gz linux-60263d5889e6dc5987dc51b801be4955ff2e4aa7.tar.bz2 linux-60263d5889e6dc5987dc51b801be4955ff2e4aa7.zip |
iomap: fall back to buffered writes for invalidation failures
Failing to invalid the page cache means data in incoherent, which is
a very bad state for the system. Always fall back to buffered I/O
through the page cache if we can't invalidate mappings.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Bob Peterson <rpeterso@redhat.com>
Acked-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Theodore Ts'o <tytso@mit.edu> # for ext4
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com> # for gfs2
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r-- | fs/xfs/xfs_file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index a6ef90457abf..1b4517fc55f1 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -553,8 +553,8 @@ out: xfs_iunlock(ip, iolock); /* - * No fallback to buffered IO on errors for XFS, direct IO will either - * complete fully or fail. + * No fallback to buffered IO after short writes for XFS, direct I/O + * will either complete fully or return an error. */ ASSERT(ret < 0 || ret == count); return ret; |