public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] ZONED: Transaction aborted (ENOSPC) during auto-reclaim/balance on 6.18.7-200.fc43
@ 2026-02-01  7:13 Qiyu Yan
  2026-02-01 12:02 ` Qiyu Yan
  0 siblings, 1 reply; 2+ messages in thread
From: Qiyu Yan @ 2026-02-01  7:13 UTC (permalink / raw)
  To: linux-btrfs@vger.kernel.org

Hi all,

I am reporting an issue where a Btrfs filesystem on a zoned device 
forced itself into a read-only state due to an ENOSPC error (-28) during 
a background block group reclaim/relocation process. The related logs 
can be found at: 
https://gist.github.com/karuboniru/4eb8835507f97a6d57f4addf25fab7f7

The environment I am on is Fedora 43 with kernel 6.18.7-200.fc43.x86_64, 
the drive is WD HC650. The issue happened soon after after upgrading to 
6.18 series from 6.17.

The system automatically started relocating block groups (via 
btrfs_reclaim_bgs_work). During this process, a transaction was aborted 
with errno -28 (No space left), despite btrfs filesystem usage 
indicating significant unallocated space and free capacity.

Best,
Qiyu

------------[ cut here ]------------
BTRFS: Transaction aborted (error -28)
BTRFS: error (device sda state A) in __btrfs_free_extent:3237: errno=-28 
No space left
WARNING: CPU: 16 PID: 472499 at fs/btrfs/extent-tree.c:3237 
__btrfs_free_extent.isra.0+0x49d/0xc80
BTRFS info (device sda state EA): forced readonly
BTRFS error (device sda state EA): failed to run delayed ref for logical 
46726206365696 num_bytes 4096 type 184 action 2 ref_mod 1: -28
...
  ? srso_return_thunk+0x5/0x5f
  btrfs_run_delayed_refs_for_head+0x2b0/0x380
  ? srso_return_thunk+0x5/0x5f
  ? btrfs_select_ref_head+0xda/0x140
  __btrfs_run_delayed_refs+0xb8/0x140
  btrfs_run_delayed_refs+0x3b/0x120
  btrfs_start_dirty_block_groups+0x30a/0x5b0
  ? kmem_cache_alloc_noprof+0x14b/0x5a0
  btrfs_commit_transaction+0xb1/0xd20
  ? srso_return_thunk+0x5/0x5f
  ? start_transaction+0x228/0x840
  prepare_to_relocate+0x135/0x1d0
  relocate_block_group+0x6b/0x530
  ? srso_return_thunk+0x5/0x5f
  ? do_zone_finish+0x372/0x400
  btrfs_relocate_block_group+0x256/0x450
  btrfs_relocate_chunk+0x44/0x170
  btrfs_reclaim_bgs_work+0x428/0x570
...

BTRFS info (device sda state EA): dumping space info:
BTRFS info (device sda state EA): space_info DATA (sub-group id 0) has 
216444928 free, is not full
BTRFS info (device sda state EA): space_info total=12228040327168, 
used=10905359462400, pinned=0, reserved=0, may_use=0, readonly=0 
zone_unusable=1322464419840
BTRFS info (device sda state EA): space_info METADATA (sub-group id 0) 
has -34808119296 free, is full
BTRFS info (device sda state EA): space_info total=918049259520, 
used=64758857728, pinned=147456, reserved=1421541376, 
may_use=34808119296, readonly=239616000 zone_unusable=851629096960
BTRFS info (device sda state EA): space_info SYSTEM (sub-group id 0) has 
196608 free, is not full
BTRFS info (device sda state EA): space_info total=268435456, 
used=6455296, pinned=114688, reserved=49152, may_use=0, readonly=0 
zone_unusable=261619712
BTRFS info (device sda state EA): global_block_rsv: size 536870912 
reserved 536870912
BTRFS info (device sda state EA): trans_block_rsv: size 0 reserved 0
BTRFS info (device sda state EA): chunk_block_rsv: size 0 reserved 0
BTRFS info (device sda state EA): delayed_block_rsv: size 0 reserved 0
BTRFS info (device sda state EA): delayed_refs_rsv: size 4676581195776 
reserved 34267054080
BTRFS: error (device sda state EA) in __btrfs_free_extent:3237: 
errno=-28 No space left
BTRFS error (device sda state EA): failed to run delayed ref for logical 
46726206337024 num_bytes 4096 type 184 action 2 ref_mod 1: -28
BTRFS: error (device sda state EA) in btrfs_run_delayed_refs:2161: 
errno=-28 No space left
BTRFS error (device sda state EA): error relocating chunk 48256373489664

$ sudo btrfs fi us /run/media/cold
Overall:
     Device size:          18.19TiB
     Device allocated:          12.79TiB
     Device unallocated:           5.40TiB
     Device missing:             0.00B
     Device slack:             0.00B
     Device zone unusable:       1.98TiB
     Device zone size:         256.00MiB
     Used:              10.04TiB
     Free (estimated):           6.60TiB    (min: 3.90TiB)
     Free (statfs, df):           6.60TiB
     Data ratio:                  1.00
     Metadata ratio:              2.00
     Global reserve:         512.00MiB    (used: 0.00B)
     Multiple profiles:                no

Data,single: Size:11.12TiB, Used:9.92TiB (89.18%)
    /dev/sda      11.12TiB

Metadata,DUP: Size:855.00GiB, Used:60.31GiB (7.05%)
    /dev/sda       1.67TiB

System,DUP: Size:256.00MiB, Used:6.16MiB (2.40%)
    /dev/sda     512.00MiB

Unallocated:
    /dev/sda       5.39TiB



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

* Re: [BUG] ZONED: Transaction aborted (ENOSPC) during auto-reclaim/balance on 6.18.7-200.fc43
  2026-02-01  7:13 [BUG] ZONED: Transaction aborted (ENOSPC) during auto-reclaim/balance on 6.18.7-200.fc43 Qiyu Yan
@ 2026-02-01 12:02 ` Qiyu Yan
  0 siblings, 0 replies; 2+ messages in thread
