[12150.146031] run fstests generic/251 at 2023-11-07 00:16:37
[12150.660614] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 3115210 /dev/mapper/vg0-lv0 scanned by mount (1613589)
[12150.661794] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[12150.661801] BTRFS info (device dm-0): using free space tree
[12150.665837] BTRFS info (device dm-0): auto enabling async discard
[12151.406610] BTRFS: device fsid 1fea20f2-317c-4cd5-8607-5570118c8c22 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (1613647)
[12151.407844] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[12151.407852] BTRFS info (device dm-9): turning on async discard
[12151.407854] BTRFS info (device dm-9): disk space caching is enabled
[12151.418350] BTRFS info (device dm-9): checking UUID tree

[13043.762324] ======================================================
[13043.762838] WARNING: possible circular locking dependency detected
[13043.763350] 6.6.0-rc7+ #1351 Not tainted
[13043.763680] ------------------------------------------------------
[13043.764264] kswapd0/50 is trying to acquire lock:
[13043.764600] ffff8b79cc1fe390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[13043.765470] 
               but task is already holding lock:
[13043.765977] ffff8b79c5bfc600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[13043.766792] 
               which lock already depends on the new lock.

[13043.767415] 
               the existing dependency chain (in reverse order) is:
[13043.768046] 
               -> #3 (sb_internal#2){++++}-{0:0}:
[13043.768554]        start_transaction+0x493/0xad0
[13043.768962]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[13043.769467]        btrfs_evict_inode+0x273/0x3c0
[13043.769869]        evict+0xcc/0x1d0
[13043.770172]        inode_lru_isolate+0x14d/0x1e0
[13043.770567]        __list_lru_walk_one+0xbe/0x1c0
[13043.770984]        list_lru_walk_one+0x58/0x80
[13043.771389]        prune_icache_sb+0x39/0x60
[13043.771734]        super_cache_scan+0x167/0x1f0
[13043.772035]        do_shrink_slab+0x163/0x340
[13043.772330]        shrink_slab+0x1d7/0x2a0
[13043.772604]        shrink_node+0x2eb/0x7b0
[13043.772889]        balance_pgdat+0x344/0x780
[13043.773184]        kswapd+0x205/0x410
[13043.773429]        kthread+0xff/0x130
[13043.773691]        ret_from_fork+0x2d/0x50
[13043.773977]        ret_from_fork_asm+0x1b/0x30
[13043.774267] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[13043.774639]        fs_reclaim_acquire+0xa2/0xe0
[13043.774932]        kmem_cache_alloc_lru+0x4e/0x600
[13043.775253]        btrfs_alloc_inode+0x2d/0x250
[13043.775550]        alloc_inode+0x1a/0xc0
[13043.775808]        iget5_locked+0xba/0x110
[13043.776070]        btrfs_iget+0x43/0xe0
[13043.776322]        create_reloc_inode+0x1a0/0x360
[13043.776650]        btrfs_relocate_block_group+0x1d2/0x3d0
[13043.777012]        btrfs_relocate_chunk+0x4c/0x1b0
[13043.777326]        btrfs_balance+0x8e7/0x11d0
[13043.777623]        btrfs_ioctl+0x1c25/0x2860
[13043.777921]        __x64_sys_ioctl+0x8b/0xc0
[13043.778205]        do_syscall_64+0x38/0x90
[13043.778507]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[13043.778888] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[13043.779345]        join_transaction+0xaf/0x580
[13043.779642]        start_transaction+0x1a0/0xad0
[13043.779940]        btrfs_uuid_scan_kthread+0x2bc/0x3d0
[13043.780291]        kthread+0xff/0x130
[13043.780533]        ret_from_fork+0x2d/0x50
[13043.780799]        ret_from_fork_asm+0x1b/0x30
[13043.781092] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[13043.781561]        __lock_acquire+0x1415/0x2190
[13043.781908]        lock_acquire+0xc7/0x2b0
[13043.782181]        join_transaction+0x1e4/0x580
[13043.782491]        start_transaction+0x1a0/0xad0
[13043.782798]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[13043.783160]        btrfs_evict_inode+0x273/0x3c0
[13043.783485]        evict+0xcc/0x1d0
[13043.783703]        inode_lru_isolate+0x14d/0x1e0
[13043.784031]        __list_lru_walk_one+0xbe/0x1c0
[13043.784330]        list_lru_walk_one+0x58/0x80
[13043.784631]        prune_icache_sb+0x39/0x60
[13043.784918]        super_cache_scan+0x167/0x1f0
[13043.785240]        do_shrink_slab+0x163/0x340
[13043.785518]        shrink_slab+0x1d7/0x2a0
[13043.785785]        shrink_node+0x2eb/0x7b0
[13043.786039]        balance_pgdat+0x344/0x780
[13043.786307]        kswapd+0x205/0x410
[13043.786554]        kthread+0xff/0x130
[13043.786813]        ret_from_fork+0x2d/0x50
[13043.787097]        ret_from_fork_asm+0x1b/0x30
[13043.787407] 
               other info that might help us debug this:

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

