[GIT PULL] Btrfs fixes for 6.4-rc2

From: David Sterba
Date: Tue May 09 2023 - 12:08:37 EST


Hi,

first batch of fixes, mostly stable material. Please pull, thanks.

- fix backward leaf iteration which could possibly return the same key

- fix assertion when device add and balance race for exclusive
operation

- fix regression when freeing device, state tree would leak after device
replace

- fix attempt to clear space cache v1 when block-group-tree is enabled

- fix potential i_size corruption when encoded write races with send v2
and enabled no-holes (the race is hard to hit though, the window is a
few instructions wide)

- fix wrong bitmap API use when checking empty zones, parameters were
swapped but not causing a bug due to other code

- prevent potential qgroup leak if subvolume create does not commit
transaction (which is pending in the development queue)

- error handling and reporting:
- abort transaction when sibling keys check fails for leaves
- print extent buffers when sibling keys check fails

----------------------------------------------------------------
The following changes since commit f372463124df5f980de6ee0cd6000a3e43df0e01:

btrfs: mark btrfs_assertfail() __noreturn (2023-04-17 19:52:19 +0200)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-6.4-rc1-tag

for you to fetch changes up to d246331b78cbef86237f9c22389205bc9b4e1cc1:

btrfs: don't free qgroup space unless specified (2023-05-03 16:37:56 +0200)

----------------------------------------------------------------
Boris Burkov (1):
btrfs: fix encoded write i_size corruption with no-holes

Filipe Manana (4):
btrfs: fix btrfs_prev_leaf() to not return the same key twice
btrfs: fix leak of source device allocation state after device replace
btrfs: abort transaction when sibling keys check fails for leaves
btrfs: print extent buffers when sibling keys check fails

Josef Bacik (1):
btrfs: don't free qgroup space unless specified

Naohiro Aota (1):
btrfs: zoned: fix wrong use of bitops API in btrfs_ensure_empty_zones

Qu Wenruo (1):
btrfs: properly reject clear_cache and v1 cache for block-group-tree

xiaoshoukui (1):
btrfs: fix assertion of exclop condition when starting balance

fs/btrfs/block-rsv.c | 3 ++-
fs/btrfs/ctree.c | 38 +++++++++++++++++++++++++++++++++++++-
fs/btrfs/file-item.c | 5 +++--
fs/btrfs/ioctl.c | 4 +++-
fs/btrfs/super.c | 7 ++++++-
fs/btrfs/volumes.c | 1 +
fs/btrfs/zoned.c | 6 +++---
7 files changed, 55 insertions(+), 9 deletions(-)