On 8/27/24 02:37, Christoph Hellwig wrote: > The current setup with bio_may_exceed_limit and __bio_split_to_limits > is a bit of a mess. > > Change it so that __bio_split_to_limits does all the work and is just > a variant of bio_split_to_limits that returns nr_segs. This is done > by inlining it and instead have the various bio_split_* helpers directly > submit the potentially split bios. > > To support btrfs, the rw version has a lower level helper split out > that just returns the offset to split. This turns out to nicely clean > up the btrfs flow as well. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx> -- Damien Le Moal Western Digital Research