All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/6] btrfs: compression: migrate to folio interfaces
Date: Mon, 29 Jan 2024 20:16:05 +1030	[thread overview]
Message-ID: <cover.1706521511.git.wqu@suse.com> (raw)

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(-)

-- 
2.43.0


             reply	other threads:[~2024-01-29  9:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29  9:46 Qu Wenruo [this message]
2024-01-29  9:46 ` [PATCH 1/6] btrfs: compression: add error handling for missed page cache Qu Wenruo
2024-01-29  9:46 ` [PATCH 2/6] btrfs: compression: convert page allocation to folio interfaces Qu Wenruo
2024-01-29  9:46 ` [PATCH 3/6] btrfs: make insert_inline_extent() to accept one page directly Qu Wenruo
2024-01-29  9:46 ` [PATCH 4/6] btrfs: migrate insert_inline_extent() to folio interfaces Qu Wenruo
2024-01-29  9:46 ` [PATCH 5/6] btrfs: introduce btrfs_alloc_folio_array() Qu Wenruo
2024-01-29  9:46 ` [PATCH 6/6] btrfs: compression: migrate compression/decompression paths to folios Qu Wenruo
2024-03-26 23:33 ` [PATCH 0/6] btrfs: compression: migrate to folio interfaces David Sterba
2024-03-28  2:22   ` Qu Wenruo
2024-03-28 19:19     ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1706521511.git.wqu@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.