[12185.470791] run fstests generic/251 at 2023-10-28 00:15:21
[12185.899064] BTRFS: device fsid 442e5b9d-ccad-458f-8dc7-acd1904d321e devid 1 transid 1733055 /dev/mapper/vg0-lv0 scanned by mount (1596482)
[12185.899960] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[12185.899966] BTRFS info (device dm-0): using free space tree
[12185.904246] BTRFS info (device dm-0): auto enabling async discard
[12186.859398] BTRFS: device fsid aaf2593f-dcc3-40f3-86fa-075666af1a08 devid 1 transid 6 /dev/mapper/vg0-lv7 scanned by mount (1596540)
[12186.861889] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[12186.861897] BTRFS info (device dm-7): using free space tree
[12186.865874] BTRFS info (device dm-7): auto enabling async discard
[12186.866000] BTRFS info (device dm-7): checking UUID tree

[12658.349254] ======================================================
[12658.349442] WARNING: possible circular locking dependency detected
[12658.349773] 6.6.0-rc7+ #1341 Not tainted
[12658.349948] ------------------------------------------------------
[12658.350215] kswapd0/50 is trying to acquire lock:
[12658.350383] ffff9465c57ee390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[12658.351431] 
               but task is already holding lock:
[12658.351670] ffff9465dff79600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[12658.352259] 
               which lock already depends on the new lock.

[12658.352569] 
               the existing dependency chain (in reverse order) is:
[12658.352825] 
               -> #3 (sb_internal){++++}-{0:0}:
[12658.353047]        start_transaction+0x493/0xad0
[12658.353215]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[12658.353397]        btrfs_evict_inode+0x273/0x3c0
[12658.353888]        evict+0xcc/0x1d0
[12658.354247]        inode_lru_isolate+0x14d/0x1e0
[12658.354415]        __list_lru_walk_one+0xbe/0x1c0
[12658.354794]        list_lru_walk_one+0x58/0x80
[12658.354956]        prune_icache_sb+0x39/0x60
[12658.355116]        super_cache_scan+0x167/0x1f0
[12658.355502]        do_shrink_slab+0x163/0x340
[12658.355883]        shrink_slab+0x1d7/0x2a0
[12658.356038]        shrink_node+0x2eb/0x7b0
[12658.356195]        balance_pgdat+0x344/0x780
[12658.356356]        kswapd+0x205/0x410
[12658.356503]        kthread+0xff/0x130
[12658.356660]        ret_from_fork+0x2d/0x50
[12658.356820]        ret_from_fork_asm+0x1b/0x30
[12658.356981] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[12658.357213]        fs_reclaim_acquire+0xa2/0xe0
[12658.357648]        kmem_cache_alloc_lru+0x4e/0x600
[12658.358084]        btrfs_alloc_inode+0x2d/0x250
[12658.358366]        alloc_inode+0x1a/0xc0
[12658.358531]        iget5_locked+0xba/0x110
[12658.358696]        btrfs_iget+0x43/0xe0
[12658.358848]        create_reloc_inode+0x1a0/0x360
[12658.359011]        btrfs_relocate_block_group+0x1d2/0x3d0
[12658.359213]        btrfs_relocate_chunk+0x4c/0x1b0
[12658.359401]        btrfs_balance+0x8e7/0x11d0
[12658.359588]        btrfs_ioctl+0x1c25/0x2860
[12658.359776]        __x64_sys_ioctl+0x8b/0xc0
[12658.360163]        do_syscall_64+0x38/0x90
[12658.360507]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[12658.360955] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[12658.361252]        join_transaction+0xaf/0x580
[12658.361432]        start_transaction+0x1a0/0xad0
[12658.361602]        btrfs_dirty_inode+0x40/0xd0
[12658.361805]        touch_atime+0x133/0x220
[12658.361998]        iterate_dir+0x117/0x180
[12658.362156]        __x64_sys_getdents64+0x6a/0x120
[12658.362340]        do_syscall_64+0x38/0x90
[12658.362496]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[12658.362690] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[12658.362931]        __lock_acquire+0x1415/0x2190
[12658.363097]        lock_acquire+0xc7/0x2b0
[12658.363310]        join_transaction+0x1e4/0x580
[12658.363481]        start_transaction+0x1a0/0xad0
[12658.363662]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[12658.363849]        btrfs_evict_inode+0x273/0x3c0
[12658.364018]        evict+0xcc/0x1d0
[12658.364166]        inode_lru_isolate+0x14d/0x1e0
[12658.364328]        __list_lru_walk_one+0xbe/0x1c0
[12658.364496]        list_lru_walk_one+0x58/0x80
[12658.364663]        prune_icache_sb+0x39/0x60
[12658.364825]        super_cache_scan+0x167/0x1f0
[12658.364988]        do_shrink_slab+0x163/0x340
[12658.365149]        shrink_slab+0x1d7/0x2a0
[12658.365307]        shrink_node+0x2eb/0x7b0
[12658.365466]        balance_pgdat+0x344/0x780
[12658.365628]        kswapd+0x205/0x410
[12658.365775]        kthread+0xff/0x130
[12658.365926]        ret_from_fork+0x2d/0x50
[12658.366083]        ret_from_fork_asm+0x1b/0x30
[12658.366246] 
               other info that might help us debug this:

