Skip to content

btrfs: compression: migrate to folio interfaces

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6btrfs: compression: add error handling for missed page cachefs/btrfs/compression.c fs/btrfs/compression.h fs/btrfs/lzo.c +2 more+49 -80 replies
2/6btrfs: compression: convert page allocation to folio interfacesfs/btrfs/compression.c fs/btrfs/compression.h fs/btrfs/inode.c +3 more+24 -240 replies
3/6btrfs: make insert_inline_extent() to accept one page directlyfs/btrfs/inode.c+25 -220 replies
4/6btrfs: migrate insert_inline_extent() to folio interfacesfs/btrfs/inode.c+10 -80 replies
5/6btrfs: introduce btrfs_alloc_folio_array()fs/btrfs/extent_io.c fs/btrfs/extent_io.h+33 -00 replies
6/6btrfs: compression: migrate compression/decompression paths to foliosfs/btrfs/compression.c fs/btrfs/compression.h fs/btrfs/inode.c +3 more+249 -2480 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] btrfs: compression: migrate to folio interfaces

This is the conversion for btrfs compression paths to use folio interfaces.

For now, it's a pure intrefaces change, just with some variable names also changed from "page" to "folio".

There is no utilization of possible larger folio size yet, thus we're still using a lot of PAGE_SIZE/PAGE_SHIFT in the existing code.

But it's still a good first step towards large folio for btrfs data.

The first patch is in fact independent from the series, to slightly enhance the page cache missing error handling, but all later patches relies on it, to make later folio change a little smoother.

The third patch is also a good cleanup, as it allows we to pass a single page to inline creation path.
Although during tests, it turns out that under heavy race we can try to insert an empty inline extent, but since the old code can handle it well, I just added one comment for it.

The remaining but the last one are some preparation before the final conversion.

And the final patch is the core conversion, as we have several structure relying on page array, it's impossible to just convert one algorithm to folio meanwhile keep all the other using pages.

Qu Wenruo (6):
btrfs: compression: add error handling for missed page cache
btrfs: compression: convert page allocation to folio interfaces
btrfs: make insert_inline_extent() to accept one page directly
btrfs: migrate insert_inline_extent() to folio interfaces
btrfs: introduce btrfs_alloc_folio_array()
btrfs: compression: migrate compression/decompression paths to folios

 fs/btrfs/compression.c | 119 +++++++++++++++++++-------------
 fs/btrfs/compression.h |  41 ++++++------
 fs/btrfs/extent_io.c   |  31 +++++++++
 fs/btrfs/extent_io.h   |   2 +
 fs/btrfs/inode.c       | 149 +++++++++++++++++++++--------------------
 fs/btrfs/lzo.c         |  87 ++++++++++++------------
 fs/btrfs/zlib.c        | 110 ++++++++++++++++--------------
 fs/btrfs/zstd.c        |  79 ++++++++++++----------
 8 files changed, 349 insertions(+), 269 deletions(-)
Signature · 1 line
2.43.0