On Thu, Jun 14, 2018 at 09:55:32AM +0800, Ming Lei wrote: > > Agreed about bio_for_each_chunk_all(), but I just looked at the patch that > > introduces them and it looks to me like there's no need, they should just be > > bio_for_each_segment_all(). > > Now we can't change the vector with bio_for_each_segment_all(), so > bio_for_each_chunk_all() has to be used. So looks it makes sense to use > bio_add_page() to remove bio_for_each_chunk_all(). For now I'd suggest we just open code bio_for_each_segment_all in bcache as a first step to get the multipage bio vec work rolling. The code already pokes deep into bio internals, so having that iteration right next to it isn't really an issue. In the long run I'd still like to see it cleaned up, though.