Re: [PATCH 07/12] block: allow copying pre-registered bvecs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 30, 2022 at 01:42:07PM -0700, Keith Busch wrote:
>  void bio_iov_bvec_set(struct bio *bio, struct iov_iter *iter)
>  {
>  	size_t size = iov_iter_count(iter);
>  
>  	WARN_ON_ONCE(bio->bi_max_vecs);
>  
> +	if (bio->bi_max_vecs) {
> +		bio_copy_bvec(bio, iter);
> +		return;
> +	}

Obviously the WARN_ON_ONCE needs to go away with this.

And with the follow on users in this series, there's also a bug with putting
page references on these at bio_endio, so don't try testing pre-registered
buffers with this series. I'll send a fix in the v2 if we get that far.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux