[51828.123752] run fstests generic/251 at 2023-09-05 11:17:10
[51828.794363] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2655103 /dev/mapper/vg0-lv0 scanned by mount (3810179)
[51828.795023] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[51828.795031] BTRFS info (device dm-0): using free space tree
[51828.799993] BTRFS info (device dm-0): auto enabling async discard
[51829.052556] BTRFS: device fsid c124646d-9b4c-4e14-8bd1-1824d0a8c330 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (3810227)
[51829.071011] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[51829.071020] BTRFS info (device dm-9): turning on sync discard
[51829.071023] BTRFS info (device dm-9): enabling free space tree
[51829.071025] BTRFS info (device dm-9): using free space tree
[51829.075318] BTRFS info (device dm-9): creating free space tree
[51829.076473] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
[51829.076478] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
[51829.087116] BTRFS info (device dm-9): cleaning free space cache v1
[51829.099390] BTRFS info (device dm-9): checking UUID tree

[52801.613196] ======================================================
[52801.613412] WARNING: possible circular locking dependency detected
[52801.613662] 6.5.0+ #1292 Not tainted
[52801.613793] ------------------------------------------------------
[52801.614008] kswapd0/51 is trying to acquire lock:
[52801.614174] ffff929d0fc02388 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[52801.616681] 
               but task is already holding lock:
[52801.616886] ffff929cc5dd3600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[52801.617340] 
               which lock already depends on the new lock.

[52801.617625] 
               the existing dependency chain (in reverse order) is:
[52801.617882] 
               -> #3 (sb_internal#2){++++}-{0:0}:
[52801.618091]        start_transaction+0x3f9/0x740
[52801.618255]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[52801.618458]        btrfs_evict_inode+0x273/0x3c0
[52801.618627]        evict+0xcc/0x1d0
[52801.618947]        inode_lru_isolate+0x14d/0x1e0
[52801.619126]        __list_lru_walk_one+0xbe/0x1c0
[52801.619406]        list_lru_walk_one+0x58/0x80
[52801.619572]        prune_icache_sb+0x39/0x60
[52801.619725]        super_cache_scan+0x167/0x1f0
[52801.619993]        do_shrink_slab+0x163/0x340
[52801.620261]        shrink_slab+0x1d7/0x2a0
[52801.620406]        shrink_node+0x2eb/0x7b0
[52801.620559]        balance_pgdat+0x344/0x780
[52801.620713]        kswapd+0x205/0x410
[52801.620845]        kthread+0xfc/0x130
[52801.621154]        ret_from_fork+0x2d/0x50
[52801.621486]        ret_from_fork_asm+0x1b/0x30
[52801.621777] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[52801.621977]        fs_reclaim_acquire+0xa5/0xe0
[52801.622465]        kmem_cache_alloc_lru+0x4e/0x570
[52801.622834]        btrfs_alloc_inode+0x2d/0x250
[52801.623120]        alloc_inode+0x1a/0xc0
[52801.623261]        iget5_locked+0xba/0x110
[52801.623408]        btrfs_iget+0x43/0xe0
[52801.623546]        create_reloc_inode+0x19d/0x370
[52801.623722]        btrfs_relocate_block_group+0x1b7/0x410
[52801.623911]        btrfs_relocate_chunk+0x4c/0x1b0
[52801.624246]        btrfs_balance+0x8e7/0x11d0
[52801.624404]        btrfs_ioctl+0x1d3d/0x2900
[52801.624574]        __x64_sys_ioctl+0x8b/0xc0
[52801.624898]        do_syscall_64+0x38/0x90
[52801.625288]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[52801.625609] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[52801.625858]        join_transaction+0xb4/0x590
[52801.626018]        start_transaction+0x187/0x740
[52801.626182]        btrfs_uuid_scan_kthread+0x2bc/0x3d0
[52801.626483]        kthread+0xfc/0x130
[52801.626624]        ret_from_fork+0x2d/0x50
[52801.626787]        ret_from_fork_asm+0x1b/0x30
[52801.626960] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[52801.627206]        __lock_acquire+0x1415/0x2190
[52801.627532]        lock_acquire+0xc7/0x2b0
[52801.627685]        join_transaction+0x1de/0x590
[52801.627847]        start_transaction+0x187/0x740
[52801.628011]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[52801.628217]        btrfs_evict_inode+0x273/0x3c0
[52801.628382]        evict+0xcc/0x1d0
[52801.628509]        inode_lru_isolate+0x14d/0x1e0
[52801.628677]        __list_lru_walk_one+0xbe/0x1c0
[52801.628844]        list_lru_walk_one+0x58/0x80
[52801.629003]        prune_icache_sb+0x39/0x60
[52801.629157]        super_cache_scan+0x167/0x1f0
[52801.629318]        do_shrink_slab+0x163/0x340
[52801.629475]        shrink_slab+0x1d7/0x2a0
[52801.629623]        shrink_node+0x2eb/0x7b0
[52801.629771]        balance_pgdat+0x344/0x780
[52801.629929]        kswapd+0x205/0x410
[52801.630061]        kthread+0xfc/0x130
[52801.630194]        ret_from_fork+0x2d/0x50
[52801.630342]        ret_from_fork_asm+0x1b/0x30
[52801.630500] 
               other info that might help us debug this:

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