[13043.788658]  Possible unsafe locking scenario:

[13043.789056]        CPU0                    CPU1
[13043.789357]        ----                    ----
[13043.789661]   rlock(sb_internal#2);
[13043.789905]                                lock(fs_reclaim);
[13043.790281]                                lock(sb_internal#2);
[13043.790672]   rlock(btrfs_trans_num_writers);
[13043.790968] 
                *** DEADLOCK ***

[13043.791365] 4 locks held by kswapd0/50:
[13043.791627]  #0: ffffffffa4e62ea0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[13043.792184]  #1: ffffffffa4e513b0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[13043.792757]  #2: ffff8b79c5bfc0e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[13043.793291]  #3: ffff8b79c5bfc600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[13043.793925] 
               stack backtrace:
[13043.794233] CPU: 0 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc7+ #1351
[13043.794675] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[13043.795256] Call Trace:
[13043.795438]  
[13043.795592]  dump_stack_lvl+0x58/0x90
[13043.795855]  check_noncircular+0x101/0x110
[13043.796127]  __lock_acquire+0x1415/0x2190
[13043.796414]  lock_acquire+0xc7/0x2b0
[13043.796666]  ? join_transaction+0x1d0/0x580
[13043.796962]  ? lock_release+0x134/0x270
[13043.797229]  ? join_transaction+0x1d0/0x580
[13043.797518]  ? join_transaction+0x3d/0x580
[13043.797805]  join_transaction+0x1e4/0x580
[13043.798087]  ? join_transaction+0x1d0/0x580
[13043.798379]  start_transaction+0x1a0/0xad0
[13043.798647]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[13043.799352]  btrfs_evict_inode+0x273/0x3c0
[13043.799853]  ? lock_release+0x134/0x270
[13043.800087]  ? __pfx_wake_bit_function+0x10/0x10
[13043.800365]  evict+0xcc/0x1d0
[13043.800551]  inode_lru_isolate+0x14d/0x1e0
[13043.800801]  __list_lru_walk_one+0xbe/0x1c0
[13043.801085]  ? __pfx_inode_lru_isolate+0x10/0x10
[13043.801415]  ? __pfx_inode_lru_isolate+0x10/0x10
[13043.801713]  list_lru_walk_one+0x58/0x80
[13043.801960]  prune_icache_sb+0x39/0x60
[13043.802186]  super_cache_scan+0x167/0x1f0
[13043.802423]  do_shrink_slab+0x163/0x340
[13043.802651]  shrink_slab+0x1d7/0x2a0
[13043.802871]  shrink_node+0x2eb/0x7b0
[13043.803089]  balance_pgdat+0x344/0x780
[13043.803313]  kswapd+0x205/0x410
[13043.803504]  ? __pfx_autoremove_wake_function+0x10/0x10
[13043.803812]  ? __pfx_kswapd+0x10/0x10
[13043.804030]  kthread+0xff/0x130
[13043.804221]  ? __pfx_kthread+0x10/0x10
[13043.804443]  ret_from_fork+0x2d/0x50
[13043.804656]  ? __pfx_kthread+0x10/0x10
[13043.804884]  ret_from_fork_asm+0x1b/0x30
[13043.805129]  
[13276.337234] BTRFS warning (device dm-9): failed to trim 7 block group(s), last error -512
[13280.211002] BTRFS: device fsid 1fea20f2-317c-4cd5-8607-5570118c8c22 devid 1 transid 127 /dev/mapper/vg0-lv9 scanned by mount (1625432)
[13280.212393] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[13280.212972] BTRFS info (device dm-9): turning on async discard
[13280.213386] BTRFS info (device dm-9): disk space caching is enabled