Re: [LKP] Re: 28307d938f ("percpu: make pcpu_alloc() aware of current gfp .."): BUG: kernel reboot-without-warning in boot stage

2020-06-02 Thread Li Zhijian




On 6/2/20 8:18 PM, Filipe Manana wrote:

On 02/06/20 05:37, Li Zhijian wrote:

Hi Filipe,

LKP checked blow dmesg as the indicator in this problem


[    0.144174] RAMDISK: [mem 0x7fa2e000-0x7fff]
[    0.144559] ACPI: Early table checksum verification disabled
[    0.144985] ACPI: RSDP 0x000F5850 14 (v00 BOCHS )
[    0.145424] ACPI: RSDT 0xBFFE15C9 30 (v01 BOCHS
BXPCRSDT 0001 BXPC 0001)
[    0.146051] ACPI: FACP 0xBFFE149D 74 (v01 BOCHS
BXPCFACP 0001 BXPC 0001)
BUG: kernel reboot-without-warning in boot stage


And i have reproduced it with script in attachment. this issue is gone
when i reverted this commit 28307d938f

Please note that
- i reproduced it with kernel compiled by gcc-5
- i failed to reproduce it in kernel compiled by gcc-7 so far

Odd.


Indeed !

i tested gcc-5 gcc-6 gcc-7, only gcc-5 triggered this issue, kernel 
built with gcc6 and gcc-7 works well


lizhijian@shao2-debian:~$ gcc-6 --version
gcc-6 (Debian 6.5.0-2) 6.5.0 20181026
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

lizhijian@shao2-debian:~$ gcc-5 --version
gcc-5 (Debian 5.5.0-12) 5.5.0 20171010
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

lizhijian@shao2-debian:~$ gcc-7 --version
gcc-7 (Debian 7.5.0-3) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thanks
Zhijian


Here I tested with:

$ gcc --version
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.





Re: [LKP] Re: 28307d938f ("percpu: make pcpu_alloc() aware of current gfp .."): BUG: kernel reboot-without-warning in boot stage

2020-06-02 Thread Filipe Manana



On 02/06/20 05:37, Li Zhijian wrote:
> Hi Filipe,
> 
> LKP checked blow dmesg as the indicator in this problem
> 
>>> [    0.144174] RAMDISK: [mem 0x7fa2e000-0x7fff]
>>> [    0.144559] ACPI: Early table checksum verification disabled
>>> [    0.144985] ACPI: RSDP 0x000F5850 14 (v00 BOCHS )
>>> [    0.145424] ACPI: RSDT 0xBFFE15C9 30 (v01 BOCHS 
>>> BXPCRSDT 0001 BXPC 0001)
>>> [    0.146051] ACPI: FACP 0xBFFE149D 74 (v01 BOCHS 
>>> BXPCFACP 0001 BXPC 0001)
>>> BUG: kernel reboot-without-warning in boot stage
>>>
> 
> And i have reproduced it with script in attachment. this issue is gone
> when i reverted this commit 28307d938f
> 
> Please note that
> - i reproduced it with kernel compiled by gcc-5
> - i failed to reproduce it in kernel compiled by gcc-7 so far

Odd.
Here I tested with:

$ gcc --version
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.

