linux-stable/fs/iomap
Christoph Hellwig 0ab2a85c80 iomap: clear the per-folio dirty bits on all writeback failures
[ Upstream commit 7ea1d9b4a8 ]

write_cache_pages always clear the page dirty bit before calling into the
file systems, and leaves folios with a writeback failure without the
dirty bit after return.  We also clear the per-block writeback bits for
writeback failures unless no I/O has submitted, which will leave the
folio in an inconsistent state where it doesn't have the folio dirty,
but one or more per-block dirty bits.  This seems to be due the place
where the iomap_clear_range_dirty call was inserted into the existing
not very clearly structured code when adding per-block dirty bit support
and not actually intentional.  Switch to always clearing the dirty on
writeback failure.

Fixes: 4ce02c6797 ("iomap: Add per-block dirty state tracking to improve performance")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20231207072710.176093-2-hch@lst.de
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:19:16 -04:00
..
Makefile
buffered-io.c iomap: clear the per-folio dirty bits on all writeback failures 2024-03-26 18:19:16 -04:00
direct-io.c iomap: support IOCB_DIO_CALLER_COMP 2023-08-01 17:32:49 -06:00
fiemap.c fs: Move many prototypes to pagemap.h 2022-03-21 12:59:02 -04:00
iter.c iomap: write iomap validity checks 2022-11-29 09:09:17 +11:00
seek.c
swapfile.c
trace.c iomap: Add DIO tracepoints 2023-04-21 08:54:47 -07:00
trace.h iomap: Add DIO tracepoints 2023-04-21 08:54:47 -07:00