[10218.865449] run fstests generic/251 at 2023-08-27 23:43:11
[10219.376978] BTRFS: device fsid 442e5b9d-ccad-458f-8dc7-acd1904d321e devid 1 transid 1484065 /dev/mapper/vg0-lv0 scanned by mount (1544167)
[10219.378261] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[10219.378270] BTRFS info (device dm-0): using free space tree
[10219.384904] BTRFS info (device dm-0): auto enabling async discard
[10219.612448] BTRFS: device fsid 92fa4212-43c0-426c-bc90-989113156c72 devid 1 transid 6 /dev/mapper/vg0-lv7 scanned by mkfs.btrfs (1544215)
[10219.643221] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[10219.643234] BTRFS info (device dm-7): using free space tree
[10219.647356] BTRFS info (device dm-7): auto enabling async discard
[10219.647553] BTRFS info (device dm-7): checking UUID tree

[11067.551455] ======================================================
[11067.551678] WARNING: possible circular locking dependency detected
[11067.551905] 6.5.0-rc7+ #1284 Not tainted
[11067.552090] ------------------------------------------------------
[11067.552314] kswapd0/47 is trying to acquire lock:
[11067.552507] ffff8f3e4738e388 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[11067.552850] 
               but task is already holding lock:
[11067.553125] ffff8f3e54c52600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11067.553465] 
               which lock already depends on the new lock.

[11067.553820] 
               the existing dependency chain (in reverse order) is:
[11067.554130] 
               -> #3 (sb_internal){++++}-{0:0}:
[11067.554395]        start_transaction+0x3f9/0x740
[11067.554591]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[11067.554822]        btrfs_evict_inode+0x273/0x3c0
[11067.555025]        evict+0xcc/0x1d0
[11067.555201]        inode_lru_isolate+0x14d/0x1e0
[11067.555391]        __list_lru_walk_one+0xbe/0x1c0
[11067.555586]        list_lru_walk_one+0x58/0x80
[11067.555777]        prune_icache_sb+0x39/0x60
[11067.555972]        super_cache_scan+0x161/0x1f0
[11067.556162]        do_shrink_slab+0x163/0x340
[11067.556352]        shrink_slab+0x1d7/0x2a0
[11067.556536]        shrink_node+0x2eb/0x7b0
[11067.556720]        balance_pgdat+0x344/0x780
[11067.556911]        kswapd+0x205/0x410
[11067.557082]        kthread+0xfc/0x130
[11067.557258]        ret_from_fork+0x2d/0x50
[11067.557442]        ret_from_fork_asm+0x1b/0x30
[11067.557632] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[11067.557894]        fs_reclaim_acquire+0xa5/0xe0
[11067.558088]        kmem_cache_alloc_lru+0x4e/0x570
[11067.558284]        btrfs_alloc_inode+0x2d/0x250
[11067.558478]        alloc_inode+0x1a/0xc0
[11067.558686]        iget5_locked+0xba/0x110
[11067.558878]        btrfs_iget+0x43/0xe0
[11067.559073]        create_reloc_inode+0x19d/0x370
[11067.559276]        btrfs_relocate_block_group+0x1b7/0x410
[11067.559490]        btrfs_relocate_chunk+0x4c/0x1b0
[11067.559685]        btrfs_balance+0x8e7/0x11d0
[11067.559876]        btrfs_ioctl+0x1d3d/0x2900
[11067.560063]        __x64_sys_ioctl+0x8b/0xc0
[11067.560252]        do_syscall_64+0x38/0x90
[11067.560434]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[11067.560643] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[11067.560951]        join_transaction+0xb4/0x590
[11067.561139]        start_transaction+0x187/0x740
[11067.561338]        btrfs_dirty_inode+0x40/0xd0
[11067.561529]        touch_atime+0x15b/0x280
[11067.561727]        filemap_read+0x2de/0x310
[11067.561920]        vfs_read+0x19e/0x2e0
[11067.562104]        ksys_read+0x55/0xd0
[11067.562283]        do_syscall_64+0x38/0x90
[11067.562480]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[11067.562693] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[11067.562979]        __lock_acquire+0x1415/0x2190
[11067.563175]        lock_acquire+0xc7/0x2b0
[11067.563355]        join_transaction+0x1de/0x590
[11067.563568]        start_transaction+0x187/0x740
[11067.563768]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[11067.564002]        btrfs_evict_inode+0x273/0x3c0
[11067.564194]        evict+0xcc/0x1d0
[11067.564363]        inode_lru_isolate+0x14d/0x1e0
[11067.564559]        __list_lru_walk_one+0xbe/0x1c0
[11067.564758]        list_lru_walk_one+0x58/0x80
[11067.564947]        prune_icache_sb+0x39/0x60
[11067.565134]        super_cache_scan+0x161/0x1f0
[11067.565332]        do_shrink_slab+0x163/0x340
[11067.565523]        shrink_slab+0x1d7/0x2a0
[11067.565713]        shrink_node+0x2eb/0x7b0
[11067.565897]        balance_pgdat+0x344/0x780
[11067.566086]        kswapd+0x205/0x410
[11067.566263]        kthread+0xfc/0x130
[11067.566435]        ret_from_fork+0x2d/0x50
[11067.566617]        ret_from_fork_asm+0x1b/0x30
[11067.566808] 
               other info that might help us debug this:

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

