On 31/12/25 11:00AM, Ming Lei wrote: >bio_iov_bvec_set() creates a cloned bio that borrows a bvec array from >an iov_iter. For cloned bios, bi_vcnt is meaningless because iteration >is controlled entirely by bi_iter (bi_idx, bi_size, bi_bvec_done), not >by bi_vcnt. Remove the incorrect bi_vcnt assignment. > >Explicitly initialize bi_iter.bi_idx to 0 to ensure iteration starts >at the first bvec. While bi_idx is typically already zero from bio >initialization, making this explicit improves clarity and correctness. > >This change also avoids accessing iter->nr_segs, which is an iov_iter >implementation detail that block code should not depend on. > >Signed-off-by: Ming Lei >--- Reviewed-by: Nitesh Shetty