Matthew Wilcox (Oracle) f691ab24cf iomap: Set all uptodate bits for an Uptodate page
[ Upstream commit 4595a298d5563cf76c1d852970f162051fd1a7a6 ]

For filesystems with block size < page size, we need to set all the
per-block uptodate bits if the page was already uptodate at the time
we create the per-block metadata.  This can happen if the page is
invalidated (eg by a write to drop_caches) but ultimately not removed
from the page cache.

This is a data corruption issue as page writeback skips blocks which
are marked !uptodate.

Fixes: 9dc55f1389f9 ("iomap: add support for sub-pagesize buffered I/O without buffer heads")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reported-by: Qian Cai <cai@redhat.com>
Cc: Brian Foster <bfoster@redhat.com>
Reviewed-by: Gao Xiang <hsiangkao@redhat.com>
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:13:35 +01:00
..
2021-09-22 12:26:25 +02:00
2024-02-23 08:25:03 +01:00
2023-09-23 10:59:56 +02:00
2023-02-22 12:50:35 +01:00
2023-09-23 11:00:06 +02:00
2022-06-14 18:11:41 +02:00
2019-12-17 19:55:30 +01:00
2023-01-18 11:41:44 +01:00