[51542.267705] run fstests generic/251 at 2023-05-01 11:15:15
[51542.649677] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 1816158 /dev/mapper/vg0-lv0 scanned by mount (3853925)
[51542.650677] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[51542.650683] BTRFS info (device dm-0): using free space tree
[51542.654711] BTRFS info (device dm-0): auto enabling async discard
[51542.813812] BTRFS: device fsid 528f19ff-c3bd-432e-a2a3-734a16728795 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (3853974)
[51542.837797] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[51542.837811] BTRFS info (device dm-9): turning on sync discard
[51542.837814] BTRFS info (device dm-9): enabling free space tree
[51542.837816] BTRFS info (device dm-9): using free space tree
[51542.839964] BTRFS info: devid 1 device path /dev/mapper/vg0-lv9 changed to /dev/dm-9 scanned by systemd-udevd (3852814)
[51542.840641] BTRFS info: devid 1 device path /dev/dm-9 changed to /dev/mapper/vg0-lv9 scanned by systemd-udevd (3852814)
[51542.850689] BTRFS info (device dm-9): creating free space tree
[51542.852173] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
[51542.852177] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
[51542.856277] BTRFS info (device dm-9): cleaning free space cache v1
[51542.859947] BTRFS info (device dm-9): checking UUID tree
[51661.605742] ======================================================
[51661.605964] WARNING: possible circular locking dependency detected
[51661.606191] 6.3.0-rc7+ #1163 Not tainted
[51661.606335] ------------------------------------------------------
[51661.606554] kswapd0/46 is trying to acquire lock:
[51661.606724] ffff9fe0c477e650 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[51661.607085]
but task is already holding lock:
[51661.607294] ffffffff8de61b40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x4aa/0x7a0
[51661.607579]
which lock already depends on the new lock.
[51661.607865]
the existing dependency chain (in reverse order) is:
[51661.608132]
-> #1 (fs_reclaim){+.+.}-{0:0}:
[51661.608339] fs_reclaim_acquire+0xa5/0xe0
[51661.608507] kmem_cache_alloc+0x31/0x2c0
[51661.608675] alloc_extent_state+0x1d/0xd0
[51661.608842] __clear_extent_bit+0x2e0/0x4f0
[51661.609014] try_release_extent_mapping+0x216/0x280
[51661.609210] btrfs_release_folio+0x2e/0x90
[51661.609381] invalidate_inode_pages2_range+0x397/0x470
[51661.609587] btrfs_cleanup_dirty_bgs+0x1c3/0x210
[51661.609772] btrfs_cleanup_one_transaction+0x22/0x760
[51661.609972] btrfs_commit_transaction+0x3b7/0x13a0
[51661.610166] create_subvol+0x59b/0x970
[51661.610323] btrfs_mksubvol+0x435/0x4f0
[51661.610485] __btrfs_ioctl_snap_create+0x11e/0x1b0
[51661.610676] btrfs_ioctl_snap_create_v2+0xbf/0x140
[51661.610869] btrfs_ioctl+0xa45/0x28f0
[51661.611021] __x64_sys_ioctl+0x88/0xc0
[51661.611184] do_syscall_64+0x38/0x90
[51661.611335] entry_SYSCALL_64_after_hwframe+0x72/0xdc
[51661.611536]
-> #0 (sb_internal#2){++++}-{0:0}:
[51661.611749] __lock_acquire+0x1435/0x21a0
[51661.611924] lock_acquire+0xc2/0x2b0
[51661.612078] start_transaction+0x401/0x730
[51661.612248] btrfs_commit_inode_delayed_inode+0x5f/0x120
[51661.612458] btrfs_evict_inode+0x292/0x3d0
[51661.612627] evict+0xcc/0x1d0
[51661.612758] inode_lru_isolate+0x14d/0x1e0
[51661.612927] __list_lru_walk_one+0xbe/0x1c0
[51661.613103] list_lru_walk_one+0x58/0x80
[51661.613312] prune_icache_sb+0x39/0x60
[51661.613470] super_cache_scan+0x161/0x1f0
[51661.613636] do_shrink_slab+0x163/0x340
[51661.613794] shrink_slab+0x1d3/0x290
[51661.613943] shrink_node+0x300/0x720
[51661.614095] balance_pgdat+0x35c/0x7a0
[51661.614252] kswapd+0x205/0x410
[51661.614387] kthread+0xf0/0x120
[51661.614523] ret_from_fork+0x29/0x50
[51661.614678]
other info that might help us debug this:
[51661.614957] Possible unsafe locking scenario:
[51661.615169] CPU0 CPU1
[51661.615331] ---- ----
[51661.615494] lock(fs_reclaim);
[51661.615614] lock(sb_internal#2);
[51661.615823] lock(fs_reclaim);
[51661.616026] lock(sb_internal#2);
[51661.616160]
*** DEADLOCK ***
[51661.616370] 3 locks held by kswapd0/46:
[51661.616510] #0: ffffffff8de61b40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x4aa/0x7a0
[51661.616797] #1: ffffffff8de50270 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x290
[51661.617092] #2: ffff9fe0c477e0e0 (&type->s_umount_key#44){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[51661.617421]
stack backtrace:
[51661.617582] CPU: 1 PID: 46 Comm: kswapd0 Not tainted 6.3.0-rc7+ #1163
[51661.617809] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[51661.618109] Call Trace:
[51661.618203]
[51661.618288] dump_stack_lvl+0x58/0x90
[51661.618425] check_noncircular+0xd6/0x100
[51661.618574] ? save_trace+0x3f/0x310
[51661.618707] ? add_lock_to_list+0x97/0x120
[51661.618856] __lock_acquire+0x1435/0x21a0
[51661.619003] lock_acquire+0xc2/0x2b0
[51661.619139] ? btrfs_commit_inode_delayed_inode+0x5f/0x120
[51661.619336] start_transaction+0x401/0x730
[51661.619486] ? btrfs_commit_inode_delayed_inode+0x5f/0x120
[51661.619681] btrfs_commit_inode_delayed_inode+0x5f/0x120
[51661.619871] btrfs_evict_inode+0x292/0x3d0
[51661.620021] ? lock_release+0x134/0x270
[51661.620164] ? __pfx_wake_bit_function+0x10/0x10
[51661.620334] evict+0xcc/0x1d0
[51661.620448] inode_lru_isolate+0x14d/0x1e0
[51661.620596] __list_lru_walk_one+0xbe/0x1c0
[51661.620750] ? __pfx_inode_lru_isolate+0x10/0x10
[51661.620917] ? __pfx_inode_lru_isolate+0x10/0x10
[51661.621089] list_lru_walk_one+0x58/0x80
[51661.621234] prune_icache_sb+0x39/0x60
[51661.621373] super_cache_scan+0x161/0x1f0
[51661.621524] do_shrink_slab+0x163/0x340
[51661.621666] shrink_slab+0x1d3/0x290
[51661.621800] shrink_node+0x300/0x720
[51661.621935] balance_pgdat+0x35c/0x7a0
[51661.622089] kswapd+0x205/0x410
[51661.622238] ? __pfx_autoremove_wake_function+0x10/0x10
[51661.622427] ? __pfx_kswapd+0x10/0x10
[51661.622562] kthread+0xf0/0x120
[51661.622682] ? __pfx_kthread+0x10/0x10
[51661.622820] ret_from_fork+0x29/0x50
[51661.622958]
[52134.253541] BTRFS: device fsid 528f19ff-c3bd-432e-a2a3-734a16728795 devid 1 transid 86 /dev/mapper/vg0-lv9 scanned by mount (3862381)
[52134.255089] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[52134.255492] BTRFS info (device dm-9): turning on sync discard
[52134.255704] BTRFS info (device dm-9): using free space tree