[ 1699.213021] run fstests btrfs/017 at 2020-11-22 21:18:37
[ 1699.713352] BTRFS: device fsid c53225df-a53d-44fe-9e30-2bc0929b091a devid 1 transid 5 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (254174)
[ 1699.747822] BTRFS info (device dm-9): disk space caching is enabled
[ 1699.747826] BTRFS info (device dm-9): has skinny extents
[ 1699.747828] BTRFS info (device dm-9): flagging fs with big metadata feature
[ 1699.757490] BTRFS info (device dm-9): checking UUID tree
[ 1699.811331] ======================================================
[ 1699.811768] WARNING: possible circular locking dependency detected
[ 1699.812177] 5.10.0-rc4+ #55 Not tainted
[ 1699.812396] ------------------------------------------------------
[ 1699.812751] btrfs/254221 is trying to acquire lock:
[ 1699.813026] ffff97ef91564650 (sb_internal#2){.+.+}-{0:0}, at: btrfs_quota_enable+0x8b/0x8f0
[ 1699.813575]
but task is already holding lock:
[ 1699.813967] ffff97ef8686d800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1699.814507]
which lock already depends on the new lock.
[ 1699.815041]
the existing dependency chain (in reverse order) is:
[ 1699.815526]
-> #1 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}:
[ 1699.815937] __mutex_lock+0x7e/0x7b0
[ 1699.816172] btrfs_qgroup_inherit+0x5d/0x740
[ 1699.816530] create_subvol+0x192/0x8e0
[ 1699.816772] btrfs_mksubvol+0x3e9/0x460
[ 1699.817068] __btrfs_ioctl_snap_create+0x119/0x180
[ 1699.817367] btrfs_ioctl_snap_create+0x58/0x80
[ 1699.817654] btrfs_ioctl+0x1229/0x30a0
[ 1699.817898] __x64_sys_ioctl+0x83/0xb0
[ 1699.818224] do_syscall_64+0x33/0x40
[ 1699.818507] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1699.818821]
-> #0 (sb_internal#2){.+.+}-{0:0}:
[ 1699.819160] __lock_acquire+0x1221/0x2140
[ 1699.819418] lock_acquire+0x116/0x3e0
[ 1699.819731] start_transaction+0x43b/0x6f0
[ 1699.819996] btrfs_quota_enable+0x8b/0x8f0
[ 1699.820259] btrfs_ioctl+0x2a2a/0x30a0
[ 1699.820507] __x64_sys_ioctl+0x83/0xb0
[ 1699.820752] do_syscall_64+0x33/0x40
[ 1699.820987] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1699.821302]
other info that might help us debug this:
[ 1699.821755] Possible unsafe locking scenario:
[ 1699.822086] CPU0 CPU1
[ 1699.822344] ---- ----
[ 1699.822607] lock(&fs_info->qgroup_ioctl_lock);
[ 1699.822875] lock(sb_internal#2);
[ 1699.823210] lock(&fs_info->qgroup_ioctl_lock);
[ 1699.823619] lock(sb_internal#2);
[ 1699.823816]
*** DEADLOCK ***
[ 1699.824150] 3 locks held by btrfs/254221:
[ 1699.824381] #0: ffff97ef91564460 (sb_writers#12){.+.+}-{0:0}, at: btrfs_ioctl+0xab2/0x30a0
[ 1699.824856] #1: ffff97ef8686cbb8 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_ioctl+0x2280/0x30a0
[ 1699.825361] #2: ffff97ef8686d800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1699.825926]
stack backtrace:
[ 1699.826176] CPU: 0 PID: 254221 Comm: btrfs Not tainted 5.10.0-rc4+ #55
[ 1699.826547] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[ 1699.827032] Call Trace:
[ 1699.827181] dump_stack+0x8b/0xb0
[ 1699.827376] check_noncircular+0xcf/0xf0
[ 1699.827615] __lock_acquire+0x1221/0x2140
[ 1699.827847] lock_acquire+0x116/0x3e0
[ 1699.828059] ? btrfs_quota_enable+0x8b/0x8f0
[ 1699.828307] start_transaction+0x43b/0x6f0
[ 1699.828547] ? btrfs_quota_enable+0x8b/0x8f0
[ 1699.828795] btrfs_quota_enable+0x8b/0x8f0
[ 1699.829031] btrfs_ioctl+0x2a2a/0x30a0
[ 1699.829273] ? _raw_spin_unlock+0x1f/0x30
[ 1699.829509] ? handle_mm_fault+0x1061/0x1960
[ 1699.829798] ? find_held_lock+0x2b/0x80
[ 1699.830018] ? do_user_addr_fault+0x215/0x440
[ 1699.830268] ? __x64_sys_ioctl+0x83/0xb0
[ 1699.830497] __x64_sys_ioctl+0x83/0xb0
[ 1699.830714] do_syscall_64+0x33/0x40
[ 1699.830933] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1699.831224] RIP: 0033:0x7fb8d286f5cb
[ 1699.831432] 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
[ 1699.832483] RSP: 002b:00007ffff2d3e258 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 1699.832908] RAX: ffffffffffffffda RBX: 000055ce920e5220 RCX: 00007fb8d286f5cb
[ 1699.833307] RDX: 00007ffff2d3e270 RSI: 00000000c0109428 RDI: 0000000000000003
[ 1699.833709] RBP: 0000000000000003 R08: 000055ce93da52a0 R09: 00007fb8d293ca60
[ 1699.834293] R10: 0000000000000231 R11: 0000000000000246 R12: 00007ffff2d3e270
[ 1699.834698] R13: 000055ce92122b40 R14: 000055ce920dc345 R15: 000055ce920dc1f5
[ 1699.859450] BTRFS warning (device dm-9): qgroup rescan is already in progress
[ 1699.864021] BTRFS info (device dm-9): qgroup scan completed (inconsistency flag cleared)
[ 1700.027914] BTRFS info (device dm-9): disk space caching is enabled
[ 1700.028318] BTRFS info (device dm-9): has skinny extents