From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs: fix unpaired compr folio allocation/freeing
Date: Sat, 28 Feb 2026 10:53:10 +1030 [thread overview]
Message-ID: <cover.1772238005.git.wqu@suse.com> (raw)
With the recent *_compressed_bio() rework, we're using compressed_bio
everywhere for reads/writes (including regular and encoded).
However this requires us to allocate/free folios using
btrfs_alloc_compr_folio() and btrfs_free_compr_folio().
Not using the later to release a folio allocated by
btrfs_alloc_compr_folio() can screw up the LRU list.
Fix the unpaired calls as a hot fix.
For the long run, I'd like to remove btrfs_(alloc|free)_compr_folios()
with regular folio_(alloc|put)() instead.
As I do not think the compr pool is that helpful compared to the extra
maintanance needed.
Qu Wenruo (2):
btrfs: fix the incorrect freeing of a compression folio in
btrfs_submit_compressed_read()
btrfs: fix the incorrect freeing of a compression folio in
btrfs_do_encoded_write()
fs/btrfs/compression.c | 2 +-
fs/btrfs/inode.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--
2.53.0
next reply other threads:[~2026-02-28 0:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 0:23 Qu Wenruo [this message]
2026-02-28 0:23 ` [PATCH 1/2] btrfs: fix the incorrect freeing of a compression folio in btrfs_submit_compressed_read() Qu Wenruo
2026-02-28 0:23 ` [PATCH 2/2] btrfs: fix the incorrect freeing of a compression folio in btrfs_do_encoded_write() Qu Wenruo
2026-02-28 6:41 ` [PATCH 0/2] btrfs: fix unpaired compr folio allocation/freeing Qu Wenruo
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.1772238005.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.