Re: [Patch v2 41/42] btrfs: fix the use-after-free bug in writeback subpage helper
From: Qu Wenruo <hidden>
Date: 2021-05-25 09:49:58
On 2021/5/25 下午5:45, Qu Wenruo wrote: [...]
quoted
quoted
What a relief, it's not a big problem in my patchset, but more likely to be in the test case, especially in the how the mirror number is chosen. When the test failed, you can find in the dmesg that, there is not any error mssage related to csum mismatch at all. This means, we're reading the correct copy, no wonder we won't submit read repair. This is mostly caused by the page size difference I guess, which makes the pid balance read for RAID1 less perdicatable. I don't yet have any good idea to fix the test case yet, so I'm afraid we have to consider it as a false alert.Ohk gr8, Thanks a lot for looking into it. I saw the change log of v3, though I don't think there are any changes from when I last tested the whole patch series, still I will give it a full run with v3 for both 4k and 64k config, (since now mostly all issues should be fixed).Just to be more clear, there are some known bugs in the base of my subpage branch: - 9d57e61bf723 ("of/pci: Add IORESOURCE_MEM_64 to resource flags for 64- bit memory addresses") Will screw up at least my ARM board, which is using device tree for its PCIE node. Have to revert it. - 764c7c9a464b ("btrfs: zoned: fix parallel compressed writes") Will screw up compressed write with striped RAID profile. Fix sent to the mail list: https://patchwork.kernel.org/project/linux-btrfs/patch/20210525055243.85166-1-wqu@suse.com/ - Known btrfs mkfs bug Fix sent to the mail list: https://patchwork.kernel.org/project/linux-btrfs/patch/20210517095516.129287-1-wqu@suse.com/ - btrfs/215 false alert Fix sent to the mail list: https://patchwork.kernel.org/project/linux-btrfs/patch/20210517092922.119788-1-wqu@suse.com/
Please wait for while. I just checked my latest result, the branch doesn't pass my local test for subpage case. I'll fix it first, sorry for the problem. Thanks, Qu
Thanks, Ququoted
Thanks -riteshquoted
Thanks, Ququoted
Thanks again for the awesome report! Ququoted
-riteshquoted
quoted
2. btrfs/124 failure. I guess below could be due to small size of the device? xfstests.global-btrfs/4k.btrfs/124 Error Details - output mismatch (see /results/btrfs/results-4k/btrfs/124.out.bad)Again passes locally. But accroding to your fs, I notice several unbalanced disk usage: # /usr/local/bin/btrfs filesystem show Label: none uuid: fbb48eb6-25c7-4800-8656-503c1e502d85 Total devices 2 FS bytes used 32.00KiB devid 1 size 5.00GiB used 622.38MiB path /dev/vdc devid 2 size 2.00GiB used 622.38MiB path /dev/vdi Label: none uuid: d3c4fb09-eea2-4dea-8187-b13e97f4ad5c Total devices 4 FS bytes used 379.12MiB devid 1 size 5.00GiB used 8.00MiB path /dev/vdb devid 3 size 20.00GiB used 264.00MiB path /dev/vde devid 4 size 20.00GiB used 1.26GiB path /dev/vdf We had reports about btrfs doing poor work when handling unbalanced disk sizes. I had a purpose to fix it, with a little better calcuation, but still not yet perfect. Thus would you mind to check if the test pass when all the disks in SCRATCH_DEV_POOL are in the same size? Of course we need to fix the problem of ENOSPC for unbalanced disks, but that's a common problem and not exacly related to subpage. I should take some time to refresh the unbalanced disk usage patches soon. Thanksm Qu [...]quoted
-ritesh