[12175.836189] run fstests generic/251 at 2023-11-17 00:17:00
[12176.318427] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 3193783 /dev/mapper/vg0-lv0 scanned by mount (1593455)
[12176.319446] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[12176.319452] BTRFS info (device dm-0): using free space tree
[12176.323254] BTRFS info (device dm-0): auto enabling async discard
[12176.573524] BTRFS: device fsid e7efb379-62e9-40f9-898d-85c23efc55ab devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (1593513)
[12176.573990] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[12176.573998] BTRFS info (device dm-9): turning on async discard
[12176.574000] BTRFS info (device dm-9): disk space caching is enabled
[12176.577885] BTRFS info (device dm-9): checking UUID tree

[12640.419831] ======================================================
[12640.420257] WARNING: possible circular locking dependency detected
[12640.420676] 6.7.0-rc1+ #1361 Not tainted
[12640.420951] ------------------------------------------------------
[12640.421395] kswapd0/50 is trying to acquire lock:
[12640.421714] ffff8e8e82ffa390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[12640.422386] 
               but task is already holding lock:
[12640.422773] ffff8e8e8bf61608 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[12640.423443] 
               which lock already depends on the new lock.

[12640.423946] 
               the existing dependency chain (in reverse order) is:
[12640.424452] 
               -> #3 (sb_internal#2){++++}-{0:0}:
[12640.424845]        start_transaction+0x493/0xad0
[12640.425171]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[12640.425564]        btrfs_evict_inode+0x273/0x3c0
[12640.425878]        evict+0xcc/0x1d0
[12640.426260]        inode_lru_isolate+0x14d/0x1e0
[12640.426701]        __list_lru_walk_one+0xbe/0x1c0
[12640.427160]        list_lru_walk_one+0x58/0x80
[12640.427545]        prune_icache_sb+0x39/0x60
[12640.427956]        super_cache_scan+0x151/0x1d0
[12640.428340]        do_shrink_slab+0x164/0x670
[12640.428734]        shrink_slab+0x54a/0x8b0
[12640.429078]        shrink_node+0x2eb/0x7b0
[12640.429430]        balance_pgdat+0x359/0x790
[12640.429790]        kswapd+0x205/0x410
[12640.430103]        kthread+0xff/0x130
[12640.430474]        ret_from_fork+0x2d/0x50
[12640.430865]        ret_from_fork_asm+0x1b/0x30
[12640.431324] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[12640.431731]        fs_reclaim_acquire+0xa2/0xe0
[12640.432020]        kmem_cache_alloc_lru+0x4e/0x720
[12640.432426]        btrfs_alloc_inode+0x2d/0x250
[12640.432809]        alloc_inode+0x1a/0xc0
[12640.433141]        iget5_locked+0xba/0x110
[12640.433486]        btrfs_iget+0x43/0xe0
[12640.433780]        create_reloc_inode+0x1a0/0x360
[12640.434156]        btrfs_relocate_block_group+0x1d2/0x3d0
[12640.434604]        btrfs_relocate_chunk+0x4c/0x1b0
[12640.434996]        btrfs_balance+0x8e7/0x11d0
[12640.435375]        btrfs_ioctl+0x1c06/0x2840
[12640.435728]        __x64_sys_ioctl+0x8b/0xc0
[12640.436087]        do_syscall_64+0x3e/0xf0
[12640.436442]        entry_SYSCALL_64_after_hwframe+0x6e/0x76
[12640.436788] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[12640.437338]        join_transaction+0xaf/0x580
[12640.437714]        start_transaction+0x1a0/0xad0
[12640.438105]        btrfs_uuid_scan_kthread+0x2bc/0x3d0
[12640.438596]        kthread+0xff/0x130
[12640.438916]        ret_from_fork+0x2d/0x50
[12640.439263]        ret_from_fork_asm+0x1b/0x30
[12640.439647] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[12640.440207]        __lock_acquire+0x1415/0x2190
[12640.440607]        lock_acquire+0xc7/0x2b0
[12640.440954]        join_transaction+0x1e4/0x580
[12640.441328]        start_transaction+0x1a0/0xad0
[12640.441709]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[12640.442191]        btrfs_evict_inode+0x273/0x3c0
[12640.442584]        evict+0xcc/0x1d0
[12640.442879]        inode_lru_isolate+0x14d/0x1e0
[12640.443266]        __list_lru_walk_one+0xbe/0x1c0
[12640.443664]        list_lru_walk_one+0x58/0x80
[12640.444038]        prune_icache_sb+0x39/0x60
[12640.444401]        super_cache_scan+0x151/0x1d0
[12640.444777]        do_shrink_slab+0x164/0x670
[12640.445139]        shrink_slab+0x54a/0x8b0
[12640.445484]        shrink_node+0x2eb/0x7b0
[12640.445828]        balance_pgdat+0x359/0x790
[12640.446183]        kswapd+0x205/0x410
[12640.446491]        kthread+0xff/0x130
[12640.446802]        ret_from_fork+0x2d/0x50
[12640.447141]        ret_from_fork_asm+0x1b/0x30
[12640.447484] 
               other info that might help us debug this:

