Lines Matching +full:keep +full:- +full:a +full:- +full:live
1 // SPDX-License-Identifier: GPL-2.0
4 //! blk-mq subsystem.
6 //! To implement a block device driver, a Rust module must do the following:
8 //! - Implement [`Operations`] for a type `T`.
9 //! - Create a [`TagSet<T>`].
10 //! - Create a [`GenDisk<T>`], via the [`GenDiskBuilder`].
11 //! - Add the disk to the system by calling [`GenDiskBuilder::build`] passing in
16 //! - The [`TagSet`] type that abstracts the C type `struct tag_set`.
17 //! - The [`GenDisk`] type that abstracts the C type `struct gendisk`.
18 //! - The [`Request`] type that abstracts the C type `struct request`.
24 //! instances. The `Request` type is a wrapper around the C `struct request`.
30 //! The `TagSet` is responsible for creating and maintaining a mapping between
31 //! `Request`s and integer ids as well as carrying a pointer to the vtable
36 //! instantiate for the driver. If possible, a driver should allocate one queue
37 //! per core, to keep queue data local to a core.
45 //! drivers have to own a reference count on the `Request` type when the IO is
47 //! the Rust `Request` instances are live while the Rust driver holds a
49 //! a `Request` via the `TagSet` would not be sound without this bookkeeping.
73 //! fn queue_rq(rq: ARef<Request<Self>>, _is_last: bool) -> Result {