public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: fix unpaired compr folio allocation/freeing
@ 2026-02-28  0:23 Qu Wenruo
  2026-02-28  0:23 ` [PATCH 1/2] btrfs: fix the incorrect freeing of a compression folio in btrfs_submit_compressed_read() Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Qu Wenruo @ 2026-02-28  0:23 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-28  6:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-28  0:23 [PATCH 0/2] btrfs: fix unpaired compr folio allocation/freeing Qu Wenruo
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox