On Wed, Dec 10, 2025 at 04:23:32PM +0100, Christoph Hellwig wrote:
> bio_split_rw_at passes the queues dma_alignment into bio_split_io_at,
> which that already checks unconditionally.  Remove the len_align_mask
> argument from bio_split_io_at and switch all users of bio_split_rw_at
> to directly call bio_split_io_at.
> 
> Signed-off-by: Christoph Hellwig <[email protected]>
[...]
>  int bio_split_io_at(struct bio *bio, const struct queue_limits *lim,
> -             unsigned *segs, unsigned max_bytes, unsigned len_align_mask)
> +             unsigned *segs, unsigned max_bytes)
>  {
>       struct bio_vec bv, bvprv, *bvprvp = NULL;
>       unsigned nsegs = 0, bytes = 0, gaps = 0;
>       struct bvec_iter iter;
>  
>       bio_for_each_bvec(bv, bio, iter) {
> -             if (bv.bv_offset & lim->dma_alignment ||
> -                 bv.bv_len & len_align_mask)
> +             if (bv.bv_offset & lim->dma_alignment)
>                       return -EINVAL;

So this commit actually removes the alignment check for bv_len and
leaves just the one for bv_offset.  Does that make sense?  The commit
message doesn't really explain the actual change.

Also, 'git grep bio_split_rw_at' still finds a result after this commit.

- Eric

Reply via email to