From: Qiyu Yan @ 2026-02-01 12:02 UTC (permalink / raw)
  To: linux-btrfs@vger.kernel.org

And for your reference, the output of sudo blkzone report /dev/sda| grep 
-vE '(fu|nw)' is following (full output is too long to paste it here)

   start: 0x020000000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0 
non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x040000000, len 0x080000, cap 0x080000, wptr 0x074730 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x200000000, len 0x080000, cap 0x080000, wptr 0x074730 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x4ad380000, len 0x080000, cap 0x080000, wptr 0x07fff8 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x4ad400000, len 0x080000, cap 0x080000, wptr 0x07ffe8 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x600200000, len 0x080000, cap 0x080000, wptr 0x07ffb0 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x635280000, len 0x080000, cap 0x080000, wptr 0x07fff8 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x64f700000, len 0x080000, cap 0x080000, wptr 0x07fff8 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x662f80000, len 0x080000, cap 0x080000, wptr 0x07ff70 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x663000000, len 0x080000, cap 0x080000, wptr 0x07ffd0 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x66ec00000, len 0x080000, cap 0x080000, wptr 0x07fff0 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x671880000, len 0x080000, cap 0x080000, wptr 0x07fff8 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x674b00000, len 0x080000, cap 0x080000, wptr 0x04cac0 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x674b80000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0 
non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x686300000, len 0x080000, cap 0x080000, wptr 0x07ff40 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x686380000, len 0x080000, cap 0x080000, wptr 0x07ff40 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x6ba200000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0 
non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x6bc500000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0 
non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x6bcd00000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0 
non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x6bdb80000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0 
non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x6bfd80000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0 
non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x6d2000000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0 
non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x6d3100000, len 0x080000, cap 0x080000, wptr 0x018ca8 reset:0 
non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]
   start: 0x918580000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0 
non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]

