[ 1501.400985] run fstests btrfs/017 at 2020-11-21 21:15:17
[ 1501.918658] BTRFS: device fsid d0af4590-e0c1-4bb8-bbf0-06aa2acd929c devid 1 transid 5 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (221438)
[ 1501.949579] BTRFS info (device dm-9): disk space caching is enabled
[ 1501.949582] BTRFS info (device dm-9): has skinny extents
[ 1501.949584] BTRFS info (device dm-9): flagging fs with big metadata feature
[ 1501.961301] BTRFS info (device dm-9): checking UUID tree

[ 1502.005015] ======================================================
[ 1502.005371] WARNING: possible circular locking dependency detected
[ 1502.005722] 5.10.0-rc4+ #54 Not tainted
[ 1502.005943] ------------------------------------------------------
[ 1502.006297] btrfs/221485 is trying to acquire lock:
[ 1502.006588] ffff9003152f7650 (sb_internal#2){.+.+}-{0:0}, at: btrfs_quota_enable+0x8b/0x8f0
[ 1502.007062] 
               but task is already holding lock:
[ 1502.007395] ffff90031156d800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1502.007931] 
               which lock already depends on the new lock.

[ 1502.008391] 
               the existing dependency chain (in reverse order) is:
[ 1502.008810] 
               -> #1 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}:
[ 1502.009217]        __mutex_lock+0x7e/0x7b0
[ 1502.009455]        btrfs_qgroup_inherit+0x5d/0x740
[ 1502.009735]        create_subvol+0x192/0x8e0
[ 1502.009981]        btrfs_mksubvol+0x3e9/0x460
[ 1502.010230]        __btrfs_ioctl_snap_create+0x119/0x180
[ 1502.010536]        btrfs_ioctl_snap_create+0x58/0x80
[ 1502.010827]        btrfs_ioctl+0x1229/0x30a0
[ 1502.011073]        __x64_sys_ioctl+0x83/0xb0
[ 1502.011324]        do_syscall_64+0x33/0x40
[ 1502.011570]        entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1502.012014] 
               -> #0 (sb_internal#2){.+.+}-{0:0}:
[ 1502.012501]        __lock_acquire+0x1221/0x2140
[ 1502.012821]        lock_acquire+0x116/0x3e0
[ 1502.013061]        start_transaction+0x43b/0x6f0
[ 1502.013331]        btrfs_quota_enable+0x8b/0x8f0
[ 1502.013594]        btrfs_ioctl+0x2a2a/0x30a0
[ 1502.013838]        __x64_sys_ioctl+0x83/0xb0
[ 1502.014087]        do_syscall_64+0x33/0x40
[ 1502.014337]        entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1502.014703] 
               other info that might help us debug this:

[ 1502.015155]  Possible unsafe locking scenario:

[ 1502.015494]        CPU0                    CPU1
[ 1502.015761]        ----                    ----
[ 1502.016025]   lock(&fs_info->qgroup_ioctl_lock);
[ 1502.016292]                                lock(sb_internal#2);
[ 1502.016627]                                lock(&fs_info->qgroup_ioctl_lock);
[ 1502.017080]   lock(sb_internal#2);
[ 1502.017279] 
                *** DEADLOCK ***

[ 1502.017614] 3 locks held by btrfs/221485:
[ 1502.017842]  #0: ffff9003152f7460 (sb_writers#12){.+.+}-{0:0}, at: btrfs_ioctl+0xab2/0x30a0
[ 1502.018313]  #1: ffff90031156cbb8 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_ioctl+0x2280/0x30a0
[ 1502.018822]  #2: ffff90031156d800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1502.019393] 
               stack backtrace:
[ 1502.019687] CPU: 0 PID: 221485 Comm: btrfs Not tainted 5.10.0-rc4+ #54
[ 1502.020052] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[ 1502.020539] Call Trace:
[ 1502.020687]  dump_stack+0x8b/0xb0
[ 1502.020879]  check_noncircular+0xcf/0xf0
[ 1502.021107]  __lock_acquire+0x1221/0x2140
[ 1502.021341]  lock_acquire+0x116/0x3e0
[ 1502.021552]  ? btrfs_quota_enable+0x8b/0x8f0
[ 1502.021796]  start_transaction+0x43b/0x6f0
[ 1502.022031]  ? btrfs_quota_enable+0x8b/0x8f0
[ 1502.022323]  btrfs_quota_enable+0x8b/0x8f0
[ 1502.022562]  btrfs_ioctl+0x2a2a/0x30a0
[ 1502.022778]  ? _raw_spin_unlock+0x1f/0x30
[ 1502.023007]  ? handle_mm_fault+0x1061/0x1960
[ 1502.023252]  ? find_held_lock+0x2b/0x80
[ 1502.023476]  ? do_user_addr_fault+0x215/0x440
[ 1502.023724]  ? __x64_sys_ioctl+0x83/0xb0
[ 1502.023948]  __x64_sys_ioctl+0x83/0xb0
[ 1502.024164]  do_syscall_64+0x33/0x40
[ 1502.024373]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1502.024662] RIP: 0033:0x7f42a63f15cb
[ 1502.024915] 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 c8 0c 00 f7 d8 64 89 01 48
[ 1502.025952] RSP: 002b:00007ffcd7823188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 1502.026379] RAX: ffffffffffffffda RBX: 00005618377af220 RCX: 00007f42a63f15cb
[ 1502.026779] RDX: 00007ffcd78231a0 RSI: 00000000c0109428 RDI: 0000000000000003
[ 1502.027177] RBP: 0000000000000003 R08: 0000561838bf22a0 R09: 00007f42a64bea60
[ 1502.027636] R10: 0000000000000231 R11: 0000000000000246 R12: 00007ffcd78231a0
[ 1502.028036] R13: 00005618377ecb40 R14: 00005618377a6345 R15: 00005618377a61f5
[ 1502.039589] BTRFS warning (device dm-9): qgroup rescan is already in progress
[ 1502.044758] BTRFS info (device dm-9): qgroup scan completed (inconsistency flag cleared)
[ 1502.148513] BTRFS info (device dm-9): disk space caching is enabled
[ 1502.148886] BTRFS info (device dm-9): has skinny extents