> 
> :~/1787$ ./reproduce.sh obj/arch/x86/boot/bzImage
> qemu-system-x86_64 -enable-kvm -cpu Haswell,+smep,+smap -kernel
> obj/arch/x86/boot/bzImage -m 8192 -smp 2 -device e1000,netdev=net0
> -netdev user,id=net0,hostfwd=tcp::32032-:22 -boot order=nc -no-reboot
> -watchdog i6300esb -watchdog-action debug -rtc base=localtime -serial
> stdio -display none -monitor null -append root=/dev/ram0
> hung_task_panic=1 debug apic=debug sysrq_always_enabled
> rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on
> panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2
> prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err
> ignore_loglevel console=tty0 earlyprintk=ttyS0,115200
> console=ttyS0,115200 vga=normal rw rcuperf.shutdown=0 watchdog_thresh=60
> early console in setup code
> Wrong EFI loader signature.
> early console in extract_kernel
> input_data: 0x06f752d8
> input_len: 0x0130dd3c
> output: 0x0100
> output_len: 0x07200a48
> kernel_total_size: 0x06826000
> needed_size: 0x0740
> trampoline_32bit: 0x0009d000
> 
> Decompressing Linux... Parsing ELF... done.
> Booting the kernel.
> [    0.00] Linux version 5.7.0-rc4-00168-g28307d938fb2
> (lizhijian@shao2-debian) (gcc version 5.5.0 20171010 (Debian 5.5.0-12),
> GNU ld (GNU Binutils for Debian) 2.34) #2 SMP PREEMPT Tue Jun 2 11:23:59
> CST 2020
> [    0.00] Command line: root=/dev/ram0 hung_task_panic=1 debug
> apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100
> net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1
> nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0
> drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0
> earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw
> rcuperf.shutdown=0 watchdog_thresh=60
> [    0.00] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating
> point registers'
> [    0.00] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
> [    0.00] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
> [    0.00] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]: 256
> [    0.00] x86/fpu: Enabled xstate features 0x7, context size is 832
> bytes, using 'standard' format.
> [    0.00] BIOS-provided physical RAM map:
> [    0.00] BIOS-e820: [mem 0x-0x0009fbff]
> usable
> [    0.00] BIOS-e820: [mem 0x0009fc00-0x0009]
> reserved
> [    0.00] BIOS-e820: [mem 0x000f-0x000f]
> reserved
> [    0.00] BIOS-e820: [mem 0x0010-0xbffd]
> usable
> [    0.00] BIOS-e820: [mem 0xbffe-0xbfff]
> reserved
> [    0.00] BIOS-e820: [mem 0xfeffc000-0xfeff]
> reserved
> [    0.00] BIOS-e820: [mem 0xfffc-0x]
> reserved
> [    0.00] BIOS-e820: [mem 0x0001-0x00023fff]
> usable
> [    0.00] printk: debug: ignoring loglevel setting.
> [    0.00] printk: bootconsole [earlyser0] enabled
> [    0.00] NX (Execute Disable) protection: active
> [    0.00] SMBIOS 2.8 present.
> [    0.00] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
> 1.12.0-1 04/01/2014
> [    0.00] Hypervisor detected: KVM
> [    0.00] kvm-clock: Using msrs 4b564d01 and 4b564d00
> [    0.02] kvm-clock: cpu 0, msr 7601001, primary cpu clock
> [    0.02] kvm-clock: using sched offset of 2661499940 cycles
> [    0.000603] clocksource: kvm-clock: mask: 0x
> max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
> [    0.002261] tsc: Detected 3407.998 MHz processor
> [    0.005351] e820: update [mem 0x-0x0fff] usable ==> reserved
> [    0.005986] e820: remove [mem 0x000a-0x000f] usable
> [    0.006535] last_pfn = 0x24 max_arch_pfn = 0x4
> [    0.007091] MTRR default type: write-back
> [    0.007477] MTRR fixed ranges enabled:
> [    0.007845]   0-9 write-back

Re: [LKP] Re: 28307d938f ("percpu: make pcpu_alloc() aware of current gfp .."): BUG: kernel reboot-without-warning in boot stage

2020-06-01 Thread Li Zhijian

Hi Filipe,

LKP checked blow dmesg as the indicator in this problem


[0.144174] RAMDISK: [mem 0x7fa2e000-0x7fff]
[0.144559] ACPI: Early table checksum verification disabled
[0.144985] ACPI: RSDP 0x000F5850 14 (v00 BOCHS )
[0.145424] ACPI: RSDT 0xBFFE15C9 30 (v01 BOCHS  BXPCRSDT 
0001 BXPC 0001)
[0.146051] ACPI: FACP 0xBFFE149D 74 (v01 BOCHS  BXPCFACP 
0001 BXPC 0001)
BUG: kernel reboot-without-warning in boot stage