[12658.366540] Chain exists of:
                 btrfs_trans_num_writers --> fs_reclaim --> sb_internal

[12658.366937]  Possible unsafe locking scenario:

[12658.367170]        CPU0                    CPU1
[12658.367329]        ----                    ----
[12658.367491]   rlock(sb_internal);
[12658.367643]                                lock(fs_reclaim);
[12658.367825]                                lock(sb_internal);
[12658.368009]   rlock(btrfs_trans_num_writers);
[12658.368168] 
                *** DEADLOCK ***

[12658.369555] 4 locks held by kswapd0/50:
[12658.369751]  #0: ffffffff8de62ea0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[12658.370074]  #1: ffffffff8de513b0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[12658.370393]  #2: ffff9465dff790e0 (&type->s_umount_key#35){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[12658.370746]  #3: ffff9465dff79600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[12658.371052] 
               stack backtrace:
[12658.371255] CPU: 1 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc7+ #1341
[12658.371454] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[12658.371786] Call Trace:
[12658.371918]  
[12658.372060]  dump_stack_lvl+0x58/0x90
[12658.372502]  check_noncircular+0x101/0x110
[12658.372703]  __lock_acquire+0x1415/0x2190
[12658.372909]  lock_acquire+0xc7/0x2b0
[12658.373098]  ? join_transaction+0x1d0/0x580
[12658.373261]  ? lock_release+0x134/0x270
[12658.373417]  ? join_transaction+0x1d0/0x580
[12658.373584]  ? join_transaction+0x3d/0x580
[12658.373749]  join_transaction+0x1e4/0x580
[12658.373909]  ? join_transaction+0x1d0/0x580
[12658.374141]  start_transaction+0x1a0/0xad0
[12658.374332]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[12658.374523]  btrfs_evict_inode+0x273/0x3c0
[12658.374694]  ? lock_release+0x134/0x270
[12658.374849]  ? __pfx_wake_bit_function+0x10/0x10
[12658.375017]  evict+0xcc/0x1d0
[12658.375153]  inode_lru_isolate+0x14d/0x1e0
[12658.375309]  __list_lru_walk_one+0xbe/0x1c0
[12658.375470]  ? __pfx_inode_lru_isolate+0x10/0x10
[12658.375643]  ? __pfx_inode_lru_isolate+0x10/0x10
[12658.375808]  list_lru_walk_one+0x58/0x80
[12658.375962]  prune_icache_sb+0x39/0x60
[12658.376115]  super_cache_scan+0x167/0x1f0
[12658.376272]  do_shrink_slab+0x163/0x340
[12658.376427]  shrink_slab+0x1d7/0x2a0
[12658.376585]  shrink_node+0x2eb/0x7b0
[12658.376772]  balance_pgdat+0x344/0x780
[12658.376927]  kswapd+0x205/0x410
[12658.377067]  ? __pfx_autoremove_wake_function+0x10/0x10
[12658.377245]  ? __pfx_kswapd+0x10/0x10
[12658.377396]  kthread+0xff/0x130
[12658.377536]  ? __pfx_kthread+0x10/0x10
[12658.377693]  ret_from_fork+0x2d/0x50
[12658.377844]  ? __pfx_kthread+0x10/0x10
[12658.377994]  ret_from_fork_asm+0x1b/0x30
[12658.378150]  
[13015.926775] BTRFS warning (device dm-7): failed to trim 7 block group(s), last error -512
[13022.111414] BTRFS: device fsid aaf2593f-dcc3-40f3-86fa-075666af1a08 devid 1 transid 94 /dev/mapper/vg0-lv7 scanned by mount (1605828)
[13022.112996] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[13022.113443] BTRFS info (device dm-7): using free space tree
[13022.116753] BTRFS info (device dm-7): auto enabling async discard