This version actually passes xfstests as opposed to freezing on the first time you use readahead like v1 did. I think there are further simplifications that can be made, but this works. Matthew Wilcox (Oracle) (3): bcachefs: Convert to readahead bcachefs: Remove page_state_init_for_read bcachefs: Use attach_page_private and detach_page_private fs/bcachefs/fs-io.c | 112 +++++++++----------------------------------- fs/bcachefs/fs-io.h | 3 +- fs/bcachefs/fs.c | 2 +- 3 files changed, 23 insertions(+), 94 deletions(-) -- 2.28.0