[13268.356719] run fstests generic/251 at 2023-09-21 00:35:00
[13269.031852] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2761788 /dev/mapper/vg0-lv0 scanned by mount (1659107)
[13269.032432] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[13269.032440] BTRFS info (device dm-0): using free space tree
[13269.036846] BTRFS info (device dm-0): auto enabling async discard
[13269.652890] BTRFS: device fsid 0228e196-f91e-4f25-b29d-06bca17c4c35 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (1659166)
[13269.654364] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[13269.654375] BTRFS info (device dm-9): turning on async discard
[13269.654378] BTRFS info (device dm-9): disk space caching is enabled
[13269.660646] BTRFS info (device dm-9): checking UUID tree

[13782.162771] ======================================================
[13782.163027] WARNING: possible circular locking dependency detected
[13782.163277] 6.6.0-rc2+ #1308 Not tainted
[13782.163538] ------------------------------------------------------
[13782.163815] kswapd0/50 is trying to acquire lock:
[13782.164021] ffff8918c21ee398 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[13782.166539] 
               but task is already holding lock:
[13782.166804] ffff8918c2162600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[13782.167238] 
               which lock already depends on the new lock.

[13782.167604] 
               the existing dependency chain (in reverse order) is:
[13782.167955] 
               -> #3 (sb_internal#2){++++}-{0:0}:
[13782.168200]        start_transaction+0x493/0xad0
[13782.168421]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[13782.168669]        btrfs_evict_inode+0x273/0x3c0
[13782.168874]        evict+0xcc/0x1d0
[13782.169335]        inode_lru_isolate+0x14d/0x1e0
[13782.169526]        __list_lru_walk_one+0xbe/0x1c0
[13782.170292]        list_lru_walk_one+0x58/0x80
[13782.170502]        prune_icache_sb+0x39/0x60
[13782.170683]        super_cache_scan+0x167/0x1f0
[13782.170879]        do_shrink_slab+0x163/0x340
[13782.171243]        shrink_slab+0x1d7/0x2a0
[13782.171479]        shrink_node+0x2eb/0x7b0
[13782.171649]        balance_pgdat+0x344/0x780
[13782.171859]        kswapd+0x205/0x410
[13782.172083]        kthread+0xff/0x130
[13782.172891]        ret_from_fork+0x2d/0x50
[13782.173450]        ret_from_fork_asm+0x1b/0x30
[13782.173927] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[13782.174160]        fs_reclaim_acquire+0xa2/0xe0
[13782.174350]        kmem_cache_alloc_lru+0x4e/0x600
[13782.174791]        btrfs_alloc_inode+0x2d/0x250
[13782.174989]        alloc_inode+0x1a/0xc0
[13782.175196]        iget5_locked+0xba/0x110
[13782.175437]        btrfs_iget+0x43/0xe0
[13782.175645]        create_reloc_inode+0x1a0/0x370
[13782.175906]        btrfs_relocate_block_group+0x1b7/0x410
[13782.176127]        btrfs_relocate_chunk+0x4c/0x1b0
[13782.176324]        btrfs_balance+0x8e7/0x11d0
[13782.176536]        btrfs_ioctl+0x1bb4/0x28b0
[13782.176729]        __x64_sys_ioctl+0x8b/0xc0
[13782.176918]        do_syscall_64+0x38/0x90
[13782.178276]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[13782.179276] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[13782.179623]        join_transaction+0xaf/0x580
[13782.179814]        start_transaction+0x1a0/0xad0
[13782.180021]        btrfs_uuid_scan_kthread+0x2bc/0x3d0
[13782.180238]        kthread+0xff/0x130
[13782.180398]        ret_from_fork+0x2d/0x50
[13782.180574]        ret_from_fork_asm+0x1b/0x30
[13782.180765] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[13782.181057]        __lock_acquire+0x1415/0x2190
[13782.181259]        lock_acquire+0xc7/0x2b0
[13782.181433]        join_transaction+0x1e4/0x580
[13782.181628]        start_transaction+0x1a0/0xad0
[13782.181824]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[13782.182075]        btrfs_evict_inode+0x273/0x3c0
[13782.182272]        evict+0xcc/0x1d0
[13782.182432]        inode_lru_isolate+0x14d/0x1e0
[13782.182629]        __list_lru_walk_one+0xbe/0x1c0
[13782.182831]        list_lru_walk_one+0x58/0x80
[13782.183027]        prune_icache_sb+0x39/0x60
[13782.183210]        super_cache_scan+0x167/0x1f0
[13782.183403]        do_shrink_slab+0x163/0x340
[13782.183591]        shrink_slab+0x1d7/0x2a0
[13782.183766]        shrink_node+0x2eb/0x7b0
[13782.183945]        balance_pgdat+0x344/0x780
[13782.184130]        kswapd+0x205/0x410
[13782.184291]        kthread+0xff/0x130
[13782.184450]        ret_from_fork+0x2d/0x50
[13782.184623]        ret_from_fork_asm+0x1b/0x30
[13782.184815] 
               other info that might help us debug this:

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