[12640.448010] Chain exists of:
                 btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2

[12640.448880]  Possible unsafe locking scenario:

[12640.449369]        CPU0                    CPU1
[12640.449744]        ----                    ----
[12640.450122]   rlock(sb_internal#2);
[12640.450426]                                lock(fs_reclaim);
[12640.450891]                                lock(sb_internal#2);
[12640.451385]   rlock(btrfs_trans_num_writers);
[12640.451752] 
                *** DEADLOCK ***

[12640.452296] 3 locks held by kswapd0/50:
[12640.452627]  #0: ffffffffade64880 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x400/0x790
[12640.453300]  #1: ffff8e8e8bf610e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x33/0x1d0
[12640.454078]  #2: ffff8e8e8bf61608 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[12640.454721] 
               stack backtrace:
[12640.454983] CPU: 1 PID: 50 Comm: kswapd0 Not tainted 6.7.0-rc1+ #1361
[12640.455370] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[12640.455975] Call Trace:
[12640.456211]  
[12640.456349]  dump_stack_lvl+0x58/0x90
[12640.456594]  check_noncircular+0x101/0x110
[12640.456846]  __lock_acquire+0x1415/0x2190
[12640.457143]  lock_acquire+0xc7/0x2b0
[12640.457406]  ? join_transaction+0x1d0/0x580
[12640.457701]  ? lock_release+0x134/0x270
[12640.457970]  ? join_transaction+0x1d0/0x580
[12640.458259]  ? join_transaction+0x3d/0x580
[12640.458555]  join_transaction+0x1e4/0x580
[12640.458836]  ? join_transaction+0x1d0/0x580
[12640.459130]  start_transaction+0x1a0/0xad0
[12640.459426]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[12640.459789]  btrfs_evict_inode+0x273/0x3c0
[12640.460086]  ? lock_release+0x134/0x270
[12640.460346]  ? __pfx_wake_bit_function+0x10/0x10
[12640.460683]  evict+0xcc/0x1d0
[12640.460895]  inode_lru_isolate+0x14d/0x1e0
[12640.461186]  __list_lru_walk_one+0xbe/0x1c0
[12640.461472]  ? __pfx_inode_lru_isolate+0x10/0x10
[12640.461760]  ? __pfx_inode_lru_isolate+0x10/0x10
[12640.462082]  list_lru_walk_one+0x58/0x80
[12640.462344]  prune_icache_sb+0x39/0x60
[12640.462621]  super_cache_scan+0x151/0x1d0
[12640.462921]  do_shrink_slab+0x164/0x670
[12640.463182]  shrink_slab+0x54a/0x8b0
[12640.463428]  ? shrink_slab+0x420/0x8b0
[12640.463696]  ? shrink_slab+0x371/0x8b0
[12640.463956]  shrink_node+0x2eb/0x7b0
[12640.464274]  balance_pgdat+0x359/0x790
[12640.464715]  kswapd+0x205/0x410
[12640.465103]  ? __pfx_autoremove_wake_function+0x10/0x10
[12640.465663]  ? __pfx_kswapd+0x10/0x10
[12640.466060]  kthread+0xff/0x130
[12640.466432]  ? __pfx_kthread+0x10/0x10
[12640.466869]  ret_from_fork+0x2d/0x50
[12640.467278]  ? __pfx_kthread+0x10/0x10
[12640.467699]  ret_from_fork_asm+0x1b/0x30
[12640.468141]  
[13065.960735] BTRFS warning (device dm-9): failed to trim 9 block group(s), last error -512
[13072.215691] BTRFS: device fsid e7efb379-62e9-40f9-898d-85c23efc55ab devid 1 transid 118 /dev/mapper/vg0-lv9 scanned by mount (1601632)
[13072.216834] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[13072.217301] BTRFS info (device dm-9): turning on async discard
[13072.217681] BTRFS info (device dm-9): disk space caching is enabled
[13072.227552] BTRFS warning (device dm-9): block group 30408704 has wrong amount of free space
[13072.228181] BTRFS warning (device dm-9): failed to load free space cache for block group 30408704, rebuilding it now