[52801.631159]  Possible unsafe locking scenario:

[52801.631366]        CPU0                    CPU1
[52801.631526]        ----                    ----
[52801.631691]   rlock(sb_internal#2);
[52801.631818]                                lock(fs_reclaim);
[52801.632015]                                lock(sb_internal#2);
[52801.632223]   rlock(btrfs_trans_num_writers);
[52801.632379] 
                *** DEADLOCK ***

[52801.632588] 4 locks held by kswapd0/51:
[52801.632725]  #0: ffffffff82e62e40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[52801.633008]  #1: ffffffff82e51350 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[52801.633298]  #2: ffff929cc5dd30e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[52801.633623]  #3: ffff929cc5dd3600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[52801.633966] 
               stack backtrace:
[52801.634123] CPU: 0 PID: 51 Comm: kswapd0 Not tainted 6.5.0+ #1292
[52801.634336] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[52801.634632] Call Trace:
[52801.635153]  
[52801.635244]  dump_stack_lvl+0x58/0x90
[52801.635581]  check_noncircular+0x101/0x110
[52801.635729]  __lock_acquire+0x1415/0x2190
[52801.635875]  lock_acquire+0xc7/0x2b0
[52801.636006]  ? join_transaction+0x1af/0x590
[52801.636157]  ? lock_release+0x134/0x270
[52801.636295]  join_transaction+0x1de/0x590
[52801.636440]  ? join_transaction+0x1af/0x590
[52801.636594]  start_transaction+0x187/0x740
[52801.636740]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[52801.636928]  btrfs_evict_inode+0x273/0x3c0
[52801.637075]  ? lock_release+0x134/0x270
[52801.637213]  ? __pfx_wake_bit_function+0x10/0x10
[52801.637592]  evict+0xcc/0x1d0
[52801.637704]  inode_lru_isolate+0x14d/0x1e0
[52801.637851]  __list_lru_walk_one+0xbe/0x1c0
[52801.637999]  ? __pfx_inode_lru_isolate+0x10/0x10
[52801.638166]  ? __pfx_inode_lru_isolate+0x10/0x10
[52801.638347]  list_lru_walk_one+0x58/0x80
[52801.638489]  prune_icache_sb+0x39/0x60
[52801.638632]  super_cache_scan+0x167/0x1f0
[52801.638791]  do_shrink_slab+0x163/0x340
[52801.638930]  ? lock_is_held_type+0xe2/0x140
[52801.639084]  shrink_slab+0x1d7/0x2a0
[52801.639216]  shrink_node+0x2eb/0x7b0
[52801.639349]  balance_pgdat+0x344/0x780
[52801.639490]  kswapd+0x205/0x410
[52801.639611]  ? __pfx_autoremove_wake_function+0x10/0x10
[52801.639796]  ? __pfx_kswapd+0x10/0x10
[52801.639929]  kthread+0xfc/0x130
[52801.640046]  ? __pfx_kthread+0x10/0x10
[52801.640181]  ret_from_fork+0x2d/0x50
[52801.640409]  ? __pfx_kthread+0x10/0x10
[52801.640556]  ret_from_fork_asm+0x1b/0x30
[52801.640703]  
[52888.058057] BTRFS: device fsid c124646d-9b4c-4e14-8bd1-1824d0a8c330 devid 1 transid 156 /dev/mapper/vg0-lv9 scanned by mount (3825362)
[52888.059005] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[52888.059274] BTRFS info (device dm-9): turning on sync discard
[52888.059500] BTRFS info (device dm-9): using free space tree