[ 1513.503679] run fstests btrfs/017 at 2020-11-21 21:15:16
[ 1514.073155] BTRFS: device fsid 6091dc27-2494-41f6-9ced-0b1b19c6f0ba devid 1 transid 5 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (214075)
[ 1514.101821] BTRFS info (device dm-9): turning on async discard
[ 1514.101826] BTRFS info (device dm-9): disk space caching is enabled
[ 1514.101829] BTRFS info (device dm-9): has skinny extents
[ 1514.101831] BTRFS info (device dm-9): flagging fs with big metadata feature
[ 1514.108075] BTRFS info (device dm-9): checking UUID tree
[ 1514.157872] ======================================================
[ 1514.158247] WARNING: possible circular locking dependency detected
[ 1514.158607] 5.10.0-rc4+ #54 Not tainted
[ 1514.158833] ------------------------------------------------------
[ 1514.159211] btrfs/214122 is trying to acquire lock:
[ 1514.159488] ffff8b12554a5650 (sb_internal#2){.+.+}-{0:0}, at: btrfs_quota_enable+0x8b/0x8f0
[ 1514.159966]
but task is already holding lock:
[ 1514.160298] ffff8b124f909800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1514.160836]
which lock already depends on the new lock.
[ 1514.161299]
the existing dependency chain (in reverse order) is:
[ 1514.161722]
-> #1 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}:
[ 1514.162141] __mutex_lock+0x7e/0x7b0
[ 1514.162379] btrfs_qgroup_inherit+0x5d/0x740
[ 1514.162655] create_subvol+0x192/0x8e0
[ 1514.162904] btrfs_mksubvol+0x3e9/0x460
[ 1514.163155] __btrfs_ioctl_snap_create+0x119/0x180
[ 1514.163462] btrfs_ioctl_snap_create+0x58/0x80
[ 1514.163748] btrfs_ioctl+0x1229/0x30a0
[ 1514.163999] __x64_sys_ioctl+0x83/0xb0
[ 1514.164249] do_syscall_64+0x33/0x40
[ 1514.164487] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1514.164803]
-> #0 (sb_internal#2){.+.+}-{0:0}:
[ 1514.165153] __lock_acquire+0x1221/0x2140
[ 1514.165417] lock_acquire+0x116/0x3e0
[ 1514.165667] start_transaction+0x43b/0x6f0
[ 1514.165939] btrfs_quota_enable+0x8b/0x8f0
[ 1514.166204] btrfs_ioctl+0x2a2a/0x30a0
[ 1514.166451] __x64_sys_ioctl+0x83/0xb0
[ 1514.166697] do_syscall_64+0x33/0x40
[ 1514.166947] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1514.167268]
other info that might help us debug this:
[ 1514.167739] Possible unsafe locking scenario:
[ 1514.168082] CPU0 CPU1
[ 1514.168342] ---- ----
[ 1514.168601] lock(&fs_info->qgroup_ioctl_lock);
[ 1514.168874] lock(sb_internal#2);
[ 1514.169215] lock(&fs_info->qgroup_ioctl_lock);
[ 1514.169622] lock(sb_internal#2);
[ 1514.169824]
*** DEADLOCK ***
[ 1514.170167] 3 locks held by btrfs/214122:
[ 1514.170398] #0: ffff8b12554a5460 (sb_writers#12){.+.+}-{0:0}, at: btrfs_ioctl+0xab2/0x30a0
[ 1514.170872] #1: ffff8b124f908bb8 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_ioctl+0x2280/0x30a0
[ 1514.171383] #2: ffff8b124f909800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1514.171949]
stack backtrace:
[ 1514.172201] CPU: 0 PID: 214122 Comm: btrfs Not tainted 5.10.0-rc4+ #54
[ 1514.172570] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[ 1514.173058] Call Trace:
[ 1514.173208] dump_stack+0x8b/0xb0
[ 1514.173431] check_noncircular+0xcf/0xf0
[ 1514.173696] __lock_acquire+0x1221/0x2140
[ 1514.173945] lock_acquire+0x116/0x3e0
[ 1514.174160] ? btrfs_quota_enable+0x8b/0x8f0
[ 1514.174405] start_transaction+0x43b/0x6f0
[ 1514.174658] ? btrfs_quota_enable+0x8b/0x8f0
[ 1514.174911] btrfs_quota_enable+0x8b/0x8f0
[ 1514.175167] btrfs_ioctl+0x2a2a/0x30a0
[ 1514.175383] ? _raw_spin_unlock+0x1f/0x30
[ 1514.175615] ? handle_mm_fault+0x1061/0x1960
[ 1514.175862] ? find_held_lock+0x2b/0x80
[ 1514.176113] ? do_user_addr_fault+0x215/0x440
[ 1514.176364] ? __x64_sys_ioctl+0x83/0xb0
[ 1514.176590] __x64_sys_ioctl+0x83/0xb0
[ 1514.176806] do_syscall_64+0x33/0x40
[ 1514.177037] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1514.177324] RIP: 0033:0x7f26782794cb
[ 1514.177547] Code: 89 d8 49 8d 3c 1c 48 f7 d8 49 39 c4 72 b5 e8 1c ff ff ff 85 c0 78 ba 4c 89 e0 5b 5d 41 5c c3 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 7d b9 0c 00 f7 d8 64 89 01 48
[ 1514.178635] RSP: 002b:00007fff68e5b558 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 1514.179065] RAX: ffffffffffffffda RBX: 000055b316af8220 RCX: 00007f26782794cb
[ 1514.179467] RDX: 00007fff68e5b570 RSI: 00000000c0109428 RDI: 0000000000000003
[ 1514.179865] RBP: 0000000000000003 R08: 000055b316f052a0 R09: 00007f2678345a60
[ 1514.180269] R10: 0000000000000231 R11: 0000000000000246 R12: 00007fff68e5b570
[ 1514.180671] R13: 000055b316b35b40 R14: 000055b316aef345 R15: 000055b316aef1f5
[ 1514.191586] BTRFS warning (device dm-9): qgroup rescan is already in progress
[ 1514.195945] BTRFS info (device dm-9): qgroup scan completed (inconsistency flag cleared)
[ 1514.379875] BTRFS info (device dm-9): turning on async discard
[ 1514.380397] BTRFS info (device dm-9): disk space caching is enabled
[ 1514.380913] BTRFS info (device dm-9): has skinny extents