diff mbox series

[16/24] iomap: Remove test for folio error

Message ID 20220527155036.524743-17-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series Begin removing PageError | expand

Commit Message

Matthew Wilcox May 27, 2022, 3:50 p.m. UTC
Just because there has been a read error doesn't mean we should avoid
marking this part of the folio as uptodate.  Indeed, it may overwrite
the error part of the folio and let us mark the entire folio uptodate.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/iomap/buffered-io.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Christoph Hellwig May 28, 2022, 6 a.m. UTC | #1
On Fri, May 27, 2022 at 04:50:28PM +0100, Matthew Wilcox (Oracle) wrote:
> Just because there has been a read error doesn't mean we should avoid
> marking this part of the folio as uptodate.  Indeed, it may overwrite
> the error part of the folio and let us mark the entire folio uptodate.

This does look sensible, but I'm a little worried about this area.

Did this survive an xfstests run with a sub-pagesize blocksize file
system?
diff mbox series

Patch

diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index d2a9f699e17e..66278a14bfa7 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -154,9 +154,6 @@  static void iomap_iop_set_range_uptodate(struct folio *folio,
 static void iomap_set_range_uptodate(struct folio *folio,
 		struct iomap_page *iop, size_t off, size_t len)
 {
-	if (folio_test_error(folio))
-		return;
-
 	if (iop)
 		iomap_iop_set_range_uptodate(folio, iop, off, len);
 	else