[GIT PULL] Btrfs fixes for 6.10-rc3, part 2

From: David Sterba
Date: Fri Jun 07 2024 - 11:18:18 EST


Hi,

a few more fixes, two are for serious problems which are hard to hit,
details in the changelogs. Please pull, thanks.

- fix handling of folio private changes, the private value holds pointer
to our extent buffer structure representing a metadata range, release
and create of the range was not properly synchronized when updating
the private bit which ended up in double folio_put, leading to all
sorts of breakage

- fix a crash, reported as duplicate key in metadata, but caused by a
race of fsync and size extending write, requires prealloc target
range + fsync and other conditions (log tree state, timing)

- fix leak of qgroup extent records after transaction abort

----------------------------------------------------------------
The following changes since commit f13e01b89daf42330a4a722f451e48c3e2edfc8d:

btrfs: ensure fast fsync waits for ordered extents after a write failure (2024-05-28 16:35:12 +0200)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git tags/for-6.10-rc2-tag

for you to fetch changes up to f3a5367c679d31473d3fbb391675055b4792c309:

btrfs: protect folio::private when attaching extent buffer folios (2024-06-06 21:42:22 +0200)

----------------------------------------------------------------
Filipe Manana (1):
btrfs: fix leak of qgroup extent records after transaction abort

Omar Sandoval (1):
btrfs: fix crash on racing fsync and size-extending write into prealloc

Qu Wenruo (1):
btrfs: protect folio::private when attaching extent buffer folios

fs/btrfs/disk-io.c | 10 +--------
fs/btrfs/extent_io.c | 60 +++++++++++++++++++++++++++-------------------------
fs/btrfs/tree-log.c | 17 +++++++++------
3 files changed, 43 insertions(+), 44 deletions(-)