]> git.baikalelectronics.ru Git - kernel.git/commit
iomap: Mark read blocks uptodate in write_begin
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 10 Sep 2020 15:26:18 +0000 (08:26 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 10 Sep 2020 15:26:18 +0000 (08:26 -0700)
commitf31b295398e9ff999293c294d672a9a2e055e072
tree6357691afc92cfdfc3843137ebcff6f03a5f6f11
parentb8f72ef89a74cbe10850f44f9932ea833d8d71d3
iomap: Mark read blocks uptodate in write_begin

When bringing (portions of) a page uptodate, we were marking blocks that
were zeroed as being uptodate, but not blocks that were read from storage.

Like the previous commit, this problem was found with generic/127 and
a kernel which failed readahead I/Os.  This bug causes writes to be
silently lost when working with flaky storage.

Fixes: b53f27525678 ("iomap: add support for sub-pagesize buffered I/O without buffer heads")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/iomap/buffered-io.c