From: Andreas Hindborg <a.hindborg@kernel.org>
To: Vitaly Wool <vitaly.wool@konsulko.se>,
Jens Axboe <axboe@kernel.dk>, Miguel Ojeda <ojeda@kernel.org>,
Alice Ryhl <aliceryhl@google.com>
Cc: "Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
"Lorenzo Stoakes" <ljs@kernel.org>,
"Liam R . Howlett" <liam@infradead.org>,
linux-block@vger.kernel.org, rust-for-linux@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
"Igor B" <igor.b@beldev.am>,
"Vitaly Wool" <vitaly.wool@konsulko.se>
Subject: Re: [PATCH 1/3] rust: block: add bio segment iteration and request accessors
Date: Wed, 18 Nov 2026 16:19:13 +0100 [thread overview]
Message-ID: <87a4n6upzi.fsf@t14s.mail-host-address-is-not-set> (raw)
In-Reply-To: <20261117233211.3137168-2-vitaly.wool@konsulko.se>
Hi Vitaly,
"Vitaly Wool" <vitaly.wool@konsulko.se> writes:
> From: Igor B <igor.b@beldev.am>
>
> The Rust blk-mq abstractions only cover what the null block driver
> needs: requests can be started and ended, but a driver cannot find out
> what a request asks for or reach its data.
>
> For a driver that actually transfers data we need:
>
> - A `bio` module with a `Bio` wrapper, an iterator over the bios of a
> request and an iterator over the single-page segments of a bio, the
> equivalent of rq_for_each_segment(). Segments can be copied to and
> from a `Page` and zeroed, with bounds checks. Iteration goes through
> two new C helpers wrapping bio_iter_iovec() and
> bio_advance_iter_single(), so the multi-page bvec handling stays in
> C.
>
> - `Request::command()`, `Request::sector()`, `Request::bytes()` and
> `Request::bio_iter()`, exposing the operation, start sector, length
> and bios of a request. REQ_OP_MASK is added as a constant helper,
> since bindgen cannot evaluate it.
>
> - `GenDiskBuilder::max_hw_discard_sectors()` and
> `GenDiskBuilder::discard_granularity()`, so drivers can advertise
> discard support.
>
> These are used by the rbrd driver added in forthcoming patch.
>
> Signed-off-by: Igor Belousov <igor.b@beldev.am>
> Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.se>
I already submitted this [1]. I have a version rebased on v7.4 if you are
interested.
Best regards,
Andreas Hindborg
[1] https://lore.kernel.org/all/20260216-rnull-v6-19-rc5-send-v1-0-de9a7af4b469@kernel.org/
next prev parent reply other threads:[~2026-11-18 15:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 23:32 [PATCH 0/3] rust: block: add rbrd, a RAM backed block driver Vitaly Wool
2026-11-17 23:32 ` [PATCH 1/3] rust: block: add bio segment iteration and request accessors Vitaly Wool
2026-11-18 15:19 ` Andreas Hindborg [this message]
2026-11-17 23:32 ` [PATCH 2/3] rust: page: add reference counting, raw pointers and a private bit lock Vitaly Wool
2026-11-18 15:23 ` Andreas Hindborg
2026-11-17 23:32 ` [PATCH 3/3] rust: block: add rbrd, a RAM backed block driver Vitaly Wool
2026-11-18 11:43 ` [PATCH 0/3] " Jan Engelhardt
2026-11-18 14:48 ` Vitaly Wool
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=87a4n6upzi.fsf@t14s.mail-host-address-is-not-set \
--to=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=axboe@kernel.dk \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=igor.b@beldev.am \
--cc=liam@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=vitaly.wool@konsulko.se \
--cc=work@onurozkan.dev \
/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
all inboxes | Powered by JetHome®