在 2026/2/1 15:13, Qiyu Yan 写道:
> Hi all,
>
> I am reporting an issue where a Btrfs filesystem on a zoned device 
> forced itself into a read-only state due to an ENOSPC error (-28) 
> during a background block group reclaim/relocation process. The 
> related logs can be found at: 
> https://gist.github.com/karuboniru/4eb8835507f97a6d57f4addf25fab7f7
>
> The environment I am on is Fedora 43 with kernel 
> 6.18.7-200.fc43.x86_64, the drive is WD HC650. The issue happened soon 
> after after upgrading to 6.18 series from 6.17.
>
> The system automatically started relocating block groups (via 
> btrfs_reclaim_bgs_work). During this process, a transaction was 
> aborted with errno -28 (No space left), despite btrfs filesystem usage 
> indicating significant unallocated space and free capacity.
>
> Best,
> Qiyu
>
> ------------[ cut here ]------------
> BTRFS: Transaction aborted (error -28)
> BTRFS: error (device sda state A) in __btrfs_free_extent:3237: 
> errno=-28 No space left
> WARNING: CPU: 16 PID: 472499 at fs/btrfs/extent-tree.c:3237 
> __btrfs_free_extent.isra.0+0x49d/0xc80
> BTRFS info (device sda state EA): forced readonly
> BTRFS error (device sda state EA): failed to run delayed ref for 
> logical 46726206365696 num_bytes 4096 type 184 action 2 ref_mod 1: -28
> ...
>  ? srso_return_thunk+0x5/0x5f
>  btrfs_run_delayed_refs_for_head+0x2b0/0x380
>  ? srso_return_thunk+0x5/0x5f
>  ? btrfs_select_ref_head+0xda/0x140
>  __btrfs_run_delayed_refs+0xb8/0x140
>  btrfs_run_delayed_refs+0x3b/0x120
>  btrfs_start_dirty_block_groups+0x30a/0x5b0
>  ? kmem_cache_alloc_noprof+0x14b/0x5a0
>  btrfs_commit_transaction+0xb1/0xd20
>  ? srso_return_thunk+0x5/0x5f
>  ? start_transaction+0x228/0x840
>  prepare_to_relocate+0x135/0x1d0
>  relocate_block_group+0x6b/0x530
>  ? srso_return_thunk+0x5/0x5f
>  ? do_zone_finish+0x372/0x400
>  btrfs_relocate_block_group+0x256/0x450
>  btrfs_relocate_chunk+0x44/0x170
>  btrfs_reclaim_bgs_work+0x428/0x570
> ...
>
> BTRFS info (device sda state EA): dumping space info:
> BTRFS info (device sda state EA): space_info DATA (sub-group id 0) has 
> 216444928 free, is not full
> BTRFS info (device sda state EA): space_info total=12228040327168, 
> used=10905359462400, pinned=0, reserved=0, may_use=0, readonly=0 
> zone_unusable=1322464419840
> BTRFS info (device sda state EA): space_info METADATA (sub-group id 0) 
> has -34808119296 free, is full
> BTRFS info (device sda state EA): space_info total=918049259520, 
> used=64758857728, pinned=147456, reserved=1421541376, 
> may_use=34808119296, readonly=239616000 zone_unusable=851629096960
> BTRFS info (device sda state EA): space_info SYSTEM (sub-group id 0) 
> has 196608 free, is not full
> BTRFS info (device sda state EA): space_info total=268435456, 
> used=6455296, pinned=114688, reserved=49152, may_use=0, readonly=0 
> zone_unusable=261619712
> BTRFS info (device sda state EA): global_block_rsv: size 536870912 
> reserved 536870912
> BTRFS info (device sda state EA): trans_block_rsv: size 0 reserved 0
> BTRFS info (device sda state EA): chunk_block_rsv: size 0 reserved 0
> BTRFS info (device sda state EA): delayed_block_rsv: size 0 reserved 0
> BTRFS info (device sda state EA): delayed_refs_rsv: size 4676581195776 
> reserved 34267054080
> BTRFS: error (device sda state EA) in __btrfs_free_extent:3237: 
> errno=-28 No space left
> BTRFS error (device sda state EA): failed to run delayed ref for 
> logical 46726206337024 num_bytes 4096 type 184 action 2 ref_mod 1: -28
> BTRFS: error (device sda state EA) in btrfs_run_delayed_refs:2161: 
> errno=-28 No space left
> BTRFS error (device sda state EA): error relocating chunk 48256373489664
>
> $ sudo btrfs fi us /run/media/cold
> Overall:
>     Device size:          18.19TiB
>     Device allocated:          12.79TiB
>     Device unallocated:           5.40TiB
>     Device missing:             0.00B
>     Device slack:             0.00B
>     Device zone unusable:       1.98TiB
>     Device zone size:         256.00MiB
>     Used:              10.04TiB
>     Free (estimated):           6.60TiB    (min: 3.90TiB)
>     Free (statfs, df):           6.60TiB
>     Data ratio:                  1.00
>     Metadata ratio:              2.00
>     Global reserve:         512.00MiB    (used: 0.00B)
>     Multiple profiles:                no
>
> Data,single: Size:11.12TiB, Used:9.92TiB (89.18%)
>    /dev/sda      11.12TiB
>
> Metadata,DUP: Size:855.00GiB, Used:60.31GiB (7.05%)
>    /dev/sda       1.67TiB
>
> System,DUP: Size:256.00MiB, Used:6.16MiB (2.40%)
>    /dev/sda     512.00MiB
>
> Unallocated:
>    /dev/sda       5.39TiB
>


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

end of thread, other threads:[~2026-02-01 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-01  7:13 [BUG] ZONED: Transaction aborted (ENOSPC) during auto-reclaim/balance on 6.18.7-200.fc43 Qiyu Yan
2026-02-01 12:02 ` Qiyu Yan

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