[PATCH v2 0/7] btrfs: convert some struct page users to folios

From: Tal Zussman

Date: Mon Sep 07 2026 - 16:24:10 EST


This series converts three areas of btrfs that still use struct page:

1. The extent-io tests. test_find_delalloc() uses the page APIs, and the
extent buffer memory checks assume one page per folio.

2. Compression. btrfs_compr_pool_scan() walks the folio pool as struct
page, the last use of page->lru in btrfs, and the heuristic sampler
is the last caller of find_get_page().

3. Super block reads. btrfs_read_disk_super() and the zoned super block
log comparison are the last page cache lookups by page in btrfs.

Tested with KASAN, lockdep, DEBUG_VM and the btrfs selftests enabled.
xfstests' compress group under compress=zstd and the btrfs group both
pass.

---
Changes in v2:
- Add tags (Thanks Qu!)
- Patch 2: Assert that test_find_delalloc()'s folios are order-0, per Qu
- Drop the v1 free space cache patches (8-10), per Qu. The v1 space
cache will be removed instead
- Link to v1: https://patch.msgid.link/20260906-btrfs-folio-conversions-v1-0-834b9d7b06f5@xxxxxxxxxxxx

---
Tal Zussman (7):
btrfs: tests: rename process_page_range() to process_folio_range()
btrfs: tests: convert test_find_delalloc() to use folios
btrfs: tests: use eb folio helpers in extent buffer memory checks
btrfs: convert btrfs_compr_pool_scan() to use folios
btrfs: convert heuristic_collect_sample() to use folios
btrfs: fix stale function references in compression comments
btrfs: use folios for reading super blocks from the block device

fs/btrfs/compression.c | 20 +++---
fs/btrfs/tests/extent-io-tests.c | 131 +++++++++++++++++++++------------------
fs/btrfs/volumes.c | 16 +++--
fs/btrfs/zoned.c | 12 ++--
4 files changed, 93 insertions(+), 86 deletions(-)
---
base-commit: 69b26c13e520480d1869171e2c2b8a59f0c857ec
change-id: 20260905-btrfs-folio-conversions-47950cc1faca

Best regards,
--
Tal Zussman <tz2294@xxxxxxxxxxxx>