diff mbox series

[2/9] mm/page-flags: Allow accessing PageError on tail pages

Message ID 20201026183136.10404-3-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series More THP fixes | expand

Commit Message

Matthew Wilcox Oct. 26, 2020, 6:31 p.m. UTC
We track whether a page has had a read error for the entire THP, just like
we track Uptodate and Dirty.  This lets, eg, generic_file_buffered_read()
continue to work on the appropriate subpage of the THP without
modification.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 include/linux/page-flags.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 4f6ba9379112..eb3a9796de8e 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -328,7 +328,8 @@  static inline int TestClearPage##uname(struct page *page) { return 0; }
 
 __PAGEFLAG(Locked, locked, PF_NO_TAIL)
 PAGEFLAG(Waiters, waiters, PF_ONLY_HEAD) __CLEARPAGEFLAG(Waiters, waiters, PF_ONLY_HEAD)
-PAGEFLAG(Error, error, PF_NO_TAIL) TESTCLEARFLAG(Error, error, PF_NO_TAIL)
+PAGEFLAG(Error, error, PF_HEAD)
+	TESTCLEARFLAG(Error, error, PF_HEAD)
 PAGEFLAG(Referenced, referenced, PF_HEAD)
 	TESTCLEARFLAG(Referenced, referenced, PF_HEAD)
 	__SETPAGEFLAG(Referenced, referenced, PF_HEAD)