[GIT PULL] Btrfs fixes for 6.16-rc4

From: David Sterba
Date: Mon Jun 23 2025 - 08:48:00 EST


Hi,

please pull the following updates for btrfs. There are mostly short
fixes that have accumulated since rc1. Thanks.

Fixes:

- fix invalid inode pointer dereferences during log replay

- fix a race between renames and directory logging

- fix shutting down delayed iput worker

- fix device byte accounting when dropping chunk

- in zoned mode, fix offset calculations for DUP profile when
conventional and sequential zones are used together

Regression fixes:

- fix possible double unlock of extent buffer tree (xarray conversion)

- in zoned mode, fix extent buffer refcount when writing out extents
(xarray conversion)

Error handling fixes and updates:

- handle unexpected extent type when replaying log

- check and warn if there are remaining delayed inodes when putting a
root

- fix assertion when building free space tree

- handle csum tree error with mount option 'rescue=ibadroot'

Other:

- error message updates: add prefix to all scrub related messages,
include other information in messages

----------------------------------------------------------------
The following changes since commit eeb133a6341280a1315c12b5b24a42e1fbf35487:

btrfs: move misplaced comment of btrfs_path::keep_locks (2025-05-17 21:15:08 +0200)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git tags/for-6.16-rc3-tag

for you to fetch changes up to c0d90a79e8e65b89037508276b2b31f41a1b3783:

btrfs: zoned: fix alloc_offset calculation for partly conventional block groups (2025-06-19 15:21:15 +0200)

----------------------------------------------------------------
Anand Jain (1):
btrfs: scrub: add prefix for the error messages

Filipe Manana (7):
btrfs: include root in error message when unlinking inode
btrfs: fix a race between renames and directory logging
btrfs: fix double unlock of buffer_tree xarray when releasing subpage eb
btrfs: fix invalid inode pointer dereferences during log replay
btrfs: don't silently ignore unexpected extent type when replaying log
btrfs: fix assertion when building free space tree
btrfs: fix race between async reclaim worker and close_ctree()

Johannes Thumshirn (1):
btrfs: zoned: fix alloc_offset calculation for partly conventional block groups

Josef Bacik (1):
btrfs: don't drop a reference if btrfs_check_write_meta_pointer() fails

Leo Martins (2):
btrfs: fix delayed ref refcount leak in debug assertion
btrfs: warn if leaking delayed_nodes in btrfs_put_root()

Mark Harmstone (1):
btrfs: update superblock's device bytes_used when dropping chunk

Qu Wenruo (1):
btrfs: handle csum tree error with rescue=ibadroots correctly

fs/btrfs/delayed-inode.c | 5 ++-
fs/btrfs/disk-io.c | 27 ++++++++++----
fs/btrfs/extent_io.c | 3 +-
fs/btrfs/free-space-tree.c | 16 ++++++---
fs/btrfs/inode.c | 89 +++++++++++++++++++++++++++++++++++-----------
fs/btrfs/ioctl.c | 2 +-
fs/btrfs/scrub.c | 53 ++++++++++++++-------------
fs/btrfs/tree-log.c | 17 ++++-----
fs/btrfs/volumes.c | 6 ++++
fs/btrfs/zoned.c | 86 ++++++++++++++++++++++++++++++++++++--------
10 files changed, 220 insertions(+), 84 deletions(-)