And i have reproduced it with script in attachment. this issue is gone 
when i reverted this commit 28307d938f


Please note that
- i reproduced it with kernel compiled by gcc-5
- i failed to reproduce it in kernel compiled by gcc-7 so far

:~/1787$ ./reproduce.sh obj/arch/x86/boot/bzImage
qemu-system-x86_64 -enable-kvm -cpu Haswell,+smep,+smap -kernel 
obj/arch/x86/boot/bzImage -m 8192 -smp 2 -device e1000,netdev=net0 
-netdev user,id=net0,hostfwd=tcp::32032-:22 -boot order=nc -no-reboot 
-watchdog i6300esb -watchdog-action debug -rtc base=localtime -serial 
stdio -display none -monitor null -append root=/dev/ram0 
hung_task_panic=1 debug apic=debug sysrq_always_enabled 
rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on 
panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 
prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err 
ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 
console=ttyS0,115200 vga=normal rw rcuperf.shutdown=0 watchdog_thresh=60

early console in setup code
Wrong EFI loader signature.
early console in extract_kernel
input_data: 0x06f752d8
input_len: 0x0130dd3c
output: 0x0100
output_len: 0x07200a48
kernel_total_size: 0x06826000
needed_size: 0x0740
trampoline_32bit: 0x0009d000

Decompressing Linux... Parsing ELF... done.
Booting the kernel.
[    0.00] Linux version 5.7.0-rc4-00168-g28307d938fb2 
(lizhijian@shao2-debian) (gcc version 5.5.0 20171010 (Debian 5.5.0-12), 
GNU ld (GNU Binutils for Debian) 2.34) #2 SMP PREEMPT Tue Jun 2 11:23:59 
CST 2020
[    0.00] Command line: root=/dev/ram0 hung_task_panic=1 debug 
apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 
net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 
nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 
drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 
earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw 
rcuperf.shutdown=0 watchdog_thresh=60
[    0.00] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating 
point registers'

[    0.00] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[    0.00] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[    0.00] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]: 256
[    0.00] x86/fpu: Enabled xstate features 0x7, context size is 832 
bytes, using 'standard' format.

