On Wed, Mar 23, 2022 at 07:59:15AM +0800, Qu Wenruo wrote: > Personally speaking, I really hate to add DIO specific value into btrfs_bio. > > Hopes we can later turn that btrfs_bio::file_offset into some union for > other usages. Agreed. There is two venues we could explore: - ceative use of unions. Especially with some of my later patches adding more fields to struct btrfs_bio this could become possible. - adding a btrfs_dio_bio that contains a btrfs_bio. By the end of this series another field (repair_refs) is added, and iter is only used for direct I/O, so this might be worthwhile. But then again I think we could eventually kill off iter as well. So we should eventually do something, but for a non-invasive fix like this just adding the field for now seems like the most safe approach.