[ 1471.573313] run fstests btrfs/017 at 2020-11-18 21:14:52
[ 1472.156575] BTRFS: device fsid f8ce84a3-78c4-4daa-b5f1-9a216ccd645c devid 1 transid 5 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (215076)
[ 1472.183183] BTRFS info (device dm-9): disk space caching is enabled
[ 1472.183187] BTRFS info (device dm-9): has skinny extents
[ 1472.183188] BTRFS info (device dm-9): flagging fs with big metadata feature
[ 1472.186791] BTRFS info (device dm-9): checking UUID tree
[ 1472.234664] ======================================================
[ 1472.235035] WARNING: possible circular locking dependency detected
[ 1472.235387] 5.10.0-rc4+ #51 Not tainted
[ 1472.235608] ------------------------------------------------------
[ 1472.235964] btrfs/215124 is trying to acquire lock:
[ 1472.236340] ffff97f412ec1650 (sb_internal#2){.+.+}-{0:0}, at: btrfs_quota_enable+0x8b/0x8f0
[ 1472.236922]
but task is already holding lock:
[ 1472.237257] ffff97f40d89d800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1472.237794]
which lock already depends on the new lock.
[ 1472.238266]
the existing dependency chain (in reverse order) is:
[ 1472.238703]
-> #1 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}:
[ 1472.239281] __mutex_lock+0x7e/0x7b0
[ 1472.239516] btrfs_qgroup_inherit+0x5d/0x740
[ 1472.239792] create_subvol+0x192/0x8e0
[ 1472.240053] btrfs_mksubvol+0x3e9/0x460
[ 1472.240302] __btrfs_ioctl_snap_create+0x119/0x180
[ 1472.240602] btrfs_ioctl_snap_create+0x58/0x80
[ 1472.240892] btrfs_ioctl+0x1229/0x30a0
[ 1472.241143] __x64_sys_ioctl+0x83/0xb0
[ 1472.241419] do_syscall_64+0x33/0x40
[ 1472.241751] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1472.242126]
-> #0 (sb_internal#2){.+.+}-{0:0}:
[ 1472.242464] __lock_acquire+0x1221/0x2140
[ 1472.242725] lock_acquire+0x116/0x3e0
[ 1472.242975] start_transaction+0x43b/0x6f0
[ 1472.243246] btrfs_quota_enable+0x8b/0x8f0
[ 1472.243508] btrfs_ioctl+0x2a2a/0x30a0
[ 1472.243753] __x64_sys_ioctl+0x83/0xb0
[ 1472.244039] do_syscall_64+0x33/0x40
[ 1472.244372] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1472.244730]
other info that might help us debug this:
[ 1472.245200] Possible unsafe locking scenario:
[ 1472.245534] CPU0 CPU1
[ 1472.245790] ---- ----
[ 1472.246062] lock(&fs_info->qgroup_ioctl_lock);
[ 1472.246326] lock(sb_internal#2);
[ 1472.246723] lock(&fs_info->qgroup_ioctl_lock);
[ 1472.247246] lock(sb_internal#2);
[ 1472.247444]
*** DEADLOCK ***
[ 1472.247778] 3 locks held by btrfs/215124:
[ 1472.248017] #0: ffff97f412ec1460 (sb_writers#12){.+.+}-{0:0}, at: btrfs_ioctl+0xab2/0x30a0
[ 1472.248493] #1: ffff97f40d89cbb8 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_ioctl+0x2280/0x30a0
[ 1472.249007] #2: ffff97f40d89d800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1472.249740]
stack backtrace:
[ 1472.250010] CPU: 1 PID: 215124 Comm: btrfs Not tainted 5.10.0-rc4+ #51
[ 1472.250382] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[ 1472.250872] Call Trace:
[ 1472.251021] dump_stack+0x8b/0xb0
[ 1472.251219] check_noncircular+0xcf/0xf0
[ 1472.251446] __lock_acquire+0x1221/0x2140
[ 1472.251676] lock_acquire+0x116/0x3e0
[ 1472.251927] ? btrfs_quota_enable+0x8b/0x8f0
[ 1472.252279] start_transaction+0x43b/0x6f0
[ 1472.252549] ? btrfs_quota_enable+0x8b/0x8f0
[ 1472.252795] btrfs_quota_enable+0x8b/0x8f0
[ 1472.253044] btrfs_ioctl+0x2a2a/0x30a0
[ 1472.253262] ? _raw_spin_unlock+0x1f/0x30
[ 1472.253493] ? handle_mm_fault+0x1061/0x1960
[ 1472.253737] ? find_held_lock+0x2b/0x80
[ 1472.253965] ? do_user_addr_fault+0x215/0x440
[ 1472.254219] ? __x64_sys_ioctl+0x83/0xb0
[ 1472.254444] __x64_sys_ioctl+0x83/0xb0
[ 1472.254733] do_syscall_64+0x33/0x40
[ 1472.255029] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1472.255342] RIP: 0033:0x7f92d7e145cb
[ 1472.255549] 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
[ 1472.256612] RSP: 002b:00007ffe4edf7748 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 1472.257053] RAX: ffffffffffffffda RBX: 000055c19a4af220 RCX: 00007f92d7e145cb
[ 1472.257560] RDX: 00007ffe4edf7760 RSI: 00000000c0109428 RDI: 0000000000000003
[ 1472.258049] RBP: 0000000000000003 R08: 000055c19c0bb2a0 R09: 00007f92d7ee1a60
[ 1472.258447] R10: 0000000000000231 R11: 0000000000000246 R12: 00007ffe4edf7760
[ 1472.258854] R13: 000055c19a4ecb40 R14: 000055c19a4a6345 R15: 000055c19a4a61f5
[ 1472.269047] BTRFS warning (device dm-9): qgroup rescan is already in progress
[ 1472.272624] BTRFS info (device dm-9): qgroup scan completed (inconsistency flag cleared)
[ 1472.367190] BTRFS info (device dm-9): disk space caching is enabled
[ 1472.367564] BTRFS info (device dm-9): has skinny extents