[    0.00] BIOS-provided physical RAM map:
[    0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[    0.00] BIOS-e820: [mem 0x0009fc00-0x0009] 
reserved
[    0.00] BIOS-e820: [mem 0x000f-0x000f] 
reserved

[    0.00] BIOS-e820: [mem 0x0010-0xbffd] usable
[    0.00] BIOS-e820: [mem 0xbffe-0xbfff] 
reserved
[    0.00] BIOS-e820: [mem 0xfeffc000-0xfeff] 
reserved
[    0.00] BIOS-e820: [mem 0xfffc-0x] 
reserved

[    0.00] BIOS-e820: [mem 0x0001-0x00023fff] usable
[    0.00] printk: debug: ignoring loglevel setting.
[    0.00] printk: bootconsole [earlyser0] enabled
[    0.00] NX (Execute Disable) protection: active
[    0.00] SMBIOS 2.8 present.
[    0.00] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
1.12.0-1 04/01/2014

[    0.00] Hypervisor detected: KVM
[    0.00] kvm-clock: Using msrs 4b564d01 and 4b564d00
[    0.02] kvm-clock: cpu 0, msr 7601001, primary cpu clock
[    0.02] kvm-clock: using sched offset of 2661499940 cycles
[    0.000603] clocksource: kvm-clock: mask: 0x 
max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns

[    0.002261] tsc: Detected 3407.998 MHz processor
[    0.005351] e820: update [mem 0x-0x0fff] usable ==> reserved
[    0.005986] e820: remove [mem 0x000a-0x000f] usable
[    0.006535] last_pfn = 0x24 max_arch_pfn = 0x4
[    0.007091] MTRR default type: write-back
[    0.007477] MTRR fixed ranges enabled:
[    0.007845]   0-9 write-back
[    0.008191]   A-B uncachable
[    0.008536]   C-F write-protect
[    0.008906] MTRR variable ranges enabled:
[    0.009293]   0 base 00C000 mask FFC000 uncachable
[    0.009818]   1 disabled
[    0.010064]   2 disabled
[    0.010314]   3 disabled
[    0.010561]   4 disabled
[    0.010822]   5 disabled
[    0.011072]   6 

Re: 28307d938f ("percpu: make pcpu_alloc() aware of current gfp .."): BUG: kernel reboot-without-warning in boot stage

2020-05-29 Thread Philip Li
On Fri, May 29, 2020 at 01:32:28PM +0100, Filipe Manana wrote:
> 
> 
> On 29/05/20 08:16, kernel test robot wrote:
> > Greetings,
> > 
> > 0day kernel testing robot got the below dmesg and the first bad commit is
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > 
> > commit 28307d938fb2e4056ed4c982c06d1503d7719813
> > Author: Filipe Manana 
> > AuthorDate: Thu May 7 18:36:10 2020 -0700
> > Commit: Linus Torvalds 
> > CommitDate: Thu May 7 19:27:21 2020 -0700
> > 
> > percpu: make pcpu_alloc() aware of current gfp context
> > 
> > Since 5.7-rc1, on btrfs we have a percpu counter initialization for
> > which we always pass a GFP_KERNEL gfp_t argument (this happens since
> > commit 2992df73268f78 ("btrfs: Implement DREW lock")).
> > 
> > That is safe in some contextes but not on others where allowing fs
> > reclaim could lead to a deadlock because we are either holding some
> > btrfs lock needed for a transaction commit or holding a btrfs
> > transaction handle open.  Because of that we surround the call to the
> > function that initializes the percpu counter with a NOFS context using
> > memalloc_nofs_save() (this is done at btrfs_init_fs_root()).
> > 
> > However it turns out that this is not enough to prevent a possible
> > deadlock because percpu_alloc() determines if it is in an atomic context
> > by looking exclusively at the gfp flags passed to it (GFP_KERNEL in this
> > case) and it is not aware that a NOFS context is set.
> > 
> > Because percpu_alloc() thinks it is in a non atomic context it locks the
> > pcpu_alloc_mutex.  This can result in a btrfs deadlock when
> > pcpu_balance_workfn() is running, has acquired that mutex and is waiting
> > for reclaim, while the btrfs task that called percpu_counter_init() (and
> > therefore percpu_alloc()) is holding either the btrfs commit_root
> > semaphore or a transaction handle (done fs/btrfs/backref.c:
> > iterate_extent_inodes()), which prevents reclaim from finishing as an
> > attempt to commit the current btrfs transaction will deadlock.
> > 
> > Lockdep reports this issue with the following trace:
> > 
> >   ==
> >   WARNING: possible circular locking dependency detected
> >   5.6.0-rc7-btrfs-next-77 #1 Not tainted
> >   --
> >   kswapd0/91 is trying to acquire lock:
> >   8938a3b3fdc8 (_node->mutex){+.+.}, at: 
> > __btrfs_release_delayed_node.part.0+0x3f/0x320 [btrfs]
> > 
> >   but task is already holding lock:
> >   b4f0dbc0 (fs_reclaim){+.+.}, at: __fs_reclaim_acquire+0x5/0x30
> > 
> >   which lock already depends on the new lock.
> > 
> >   the existing dependency chain (in reverse order) is:
> > 
> >   -> #4 (fs_reclaim){+.+.}:
> >  fs_reclaim_acquire.part.0+0x25/0x30
> >  __kmalloc+0x5f/0x3a0
> >  pcpu_create_chunk+0x19/0x230
> >  pcpu_balance_workfn+0x56a/0x680
> >  process_one_work+0x235/0x5f0
> >  worker_thread+0x50/0x3b0
> >  kthread+0x120/0x140
> >  ret_from_fork+0x3a/0x50
> > 
> >   -> #3 (pcpu_alloc_mutex){+.+.}:
> >  __mutex_lock+0xa9/0xaf0
> >  pcpu_alloc+0x480/0x7c0
> >  __percpu_counter_init+0x50/0xd0
> >  btrfs_drew_lock_init+0x22/0x70 [btrfs]
> >  btrfs_get_fs_root+0x29c/0x5c0 [btrfs]
> >  resolve_indirect_refs+0x120/0xa30 [btrfs]
> >  find_parent_nodes+0x50b/0xf30 [btrfs]
> >  btrfs_find_all_leafs+0x60/0xb0 [btrfs]
> >  iterate_extent_inodes+0x139/0x2f0 [btrfs]
> >  iterate_inodes_from_logical+0xa1/0xe0 [btrfs]
> >  btrfs_ioctl_logical_to_ino+0xb4/0x190 [btrfs]
> >  btrfs_ioctl+0x165a/0x3130 [btrfs]
> >  ksys_ioctl+0x87/0xc0
> >  __x64_sys_ioctl+0x16/0x20
> >  do_syscall_64+0x5c/0x260
> >  entry_SYSCALL_64_after_hwframe+0x49/0xbe
> > 
> >   -> #2 (_info->commit_root_sem){}:
> >  down_write+0x38/0x70
> >  btrfs_cache_block_group+0x2ec/0x500 [btrfs]
> >  find_free_extent+0xc6a/0x1600 [btrfs]
> >  btrfs_reserve_extent+0x9b/0x180 [btrfs]
> >  btrfs_alloc_tree_block+0xc1/0x350 [btrfs]
> >  alloc_tree_block_no_bg_flush+0x4a/0x60 [btrfs]
> >  __btrfs_cow_block+0x122/0x5a0 [btrfs]
> >  btrfs_cow_block+0x106/0x240 [btrfs]
> >  commit_cowonly_roots+0x55/0x310 [btrfs]
> >  btrfs_commit_transaction+0x509/0xb20 [btrfs]
> >  sync_filesystem+0x74/0x90
> >  generic_shutdown_super+0x22/0x100
> >  kill_anon_super+0x14/0x30
> >  

Re: 28307d938f ("percpu: make pcpu_alloc() aware of current gfp .."): BUG: kernel reboot-without-warning in boot stage

2020-05-29 Thread Filipe Manana



On 29/05/20 08:16, kernel test robot wrote:
> Greetings,
> 
> 0day kernel testing robot got the below dmesg and the first bad commit is
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> 
> commit 28307d938fb2e4056ed4c982c06d1503d7719813
> Author: Filipe Manana 
> AuthorDate: Thu May 7 18:36:10 2020 -0700
> Commit: Linus Torvalds 
> CommitDate: Thu May 7 19:27:21 2020 -0700
> 
> percpu: make pcpu_alloc() aware of current gfp context
> 
> Since 5.7-rc1, on btrfs we have a percpu counter initialization for
> which we always pass a GFP_KERNEL gfp_t argument (this happens since
> commit 2992df73268f78 ("btrfs: Implement DREW lock")).
> 
> That is safe in some contextes but not on others where allowing fs
> reclaim could lead to a deadlock because we are either holding some
> btrfs lock needed for a transaction commit or holding a btrfs
> transaction handle open.  Because of that we surround the call to the
> function that initializes the percpu counter with a NOFS context using
> memalloc_nofs_save() (this is done at btrfs_init_fs_root()).
> 
> However it turns out that this is not enough to prevent a possible
> deadlock because percpu_alloc() determines if it is in an atomic context
> by looking exclusively at the gfp flags passed to it (GFP_KERNEL in this
> case) and it is not aware that a NOFS context is set.
> 
> Because percpu_alloc() thinks it is in a non atomic context it locks the
> pcpu_alloc_mutex.  This can result in a btrfs deadlock when
> pcpu_balance_workfn() is running, has acquired that mutex and is waiting
> for reclaim, while the btrfs task that called percpu_counter_init() (and
> therefore percpu_alloc()) is holding either the btrfs commit_root
> semaphore or a transaction handle (done fs/btrfs/backref.c:
> iterate_extent_inodes()), which prevents reclaim from finishing as an
> attempt to commit the current btrfs transaction will deadlock.
> 
> Lockdep reports this issue with the following trace:
> 
>   ==
>   WARNING: possible circular locking dependency detected
>   5.6.0-rc7-btrfs-next-77 #1 Not tainted
>   --
>   kswapd0/91 is trying to acquire lock:
>   8938a3b3fdc8 (_node->mutex){+.+.}, at: 
> __btrfs_release_delayed_node.part.0+0x3f/0x320 [btrfs]
> 
>   but task is already holding lock:
>   b4f0dbc0 (fs_reclaim){+.+.}, at: __fs_reclaim_acquire+0x5/0x30
> 
>   which lock already depends on the new lock.
> 
>   the existing dependency chain (in reverse order) is:
> 
>   -> #4 (fs_reclaim){+.+.}:
>  fs_reclaim_acquire.part.0+0x25/0x30
>  __kmalloc+0x5f/0x3a0
>  pcpu_create_chunk+0x19/0x230
>  pcpu_balance_workfn+0x56a/0x680
>  process_one_work+0x235/0x5f0
>  worker_thread+0x50/0x3b0
>  kthread+0x120/0x140
>  ret_from_fork+0x3a/0x50
> 
>   -> #3 (pcpu_alloc_mutex){+.+.}:
>  __mutex_lock+0xa9/0xaf0
>  pcpu_alloc+0x480/0x7c0
>  __percpu_counter_init+0x50/0xd0
>  btrfs_drew_lock_init+0x22/0x70 [btrfs]
>  btrfs_get_fs_root+0x29c/0x5c0 [btrfs]
>  resolve_indirect_refs+0x120/0xa30 [btrfs]
>  find_parent_nodes+0x50b/0xf30 [btrfs]
>  btrfs_find_all_leafs+0x60/0xb0 [btrfs]
>  iterate_extent_inodes+0x139/0x2f0 [btrfs]
>  iterate_inodes_from_logical+0xa1/0xe0 [btrfs]
>  btrfs_ioctl_logical_to_ino+0xb4/0x190 [btrfs]
>  btrfs_ioctl+0x165a/0x3130 [btrfs]
>  ksys_ioctl+0x87/0xc0
>  __x64_sys_ioctl+0x16/0x20
>  do_syscall_64+0x5c/0x260
>  entry_SYSCALL_64_after_hwframe+0x49/0xbe
> 
>   -> #2 (_info->commit_root_sem){}:
>  down_write+0x38/0x70
>  btrfs_cache_block_group+0x2ec/0x500 [btrfs]
>  find_free_extent+0xc6a/0x1600 [btrfs]
>  btrfs_reserve_extent+0x9b/0x180 [btrfs]
>  btrfs_alloc_tree_block+0xc1/0x350 [btrfs]
>  alloc_tree_block_no_bg_flush+0x4a/0x60 [btrfs]
>  __btrfs_cow_block+0x122/0x5a0 [btrfs]
>  btrfs_cow_block+0x106/0x240 [btrfs]
>  commit_cowonly_roots+0x55/0x310 [btrfs]
>  btrfs_commit_transaction+0x509/0xb20 [btrfs]
>  sync_filesystem+0x74/0x90
>  generic_shutdown_super+0x22/0x100
>  kill_anon_super+0x14/0x30
>  btrfs_kill_super+0x12/0x20 [btrfs]
>  deactivate_locked_super+0x31/0x70
>  cleanup_mnt+0x100/0x160
>  task_work_run+0x93/0xc0
>  exit_to_usermode_loop+0xf9/0x100
>  do_syscall_64+0x20d/0x260
>