------------[ cut here ]------------ btree trans held srcu lock (delaying memory reclaim) for 18 seconds WARNING: CPU: 1 PID: 26 at fs/bcachefs/btree_iter.c:3276 check_srcu_held_too_long fs/bcachefs/btree_iter.c:3274 [inline] WARNING: CPU: 1 PID: 26 at fs/bcachefs/btree_iter.c:3276 bch2_trans_srcu_unlock+0x438/0x514 fs/bcachefs/btree_iter.c:3290 Modules linked in: CPU: 1 UID: 0 PID: 26 Comm: kworker/1:1 Not tainted 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: bcachefs_write_ref bch2_do_discards_work pstate: 63400005 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : check_srcu_held_too_long fs/bcachefs/btree_iter.c:3274 [inline] pc : bch2_trans_srcu_unlock+0x438/0x514 fs/bcachefs/btree_iter.c:3290 lr : check_srcu_held_too_long fs/bcachefs/btree_iter.c:3274 [inline] lr : bch2_trans_srcu_unlock+0x438/0x514 fs/bcachefs/btree_iter.c:3290 sp : ffff800097d07700 x29: ffff800097d07730 x28: 1fffe0001ecb2008 x27: dfff800000000000 x26: 0000000000000000 x25: ffff0000f1580000 x24: ffff80008f740000 x23: 1ffff00011ee8040 x22: 00000000ffffafa1 x21: fffffffffffffccc x20: ffff0000f6590000 x19: ffff0000f6590046 x18: 1fffe000337a0688 x17: ffff80008f7be000 x16: ffff80008b007230 x15: 0000000000000001 x14: 1fffe000337a3108 x13: 0000000000000000 x12: 0000000000000000 x11: ffff800093306be8 x10: 0000000000000003 x9 : a725502f727efd00 x8 : a725502f727efd00 x7 : ffff800080491074 x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000001 x3 : 0000000000000010 x2 : 0000000000000006 x1 : ffff80008b6577c0 x0 : 0000000000000001 Call trace: check_srcu_held_too_long fs/bcachefs/btree_iter.c:3274 [inline] (P) bch2_trans_srcu_unlock+0x438/0x514 fs/bcachefs/btree_iter.c:3290 (P) bch2_trans_begin+0x930/0xd30 fs/bcachefs/btree_iter.c:3387 bch2_do_discards_work+0x184/0x740 fs/bcachefs/alloc_background.c:1947 process_one_work+0x7e8/0x155c kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x958/0xed8 kernel/workqueue.c:3400 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 irq event stamp: 2156144 hardirqs last enabled at (2156143): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1531 [inline] hardirqs last enabled at (2156143): [] finish_lock_switch+0xb0/0x1c0 kernel/sched/core.c:5105 hardirqs last disabled at (2156144): [] el1_brk64+0x1c/0x48 arch/arm64/kernel/entry-common.c:574 softirqs last enabled at (2156140): [] softirq_handle_end kernel/softirq.c:425 [inline] softirqs last enabled at (2156140): [] handle_softirqs+0xaf8/0xc88 kernel/softirq.c:607 softirqs last disabled at (2154313): [] __do_softirq+0x14/0x20 kernel/softirq.c:613 ---[ end trace 0000000000000000 ]---