On Wed, Mar 08, 2023 at 02:04:26PM +0800, Qu Wenruo wrote: > BTW, I also checked if I can craft a scrub specific version of > btrfs_submit_bio(). > > The result doesn't look good at all. > > Without a btrfs_bio structure, it's already pretty hard to properly put > bioc, decrease the bio counter. > > Or I need to create a scrub_bio, and re-implement all the needed endio > function handling. > > So please really consider the simplest case, one just wants to read/write > some data using logical + mirror_num, without any btrfs inode nor csum > verification. As said before with a little more work we could get away without the inode. But the above sounds a little strange to me. Can you share your current code? Maybe I can come up with some better ideas.