Re: [PATCH 04/17] btrfs: handle checksum validation and repair at the storage layer
From: Qu Wenruo <hidden>
Date: 2022-09-05 22:35:10
Also in:
linux-btrfs, linux-fsdevel
On 2022/9/5 22:31, Christoph Hellwig wrote:
On Mon, Sep 05, 2022 at 02:59:33PM +0800, Qu Wenruo wrote:quoted
Mostly due to the fact that metadata and data go split ways for verification. All the verification for data happens at endio time.Yes.quoted
While part of the verification of metadata (bytenr, csum, level, tree-checker) goes at endio, but transid, checks against parent are all done at btrfs_read_extent_buffer() time. This also means, the read-repair happens at different timing.Yes. read-repair for metadata currently is very different than that from data. But that is something that exists already in is not new in this series.quoted
But what about putting all the needed metadata info (first key, level, transid etc) also into bbio (using a union to take the same space of data csum), so that all verification and read repair can happen at endio time, the same timing as data?I thought about that. And I suspect it probably is the right thing to do. I'm mostly stayed away from it because it doesn't really help with the goal in this series, and I also don't have good code coverage to fail comfortable touching the metadata checksum handling and repair. I can offer this sneaky deal: if someone help creating good metadata repair coverage in xfstests, I will look into this next.
Then may I take this work since it's mostly independent and you can continue your existing work without being distracted? Thanks, Qu