Re: [Patch v2 00/42] btrfs: add data write support for subpage
From: Qu Wenruo <hidden>
Date: 2021-05-17 23:21:11
On 2021/5/17 下午9:22, David Sterba wrote:
On Sat, May 15, 2021 at 07:17:50AM +0800, Qu Wenruo wrote:quoted
On 2021/5/15 上午7:05, David Sterba wrote:quoted
On Sat, May 15, 2021 at 06:45:42AM +0800, Qu Wenruo wrote:quoted
quoted
[27273.028163] general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6a9b: 0000 [#1] PREEMPT SMP [27273.030710] CPU: 0 PID: 20046 Comm: fsx Not tainted 5.13.0-rc1-default+ #1463 [27273.032295] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014 [27273.034731] RIP: 0010:btrfs_lookup_first_ordered_range+0x46/0x140 [btrfs]It's in the new function introduced, and considering how few parameteres are passed in, I guess it's really something wrong in the function, other than some conflicts with other patches. Any line number for it?(gdb) l *(btrfs_lookup_first_ordered_range+0x46) 0x2366 is in btrfs_lookup_first_ordered_range (fs/btrfs/ordered-data.c:960). 955 * and screw up the search order. 956 * And __tree_search() can't return the adjacent ordered extents 957 * either, thus here we do our own search. 958 */ 959 while (node) { 960 entry = rb_entry(node, struct btrfs_ordered_extent, rb_node); 961 962 if (file_offset < entry->file_offset) { 963 node = node->rb_left; 964 } else if (file_offset >= entry_end(entry)) { Line 960 and it's the rb_node.Since I can't reproduce it locally yet, but according to the line number, it seems to be something related to the node initialization, which happens out of the spinlock. Would you please try the following diff?The test btrfs/125 hangs and does not seem to proceed. I've run this twice, same result, so it's unlikely to be due to the machine overload. The setup is a VM, 4 cpus, 2G. I can run further debugging patches if you need.
Unlike the generic/521 one, this one I can reproduce. I'll look into this one. Surprisingly, this btrfs/125 is not in auto group, thus it never get executed for my x86 VM. Thanks for the report.