[13782.185651]  Possible unsafe locking scenario:

[13782.185905]        CPU0                    CPU1
[13782.186095]        ----                    ----
[13782.186284]   rlock(sb_internal#2);
[13782.186436]                                lock(fs_reclaim);
[13782.186673]                                lock(sb_internal#2);
[13782.186926]   rlock(btrfs_trans_num_writers);
[13782.187111] 
                *** DEADLOCK ***

[13782.187357] 4 locks held by kswapd0/50:
[13782.187521]  #0: ffffffffaee62e40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[13782.187867]  #1: ffffffffaee51350 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[13782.188211]  #2: ffff8918c21620e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[13782.188597]  #3: ffff8918c2162600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[13782.189017] 
               stack backtrace:
[13782.189207] CPU: 1 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc2+ #1308
[13782.189477] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[13782.189877] Call Trace:
[13782.189992]  
[13782.190091]  dump_stack_lvl+0x58/0x90
[13782.190534]  check_noncircular+0x101/0x110
[13782.190712]  __lock_acquire+0x1415/0x2190
[13782.190900]  lock_acquire+0xc7/0x2b0
[13782.191057]  ? join_transaction+0x1d0/0x580
[13782.191241]  ? lock_release+0x134/0x270
[13782.191407]  ? join_transaction+0x1d0/0x580
[13782.191584]  ? join_transaction+0x3d/0x580
[13782.191761]  join_transaction+0x1e4/0x580
[13782.191939]  ? join_transaction+0x1d0/0x580
[13782.192119]  start_transaction+0x1a0/0xad0
[13782.192297]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[13782.192522]  btrfs_evict_inode+0x273/0x3c0
[13782.192701]  ? lock_release+0x134/0x270
[13782.192876]  ? __pfx_wake_bit_function+0x10/0x10
[13782.193076]  evict+0xcc/0x1d0
[13782.193210]  inode_lru_isolate+0x14d/0x1e0
[13782.193387]  __list_lru_walk_one+0xbe/0x1c0
[13782.193575]  ? __pfx_inode_lru_isolate+0x10/0x10
[13782.193779]  ? __pfx_inode_lru_isolate+0x10/0x10
[13782.193984]  list_lru_walk_one+0x58/0x80
[13782.194156]  prune_icache_sb+0x39/0x60
[13782.194321]  super_cache_scan+0x167/0x1f0
[13782.194494]  do_shrink_slab+0x163/0x340
[13782.194662]  shrink_slab+0x1d7/0x2a0
[13782.194821]  shrink_node+0x2eb/0x7b0
[13782.194992]  balance_pgdat+0x344/0x780
[13782.195161]  kswapd+0x205/0x410
[13782.195301]  ? __pfx_autoremove_wake_function+0x10/0x10
[13782.195524]  ? __pfx_kswapd+0x10/0x10
[13782.195685]  kthread+0xff/0x130
[13782.195833]  ? __pfx_kthread+0x10/0x10
[13782.196004]  ret_from_fork+0x2d/0x50
[13782.196160]  ? __pfx_kthread+0x10/0x10
[13782.196324]  ret_from_fork_asm+0x1b/0x30
[13782.196498]  
[14254.425797] BTRFS: device fsid 0228e196-f91e-4f25-b29d-06bca17c4c35 devid 1 transid 86 /dev/mapper/vg0-lv9 scanned by mount (1668047)
[14254.426764] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[14254.427121] BTRFS info (device dm-9): turning on async discard
[14254.427404] BTRFS info (device dm-9): disk space caching is enabled