From: Chuck Lever <cel@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
Leon Romanovsky <leon@kernel.org>, NeilBrown <neilb@ownmail.net>,
Jeff Layton <jlayton@kernel.org>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org,
Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH v2 1/4] RDMA/core: add bio_vec based RDMA read/write API
Date: Wed, 21 Jan 2026 09:14:36 -0500 [thread overview]
Message-ID: <9bfdde0e-efe5-4e23-b95d-6f70836ed59c@kernel.org> (raw)
In-Reply-To: <20260121085641.GC16458@lst.de>
On 1/21/26 3:56 AM, Christoph Hellwig wrote:
> Another reply, sorry. I noticed I skipped over the end while reviewing
> the 3rd patch.
>
>> + u32 i, total_len = 0;
>> +
>> + if (nr_bvec == 0 || offset >= bvec[0].bv_len)
>> + return -EINVAL;
>> +
>> + if (check_add_overflow(total_len, bvec[i].bv_len, &total_len))
>> + return -EINVAL;
>> + }
>> + total_len -= offset;
>> +
>> + iter.bi_sector = 0;
>> + iter.bi_size = total_len;
>> + iter.bi_idx = 0;
>> + iter.bi_bvec_done = offset;
>
> I'd much rather have the callers pass in the bvec_iter, as that's
> more useful.
"The callers" -- Can you clarify whether you mean that the API
consumers would pass in a bvec_iter, or whether the iter is
entirely internal to rw.c ?
> We can probably look into factoring the quoted code
> into a helper if that's useful.
>
--
Chuck Lever
next prev parent reply other threads:[~2026-01-21 14:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 14:31 [PATCH v2 0/4] Add a bio_vec based API to core/rw.c Chuck Lever
2026-01-20 14:31 ` [PATCH v2 1/4] RDMA/core: add bio_vec based RDMA read/write API Chuck Lever
2026-01-21 8:42 ` Christoph Hellwig
2026-01-21 8:48 ` Leon Romanovsky
2026-01-21 8:57 ` Christoph Hellwig
2026-01-21 10:16 ` Leon Romanovsky
2026-01-21 8:56 ` Christoph Hellwig
2026-01-21 14:14 ` Chuck Lever [this message]
2026-01-21 14:57 ` Christoph Hellwig
2026-01-21 15:10 ` Chuck Lever
2026-01-20 14:31 ` [PATCH v2 2/4] RDMA/core: use IOVA-based DMA mapping for bvec RDMA operations Chuck Lever
2026-01-21 8:51 ` Christoph Hellwig
2026-01-20 14:31 ` [PATCH v2 3/4] RDMA/core: add MR support for bvec-based " Chuck Lever
2026-01-21 9:05 ` Christoph Hellwig
2026-01-20 14:31 ` [PATCH v2 4/4] svcrdma: use bvec-based RDMA read/write API Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9bfdde0e-efe5-4e23-b95d-6f70836ed59c@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--cc=hch@lst.de \
--cc=jgg@nvidia.com \
--cc=jlayton@kernel.org \
--cc=leon@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=neilb@ownmail.net \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox