[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240601081806.531954-1-nmi@metaspace.dk>
Date: Sat, 1 Jun 2024 10:18:03 +0200
From: Andreas Hindborg <nmi@...aspace.dk>
To: Jens Axboe <axboe@...nel.dk>,
Christoph Hellwig <hch@....de>,
Keith Busch <kbusch@...nel.org>,
Damien Le Moal <dlemoal@...nel.org>,
Bart Van Assche <bvanassche@....org>,
Hannes Reinecke <hare@...e.de>,
Ming Lei <ming.lei@...hat.com>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>
Cc: Andreas Hindborg <a.hindborg@...sung.com>,
Greg KH <gregkh@...uxfoundation.org>,
Matthew Wilcox <willy@...radead.org>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...il.com>,
Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Alice Ryhl <aliceryhl@...gle.com>,
Chaitanya Kulkarni <chaitanyak@...dia.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Yexuan Yang <1182282462@...t.edu.cn>,
Sergio González Collado <sergio.collado@...il.com>,
Joel Granados <j.granados@...sung.com>,
"Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>,
Daniel Gomez <da.gomez@...sung.com>,
Niklas Cassel <Niklas.Cassel@....com>,
Philipp Stanner <pstanner@...hat.com>,
Conor Dooley <conor@...nel.org>,
Johannes Thumshirn <Johannes.Thumshirn@....com>,
Matias Bjørling <m@...rling.me>,
open list <linux-kernel@...r.kernel.org>,
"rust-for-linux@...r.kernel.org" <rust-for-linux@...r.kernel.org>,
"lsf-pc@...ts.linux-foundation.org" <lsf-pc@...ts.linux-foundation.org>,
"gost.dev@...sung.com" <gost.dev@...sung.com>
Subject: [PATCH v3 0/3] Rust block device driver API and null block driver
From: Andreas Hindborg <a.hindborg@...sung.com>
Hi!
Rebased on v6.10-rc1 and implemented a ton of improvements suggested by Benno. v2 is here [2]
Changes from v2:
- implement `atomic_relaxed_op_return` in terms of `AtomicU64::fetch_update`.
- update `Request` docs with state tracking info
- link all types in docs
- add invariant to `TagSet`
- do not unwrap pin in `TagSet::drop`
- remove references to `try_ffi_init` from comments
- numerous typo fixes
- code formatting fixes
- remove remote completion logic
- move `gen_disk::try_new` into `GenDisk` impl
- make `GenDiskState` sealed
- add a default state for `GenDisk`
- conditionally call `del_gendisk` on `GenDisk` drop
- move `add_disk` into `init` functon in rnull module
- improve error message in request completion assertion
- rebased on v6.10-rc1
Best regards,
Andreas Hindborg
Link: https://lore.kernel.org/all/20240521140323.2960069-1-nmi@metaspace.dk/ [1]
Andreas Hindborg (3):
rust: block: introduce `kernel::block::mq` module
rust: block: add rnull, Rust null_blk implementation
MAINTAINERS: add entry for Rust block device driver API
MAINTAINERS | 14 ++
drivers/block/Kconfig | 9 ++
drivers/block/Makefile | 3 +
drivers/block/rnull.rs | 78 +++++++++
rust/bindings/bindings_helper.h | 2 +
rust/helpers.c | 16 ++
rust/kernel/block.rs | 5 +
rust/kernel/block/mq.rs | 97 ++++++++++++
rust/kernel/block/mq/gen_disk.rs | 222 ++++++++++++++++++++++++++
rust/kernel/block/mq/operations.rs | 233 +++++++++++++++++++++++++++
rust/kernel/block/mq/raw_writer.rs | 55 +++++++
rust/kernel/block/mq/request.rs | 246 +++++++++++++++++++++++++++++
rust/kernel/block/mq/tag_set.rs | 97 ++++++++++++
rust/kernel/error.rs | 6 +
rust/kernel/lib.rs | 2 +
15 files changed, 1085 insertions(+)
create mode 100644 drivers/block/rnull.rs
create mode 100644 rust/kernel/block.rs
create mode 100644 rust/kernel/block/mq.rs
create mode 100644 rust/kernel/block/mq/gen_disk.rs
create mode 100644 rust/kernel/block/mq/operations.rs
create mode 100644 rust/kernel/block/mq/raw_writer.rs
create mode 100644 rust/kernel/block/mq/request.rs
create mode 100644 rust/kernel/block/mq/tag_set.rs
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
--
2.45.1
Powered by blists - more mailing lists