[11067.567613]  Possible unsafe locking scenario:

[11067.567877]        CPU0                    CPU1
[11067.568070]        ----                    ----
[11067.568262]   rlock(sb_internal);
[11067.568425]                                lock(fs_reclaim);
[11067.568639]                                lock(sb_internal);
[11067.568852]   rlock(btrfs_trans_num_writers);
[11067.569046] 
                *** DEADLOCK ***

[11067.569345] 4 locks held by kswapd0/47:
[11067.569521]  #0: ffffffff92e62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[11067.569836]  #1: ffffffff92e507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[11067.570166]  #2: ffff8f3e54c520e0 (&type->s_umount_key#35){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[11067.570513]  #3: ffff8f3e54c52600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11067.570865] 
               stack backtrace:
[11067.571096] CPU: 0 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc7+ #1284
[11067.571341] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[11067.571659] Call Trace:
[11067.571812]  
[11067.571956]  dump_stack_lvl+0x58/0x90
[11067.572147]  check_noncircular+0x101/0x110
[11067.572335]  __lock_acquire+0x1415/0x2190
[11067.572516]  lock_acquire+0xc7/0x2b0
[11067.572688]  ? join_transaction+0x1af/0x590
[11067.572881]  ? lock_release+0x134/0x270
[11067.573059]  join_transaction+0x1de/0x590
[11067.573241]  ? join_transaction+0x1af/0x590
[11067.573428]  start_transaction+0x187/0x740
[11067.573666]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[11067.573903]  btrfs_evict_inode+0x273/0x3c0
[11067.574088]  ? lock_release+0x134/0x270
[11067.574269]  ? __pfx_wake_bit_function+0x10/0x10
[11067.574465]  evict+0xcc/0x1d0
[11067.574625]  inode_lru_isolate+0x14d/0x1e0
[11067.574805]  __list_lru_walk_one+0xbe/0x1c0
[11067.575000]  ? __pfx_inode_lru_isolate+0x10/0x10
[11067.575199]  ? __pfx_inode_lru_isolate+0x10/0x10
[11067.575391]  list_lru_walk_one+0x58/0x80
[11067.575569]  prune_icache_sb+0x39/0x60
[11067.575748]  super_cache_scan+0x161/0x1f0
[11067.575942]  do_shrink_slab+0x163/0x340
[11067.576160]  ? lock_is_held_type+0xe2/0x140
[11067.576355]  shrink_slab+0x1d7/0x2a0
[11067.576533]  shrink_node+0x2eb/0x7b0
[11067.576705]  balance_pgdat+0x344/0x780
[11067.576890]  kswapd+0x205/0x410
[11067.577056]  ? __pfx_autoremove_wake_function+0x10/0x10
[11067.577261]  ? __pfx_kswapd+0x10/0x10
[11067.577432]  kthread+0xfc/0x130
[11067.577600]  ? __pfx_kthread+0x10/0x10
[11067.579014]  ret_from_fork+0x2d/0x50
[11067.579191]  ? __pfx_kthread+0x10/0x10
[11067.579368]  ret_from_fork_asm+0x1b/0x30
[11067.579585]  
[11215.575200] BTRFS warning (device dm-7): failed to trim 10 block group(s), last error -512
[11222.068696] BTRFS: device fsid 92fa4212-43c0-426c-bc90-989113156c72 devid 1 transid 132 /dev/mapper/vg0-lv7 scanned by mount (1554099)
[11222.070503] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[11222.070808] BTRFS info (device dm-7): using free space tree
[11222.073953] BTRFS info (device dm-7): auto enabling async discard