[ 1399.346985] run fstests btrfs/017 at 2020-11-16 21:14:04
[ 1399.860766] BTRFS: device fsid db8a4c38-564f-4371-9c40-d7661becf6e9 devid 1 transid 5 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (221873)
[ 1399.885575] BTRFS info (device dm-9): disk space caching is enabled
[ 1399.885578] BTRFS info (device dm-9): has skinny extents
[ 1399.885580] BTRFS info (device dm-9): flagging fs with big metadata feature
[ 1399.890530] BTRFS info (device dm-9): checking UUID tree
[ 1399.933302] ======================================================
[ 1399.933654] WARNING: possible circular locking dependency detected
[ 1399.934002] 5.10.0-rc4+ #49 Not tainted
[ 1399.934221] ------------------------------------------------------
[ 1399.934572] btrfs/221920 is trying to acquire lock:
[ 1399.934848] ffff8aed52955650 (sb_internal#2){.+.+}-{0:0}, at: btrfs_quota_enable+0x8b/0x8f0
[ 1399.935319]
but task is already holding lock:
[ 1399.935650] ffff8aed51ed9800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1399.936185]
which lock already depends on the new lock.
[ 1399.936646]
the existing dependency chain (in reverse order) is:
[ 1399.937064]
-> #1 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}:
[ 1399.937474] __mutex_lock+0x7e/0x7b0
[ 1399.937710] btrfs_qgroup_inherit+0x5d/0x740
[ 1399.937982] create_subvol+0x192/0x8e0
[ 1399.938225] btrfs_mksubvol+0x3e9/0x460
[ 1399.938477] __btrfs_ioctl_snap_create+0x119/0x180
[ 1399.938778] btrfs_ioctl_snap_create+0x58/0x80
[ 1399.939058] btrfs_ioctl+0x1229/0x30a0
[ 1399.939302] __x64_sys_ioctl+0x83/0xb0
[ 1399.939550] do_syscall_64+0x33/0x40
[ 1399.939784] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1399.940098]
-> #0 (sb_internal#2){.+.+}-{0:0}:
[ 1399.940435] __lock_acquire+0x1221/0x2140
[ 1399.940697] lock_acquire+0x116/0x3e0
[ 1399.940936] start_transaction+0x43b/0x6f0
[ 1399.941199] btrfs_quota_enable+0x8b/0x8f0
[ 1399.941465] btrfs_ioctl+0x2a2a/0x30a0
[ 1399.941707] __x64_sys_ioctl+0x83/0xb0
[ 1399.941951] do_syscall_64+0x33/0x40
[ 1399.942185] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1399.942502]
other info that might help us debug this:
[ 1399.942950] Possible unsafe locking scenario:
[ 1399.943282] CPU0 CPU1
[ 1399.943542] ---- ----
[ 1399.943799] lock(&fs_info->qgroup_ioctl_lock);
[ 1399.944060] lock(sb_internal#2);
[ 1399.944393] lock(&fs_info->qgroup_ioctl_lock);
[ 1399.944796] lock(sb_internal#2);
[ 1399.944991]
*** DEADLOCK ***
[ 1399.945324] 3 locks held by btrfs/221920:
[ 1399.945554] #0: ffff8aed52955460 (sb_writers#12){.+.+}-{0:0}, at: btrfs_ioctl+0xab2/0x30a0
[ 1399.946020] #1: ffff8aed51ed8bb8 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_ioctl+0x2280/0x30a0
[ 1399.946526] #2: ffff8aed51ed9800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1399.947084]
stack backtrace:
[ 1399.947332] CPU: 0 PID: 221920 Comm: btrfs Not tainted 5.10.0-rc4+ #49
[ 1399.947699] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[ 1399.948176] Call Trace:
[ 1399.948322] dump_stack+0x8b/0xb0
[ 1399.948518] check_noncircular+0xcf/0xf0
[ 1399.948742] __lock_acquire+0x1221/0x2140
[ 1399.948972] lock_acquire+0x116/0x3e0
[ 1399.949184] ? btrfs_quota_enable+0x8b/0x8f0
[ 1399.949427] start_transaction+0x43b/0x6f0
[ 1399.949664] ? btrfs_quota_enable+0x8b/0x8f0
[ 1399.949909] btrfs_quota_enable+0x8b/0x8f0
[ 1399.950144] btrfs_ioctl+0x2a2a/0x30a0
[ 1399.950358] ? _raw_spin_unlock+0x1f/0x30
[ 1399.950591] ? handle_mm_fault+0x1061/0x1960
[ 1399.950835] ? find_held_lock+0x2b/0x80
[ 1399.951055] ? do_user_addr_fault+0x215/0x440
[ 1399.951302] ? __x64_sys_ioctl+0x83/0xb0
[ 1399.951529] __x64_sys_ioctl+0x83/0xb0
[ 1399.951746] do_syscall_64+0x33/0x40
[ 1399.951951] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1399.952237] RIP: 0033:0x7fd25803d5cb
[ 1399.952441] 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
[ 1399.953476] RSP: 002b:00007ffea04c2088 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 1399.953899] RAX: ffffffffffffffda RBX: 000055e43a76e220 RCX: 00007fd25803d5cb
[ 1399.954297] RDX: 00007ffea04c20a0 RSI: 00000000c0109428 RDI: 0000000000000003
[ 1399.954699] RBP: 0000000000000003 R08: 000055e43b5752a0 R09: 00007fd25810aa60
[ 1399.955097] R10: 0000000000000231 R11: 0000000000000246 R12: 00007ffea04c20a0
[ 1399.955498] R13: 000055e43a7abb40 R14: 000055e43a765345 R15: 000055e43a7651f5
[ 1399.966612] BTRFS warning (device dm-9): qgroup rescan is already in progress
[ 1399.970770] BTRFS info (device dm-9): qgroup scan completed (inconsistency flag cleared)
[ 1400.055891] BTRFS info (device dm-9): disk space caching is enabled
[ 1400.056278] BTRFS info (device dm-9): has skinny extents