Re: [PATCH v2] btrfs: wait for block group relocation on remount read-only

From: Johannes Thumshirn

Date: Tue Nov 24 2026 - 01:46:02 EST


On 11/18/26 9:25 PM, Miroslav Cimerman wrote:
reclaim work remount read-only
btrfs_reclaim_block_groups()
|-btrfs_relocate_chunk() btrfs_remount_ro()
| Still relocating |-btrfs_set_sb_rdonly()
| \-btrfs_commit_super()
| Returns, read-only
\-Keeps writing, leaves its last
transaction open
unmount
close_ctree()
No commit on a read-only fs

BTRFS warning (device nb2 state I): transaction 65 (with 98304 dirty metadata bytes) is not committed
assertion failed: !found, in fs/btrfs/disk-io.c:4378
kernel BUG at fs/btrfs/disk-io.c:4378!

The bug looks real to me, but Sashiko has another complaint, that looks vaild:

https://sashiko.dev/#/patchset/20261118202548.82001-1-mc%40raidlab.org