[PATCH 07/12] block: allow copying pre-registered bvecs
Keith Busch
kbusch at kernel.org
Thu Jun 30 19:40:46 PDT 2022
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.
More information about the Linux-nvme
mailing list