aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorGravatar Andreas Gruenbacher <agruenba@redhat.com> 2023-05-31 21:08:26 +0200
committerGravatar Andreas Gruenbacher <agruenba@redhat.com> 2023-06-01 14:55:43 +0200
commitfa58cc888d67e640e354d8b3ceef877ea167b0cf (patch)
tree01be5d4e36e63ce30618859c9d3cda8113abf63a /block
parentMerge tag 'for-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff)
downloadlinux-fa58cc888d67e640e354d8b3ceef877ea167b0cf.tar.gz
linux-fa58cc888d67e640e354d8b3ceef877ea167b0cf.tar.bz2
linux-fa58cc888d67e640e354d8b3ceef877ea167b0cf.zip
gfs2: Don't get stuck writing page onto itself under direct I/O
When a direct I/O write is performed, iomap_dio_rw() invalidates the part of the page cache which the write is going to before carrying out the write. In the odd case, the direct I/O write will be reading from the same page it is writing to. gfs2 carries out writes with page faults disabled, so it should have been obvious that this page invalidation can cause iomap_dio_rw() to never make any progress. Currently, gfs2 will end up in an endless retry loop in gfs2_file_direct_write() instead, though. Break this endless loop by limiting the number of retries and falling back to buffered I/O after that. Also simplify should_fault_in_pages() sightly and add a comment to make the above case easier to understand. Reported-by: Jan Kara <jack@suse.cz> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions