On Wed, Aug 06, 2025 at 09:44:47AM -0600, Keith Busch wrote: > On Wed, Aug 06, 2025 at 04:56:21PM +0200, Christoph Hellwig wrote: > > > index 0a29b20939d17..d0ed28d40fe02 100644 > > > --- a/include/linux/blk_types.h > > > +++ b/include/linux/blk_types.h > > > @@ -264,6 +264,8 @@ struct bio { > > > > > > unsigned short bi_max_vecs; /* max bvl_vecs we can hold */ > > > > > > + unsigned int page_gaps; /* a mask of all the vector gaps */ > > > > Bloating the bio for the gaps, especially as the bio is otherwise not > > built to hardware limits at all seems like an odd tradeoff. > > Maybe, but I don't have anywhere else to put this. We split the bio to > its hardware limits at some point, which is where this field gets > initially set. What we do for nr_segs is to just do it on stack while splitting, and then only record it in the request. I think you could do the same here, i.e. replace the nr_segs output parameter to __bio_split_to_limits and it's helpers with a new struct bio_split_info that in the first version just contains nr_segs, but can be extended to other easily derived information like the page gaps.