diff options
author | Andreas Hindborg <a.hindborg@samsung.com> | 2024-06-11 13:45:49 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-06-14 15:45:04 +0200 |
commit | 3253aba3408aa4eb2e4e09365eede3e63ef7536b (patch) | |
tree | 180dd0614aa29c2a789717ded08f209b66368640 /rust/bindings | |
parent | Merge tag 'md-6.11-20240612' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
download | linux-3253aba3408aa4eb2e4e09365eede3e63ef7536b.tar.xz linux-3253aba3408aa4eb2e4e09365eede3e63ef7536b.zip |
rust: block: introduce `kernel::block::mq` module
Add initial abstractions for working with blk-mq.
This patch is a maintained, refactored subset of code originally published
by Wedson Almeida Filho <wedsonaf@gmail.com> [1].
[1] https://github.com/wedsonaf/linux/tree/f2cfd2fe0e2ca4e90994f96afe268bbd4382a891/rust/kernel/blk/mq.rs
Cc: Wedson Almeida Filho <wedsonaf@gmail.com>
Signed-off-by: Andreas Hindborg <a.hindborg@samsung.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Link: https://lore.kernel.org/r/20240611114551.228679-2-nmi@metaspace.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/bindings')
-rw-r--r-- | rust/bindings/bindings_helper.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h index ddb5644d4fd9..84f601d7068e 100644 --- a/rust/bindings/bindings_helper.h +++ b/rust/bindings/bindings_helper.h @@ -7,6 +7,8 @@ */ #include <kunit/test.h> +#include <linux/blk_types.h> +#include <linux/blk-mq.h> #include <linux/errname.h> #include <linux/ethtool.h> #include <linux/jiffies.h> @@ -20,6 +22,7 @@ /* `bindgen` gets confused at certain things. */ const size_t RUST_CONST_HELPER_ARCH_SLAB_MINALIGN = ARCH_SLAB_MINALIGN; +const size_t RUST_CONST_HELPER_PAGE_SIZE = PAGE_SIZE; const gfp_t RUST_CONST_HELPER_GFP_ATOMIC = GFP_ATOMIC; const gfp_t RUST_CONST_HELPER_GFP_KERNEL = GFP_KERNEL; const gfp_t RUST_CONST_HELPER_GFP_KERNEL_ACCOUNT = GFP_KERNEL_ACCOUNT; |