[45665.521787] run fstests btrfs/057 at 2023-07-29 09:36:16
[45665.906261] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2425355 /dev/mapper/vg0-lv0 scanned by mount (2591268)
[45665.907368] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[45665.907376] BTRFS info (device dm-0): using free space tree
[45665.911371] BTRFS info (device dm-0): auto enabling async discard
[45666.088428] BTRFS: device fsid 851fa9d3-5e7a-4f86-98fa-d1f01a2360f7 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (2591319)
[45666.098684] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[45666.098694] BTRFS info (device dm-9): turning on sync discard
[45666.098698] BTRFS info (device dm-9): enabling free space tree
[45666.098700] BTRFS info (device dm-9): using free space tree
[45666.104375] BTRFS info (device dm-9): creating free space tree
[45666.105590] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
[45666.105594] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
[45666.113172] BTRFS info: devid 1 device path /dev/mapper/vg0-lv9 changed to /dev/dm-9 scanned by systemd-udevd (2587748)
[45666.113358] BTRFS info (device dm-9): cleaning free space cache v1
[45666.120937] BTRFS info: devid 1 device path /dev/dm-9 changed to /dev/mapper/vg0-lv9 scanned by systemd-udevd (2587748)
[45666.121003] BTRFS info (device dm-9): checking UUID tree

[45669.384669] ======================================================
[45669.385017] WARNING: possible circular locking dependency detected
[45669.385363] 6.5.0-rc3+ #1254 Not tainted
[45669.385597] ------------------------------------------------------
[45669.386124] fsstress/2591354 is trying to acquire lock:
[45669.386418] ffff9bdd9394cbe0 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_rename+0x629/0xc40
[45669.387031] 
               but task is already holding lock:
[45669.387358] ffff9bddb33a4340 (&sb->s_type->i_mutex_key#15/4){+.+.}-{3:3}, at: vfs_rename+0x19c/0xa30
[45669.387876] 
               which lock already depends on the new lock.

[45669.388322] 
               the existing dependency chain (in reverse order) is:
[45669.388739] 
               -> #3 (&sb->s_type->i_mutex_key#15/4){+.+.}-{3:3}:
[45669.389148]        down_write_nested+0x41/0xe0
[45669.389405]        btrfs_remap_file_range+0x5b/0x4d0
[45669.389693]        vfs_copy_file_range+0x2f0/0x630
[45669.389967]        __do_sys_copy_file_range+0xc4/0x1f0
[45669.390257]        do_syscall_64+0x38/0x90
[45669.390492]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[45669.390817] 
               -> #2 (&sb->s_type->i_mutex_key#15){++++}-{3:3}:
[45669.391216]        down_write+0x3b/0xd0
[45669.391436]        btrfs_inode_lock+0x3c/0x70
[45669.391690]        prealloc_file_extent_cluster+0x9f/0x320
[45669.391999]        relocate_file_extent_cluster+0x8d/0x970
[45669.392305]        relocate_data_extent+0x66/0xe0
[45669.392578]        relocate_block_group+0x463/0x550
[45669.392853]        btrfs_relocate_block_group+0x292/0x410
[45669.393157]        btrfs_relocate_chunk+0x4c/0x1b0
[45669.393429]        btrfs_balance+0x8e7/0x11d0
[45669.393684]        btrfs_ioctl+0x1d3d/0x2900
[45669.393930]        __x64_sys_ioctl+0x8b/0xc0
[45669.394259]        do_syscall_64+0x38/0x90
[45669.394570]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[45669.394884] 
               -> #1 (&fs_info->cleaner_mutex){+.+.}-{3:3}:
[45669.395262]        __mutex_lock+0x75/0xcd0
[45669.395496]        btrfs_quota_disable+0x40/0x430
[45669.395771]        btrfs_ioctl+0x19dc/0x2900
[45669.396014]        __x64_sys_ioctl+0x8b/0xc0
[45669.396260]        do_syscall_64+0x38/0x90
[45669.396493]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[45669.396808] 
               -> #0 (&fs_info->subvol_sem){++++}-{3:3}:
[45669.397171]        __lock_acquire+0x1415/0x2190
[45669.397430]        lock_acquire+0xc7/0x2b0
[45669.397667]        down_read+0x3e/0x180
[45669.397887]        btrfs_rename+0x629/0xc40
[45669.398126]        btrfs_rename2+0x2e/0x70
[45669.398359]        vfs_rename+0x443/0xa30
[45669.398591]        do_renameat2+0x34c/0x530
[45669.398829]        __x64_sys_rename+0x40/0x50
[45669.399082]        do_syscall_64+0x38/0x90
[45669.399315]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[45669.399629] 
               other info that might help us debug this:

[45669.400072] Chain exists of:
                 &fs_info->subvol_sem --> &sb->s_type->i_mutex_key#15 --> &sb->s_type->i_mutex_key#15/4

[45669.400804]  Possible unsafe locking scenario:

[45669.401133]        CPU0                    CPU1
[45669.401390]        ----                    ----
[45669.401650]   lock(&sb->s_type->i_mutex_key#15/4);
[45669.401922]                                lock(&sb->s_type->i_mutex_key#15);
[45669.402315]                                lock(&sb->s_type->i_mutex_key#15/4);
[45669.402724]   rlock(&fs_info->subvol_sem);
[45669.402957] 
                *** DEADLOCK ***

[45669.403237] 4 locks held by fsstress/2591354:
[45669.403451]  #0: ffff9bdd435ba410 (sb_writers#12){++++}-{0:0}, at: do_renameat2+0x185/0x530
[45669.403852]  #1: ffff9bddb33a0590 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: do_renameat2+0x458/0x530
[45669.404299]  #2: ffff9bddb33a0e60 (&type->i_mutex_dir_key#6){++++}-{3:3}, at: lock_two_inodes+0x82/0xb0
[45669.404748]  #3: ffff9bddb33a4340 (&sb->s_type->i_mutex_key#15/4){+.+.}-{3:3}, at: vfs_rename+0x19c/0xa30
[45669.405199] 
               stack backtrace:
[45669.405414] CPU: 1 PID: 2591354 Comm: fsstress Not tainted 6.5.0-rc3+ #1254
[45669.405746] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[45669.406150] Call Trace:
[45669.406277]  
[45669.406389]  dump_stack_lvl+0x58/0x90
[45669.406575]  check_noncircular+0x101/0x110
[45669.406779]  __lock_acquire+0x1415/0x2190
[45669.406976]  ? lock_release+0x134/0x270
[45669.407243]  lock_acquire+0xc7/0x2b0
[45669.407465]  ? btrfs_rename+0x629/0xc40
[45669.407686]  down_read+0x3e/0x180
[45669.407909]  ? btrfs_rename+0x629/0xc40
[45669.408139]  btrfs_rename+0x629/0xc40
[45669.408377]  btrfs_rename2+0x2e/0x70
[45669.408640]  vfs_rename+0x443/0xa30
[45669.408862]  ? d_splice_alias+0x151/0x4f0
[45669.409117]  do_renameat2+0x34c/0x530
[45669.409299]  __x64_sys_rename+0x40/0x50
[45669.409466]  do_syscall_64+0x38/0x90
[45669.409631]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[45669.409850] RIP: 0033:0x7fcfe4091dbb
[45669.410015] Code: e8 5a a3 09 00 85 c0 0f 95 c0 0f b6 c0 f7 d8 5d c3 66 0f 1f 44 00 00 b8 ff ff ff ff 5d c3 90 f3 0f 1e fa b8 52 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 8b 15 89 a0 16 00 f7 d8
[45669.410780] RSP: 002b:00007fff92ac7d78 EFLAGS: 00000206 ORIG_RAX: 0000000000000052
[45669.411145] RAX: ffffffffffffffda RBX: 00007fff92ac8030 RCX: 00007fcfe4091dbb
[45669.411448] RDX: 0000000000000000 RSI: 0000000000dfe430 RDI: 0000000000dfe410
[45669.411748] RBP: 00007fff92ac8040 R08: 0000000000000001 R09: 00007fff92ac7c57
[45669.412044] R10: 00007fcfe42508c0 R11: 0000000000000206 R12: 000000000000000f
[45669.412356] R13: 0000000000000000 R14: 00007fff92ac8014 R15: 00007fff92ac8040
[45669.412673]  
[45672.778889] BTRFS warning (device dm-9): qgroup rescan is already in progress
[45672.802750] BTRFS info (device dm-9): qgroup scan completed (inconsistency flag cleared)
[45673.250819] BTRFS: device fsid 851fa9d3-5e7a-4f86-98fa-d1f01a2360f7 devid 1 transid 219 /dev/mapper/vg0-lv9 scanned by mount (2591379)
[45673.252345] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[45673.252636] BTRFS info (device dm-9): turning on sync discard
[45673.252845] BTRFS info (device dm-9): using free space tree