INFO: task bch-reclaim/loo:9879 blocked for more than 143 seconds.
      Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094-dirty #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:bch-reclaim/loo state:D stack:17272 pid:9879  tgid:9879  ppid:2      task_flags:0x200040 flags:0x00004000
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 schedule_preempt_disabled+0x13/0x30
 __mutex_lock+0x7e6/0x1360
 bch2_journal_reclaim_thread+0x16b/0x4f0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/34:
 #0: ffffffff8e139ee0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180
4 locks held by kworker/0:1H/61:
 #0: ffff8880230a2948 ((wq_completion)bcachefs_btree_write_complete){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90000f17bc0 ((work_completion)(&wb->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff88802ed04398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0xaf/0x220
 #3: ffff88802ed26710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
2 locks held by getty/5673:
 #0: ffff888026e170a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70
 #1: ffffc900029032f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400
6 locks held by syz-executor/9638:
 #0: ffff8880225540e0 (&type->s_umount_key#62){++++}-{4:4}, at: deactivate_super+0xa9/0xe0
 #1: ffff88802ed00278 (&c->state_lock){++++}-{4:4}, at: __bch2_fs_stop+0xf8/0x900
 #2: ffff88802ed4af68 (&j->reclaim_lock){+.+.}-{4:4}, at: journal_flush_done+0x86/0x810
 #3: ffff88802ed04398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #4: ffff88802ed04740 (&wb->flushing.lock){+.+.}-{4:4}, at: btree_write_buffer_flush_seq+0x18bd/0x1a40
 #5: ffff88802ed26710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
1 lock held by bch-reclaim/loo/9879:
 #0: ffff88802ed4af68 (&j->reclaim_lock){+.+.}-{4:4}, at: bch2_journal_reclaim_thread+0x16b/0x4f0
1 lock held by syz.7.949/10891:
 #0: ffff8880225540e0 (&type->s_umount_key#62){++++}-{4:4}, at: super_lock+0x2a9/0x3b0

=============================================

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 34 Comm: khungtaskd Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094-dirty #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250
 nmi_cpu_backtrace+0x39e/0x3d0
 nmi_trigger_cpumask_backtrace+0x17a/0x300
 watchdog+0xf93/0xfe0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 6036 Comm: udevd Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094-dirty #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
RIP: 0010:serial8250_console_write+0x34c/0x1ba0
Code: 48 85 c0 74 7d 4d 89 ec 48 89 44 24 18 4c 8d 68 4a 4c 89 e8 48 c1 e8 03 42 0f b6 04 20 84 c0 0f 85 da 16 00 00 45 0f bf 6d 00 <49> 81 c7 74 01 00 00 4c 89 f8 48 c1 e8 03 42 0f b6 04 20 84 c0 0f
RSP: 0018:ffffc9000358f440 EFLAGS: 00000046
RAX: 0000000000000000 RBX: 1ffffffff33bdc94 RCX: ffff888021e59cc0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc9000358f5f0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff520006b1e64 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffffff99dee4a0 R15: ffffffff99dee360
FS:  00007fd7d5d08c80(0000) GS:ffff8881a3c1c000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc8aa6dff8 CR3: 000000002eeda000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 console_flush_all+0x728/0xc40
 console_unlock+0xc4/0x270
 vprintk_emit+0x5b7/0x7a0
 devkmsg_emit+0xd6/0x120
 devkmsg_write+0x279/0x3f0
 do_iter_readv_writev+0x61c/0x8b0
 vfs_writev+0x31a/0x960
 do_writev+0x14d/0x2d0
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd7d591ae03
Code: 89 c7 48 89 44 24 08 e8 6a f2 f9 ff 48 8b 44 24 08 48 83 c4 28 c3 c3 64 8b 04 25 18 00 00 00 85 c0 75 20 b8 14 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 6d 48 8b 15 f6 5f 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007fff587c7c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd7d591ae03
RDX: 0000000000000005 RSI: 00007fff587c7ce0 RDI: 0000000000000005
RBP: 00007fff587c7ce0 R08: 000000000000c0c0 R09: 00007fff587c75f8
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000001b
R13: 00007fff587c7e08 R14: 0000000000000000 R15: 00007fff587c7d68
 </TASK>
