diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-07 04:35:12 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-07 04:35:12 +0200 |
commit | 0e4656a299db8484933a143259e7e5ebae2e3a01 (patch) | |
tree | 8f44153b771b4e1b04ebcdaae13d03a16bcd8a15 /fs/ext4 | |
parent | Merge tag 'fsnotify_for_v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
parent | iomap: fall back to buffered writes for invalidation failures (diff) | |
download | linux-0e4656a299db8484933a143259e7e5ebae2e3a01.tar.xz linux-0e4656a299db8484933a143259e7e5ebae2e3a01.zip |
Merge tag 'iomap-5.9-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull iomap updates from Darrick Wong:
"The most notable changes are:
- iomap no longer invalidates the page cache when performing a direct
read, since doing so is unnecessary and the old directio code
doesn't do that either.
- iomap embraced the use of returning ENOTBLK from a direct write to
trigger falling back to a buffered write since ext4 already did
this and btrfs wants it for their port.
- iomap falls back to buffered writes if we're doing a direct write
and the page cache invalidation after the flush fails; this was
necessary to handle a corner case in the btrfs port.
- Remove email virus scanner detritus that was accidentally included
in yesterday's pull request. Clearly I need(ed) to update my git
branch checker scripts. :("
* tag 'iomap-5.9-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
iomap: fall back to buffered writes for invalidation failures
xfs: use ENOTBLK for direct I/O to buffered I/O fallback
iomap: Only invalidate page cache pages on direct IO writes
iomap: Make sure iomap_end is called after iomap_begin
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 2a01e31a032c..129cc1dd6b79 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -544,6 +544,8 @@ static ssize_t ext4_dio_write_iter(struct kiocb *iocb, struct iov_iter *from) iomap_ops = &ext4_iomap_overwrite_ops; ret = iomap_dio_rw(iocb, from, iomap_ops, &ext4_dio_write_ops, is_sync_kiocb(iocb) || unaligned_io || extend); + if (ret == -ENOTBLK) + ret = 0; if (extend) ret = ext4_handle_inode_extension(inode, offset, ret, count); |