From: Paulo Alcantara <pc@manguebit.com>
To: David Howells <dhowells@redhat.com>,
Christian Brauner <christian@brauner.io>,
Matthew Wilcox <willy@infradead.org>,
Christoph Hellwig <hch@infradead.org>
Cc: David Howells <dhowells@redhat.com>, Jens Axboe <axboe@kernel.dk>,
Leon Romanovsky <leon@kernel.org>,
Steve French <sfrench@samba.org>,
ChenXiaoSong <chenxiaosong@chenxiaosong.com>,
Marc Dionne <marc.dionne@auristor.com>,
Eric Van Hensbergen <ericvh@kernel.org>,
Dominique Martinet <asmadeus@codewreck.org>,
Ilya Dryomov <idryomov@gmail.com>,
Trond Myklebust <trondmy@kernel.org>,
netfs@lists.linux.dev, linux-afs@lists.infradead.org,
linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org,
ceph-devel@vger.kernel.org, v9fs@lists.linux.dev,
linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH 12/26] iov_iter: Add a segmented queue of bio_vec[]
Date: Sat, 28 Mar 2026 15:39:55 -0300 [thread overview]
Message-ID: <5ada775e751c32368a012f1d17c5323a@manguebit.com> (raw)
In-Reply-To: <20260326104544.509518-13-dhowells@redhat.com>
David Howells <dhowells@redhat.com> writes:
> Add the concept of a segmented queue of bio_vec[] arrays. This allows an
> indefinite quantity of elements to be handled and allows things like
> network filesystems and crypto drivers to glue bits on the ends without
> having to reallocate the array.
>
> The bvecq struct that defines each segment also carries capacity/usage
> information along with flags indicating whether the constituent memory
> regions need freeing or unpinning and the file position of the first
> element in a segment. The bvecq structs are refcounted to allow a queue to
> be extracted in batches and split between a number of subrequests.
>
> The bvecq can have the bio_vec[] it manages allocated in with it, but this
> is not required. A flag is provided for if this is the case as comparing
> ->bv to ->__bv is not sufficient to detect this case.
>
> Add an iterator type ITER_BVECQ for it. This is intended to replace
> ITER_FOLIOQ (and ITER_XARRAY).
>
> Note that the prev pointer is only really needed for iov_iter_revert() and
> could be dispensed with if struct iov_iter contained the head information
> as well as the current point.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Paulo Alcantara <pc@manguebit.org>
> cc: Matthew Wilcox <willy@infradead.org>
> cc: Christoph Hellwig <hch@infradead.org>
> cc: Jens Axboe <axboe@kernel.dk>
> cc: linux-block@vger.kernel.org
> cc: netfs@lists.linux.dev
> cc: linux-fsdevel@vger.kernel.org
> ---
> include/linux/bvecq.h | 46 ++++++
> include/linux/iov_iter.h | 63 +++++++-
> include/linux/uio.h | 11 ++
> lib/iov_iter.c | 288 ++++++++++++++++++++++++++++++++++++-
> lib/scatterlist.c | 66 +++++++++
> lib/tests/kunit_iov_iter.c | 180 +++++++++++++++++++++++
> 6 files changed, 649 insertions(+), 5 deletions(-)
> create mode 100644 include/linux/bvecq.h
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
prev parent reply other threads:[~2026-03-28 18:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260326104544.509518-1-dhowells@redhat.com>
2026-03-26 10:45 ` [PATCH 11/26] Add a function to kmap one page of a multipage bio_vec David Howells
2026-03-28 18:39 ` Paulo Alcantara
2026-03-26 10:45 ` [PATCH 12/26] iov_iter: Add a segmented queue of bio_vec[] David Howells
2026-03-28 18:39 ` Paulo Alcantara [this message]
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=5ada775e751c32368a012f1d17c5323a@manguebit.com \
--to=pc@manguebit.com \
--cc=asmadeus@codewreck.org \
--cc=axboe@kernel.dk \
--cc=ceph-devel@vger.kernel.org \
--cc=chenxiaosong@chenxiaosong.com \
--cc=christian@brauner.io \
--cc=dhowells@redhat.com \
--cc=ericvh@kernel.org \
--cc=hch@infradead.org \
--cc=idryomov@gmail.com \
--cc=leon@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=marc.dionne@auristor.com \
--cc=netfs@lists.linux.dev \
--cc=sfrench@samba.org \
--cc=trondmy@kernel.org \
--cc=v9fs@lists.linux.dev \
--cc=willy@infradead.org \
/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