Andreas Hindborg
fd764e74e5
rust: block: fix wrong usage of lockdep API
...
When allocating `struct gendisk`, `GenDiskBuilder` is using a dynamic
lock class key without registering the key. This is an incorrect use of
the API, which causes a `WARN` trace.
Fix the issue by using a static lock class key, which is more appropriate
for the situation anyway.
Fixes: 3253aba340 ("rust: block: introduce `kernel::block::mq` module")
Reported-by: Behme Dirk (XC-CP/ESB5) <[email protected] >
Closes: https://rust-for-linux.zulipchat.com/#narrow/stream/x/topic/x/near/457090036
Signed-off-by: Andreas Hindborg <[email protected] >
Reviewed-by: Benno Lossin <[email protected] >
Reviewed-by: Gary Guo <[email protected] >
Reviewed-by: Alice Ryhl <[email protected] >
Tested-by: Dirk Behme <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
[ Applied `rustfmt`, reworded slightly and made Zulip link
a permalink. - Miguel ]
Signed-off-by: Miguel Ojeda <[email protected] >
2024-08-21 13:28:13 +02:00
Andreas Hindborg
5ddb88f22e
rust: block: do not use removed queue flag API
...
`blk_queue_flag_set` and `blk_queue_flag_clear` was removed in favor of a
new API. This caused a build error for Rust block device abstractions.
Thus, use the new feature passing API instead of the old removed API.
Fixes: bd4a633b6f ("block: move the nonrot flag to queue_limits")
Signed-off-by: Andreas Hindborg <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected] >
2024-06-20 06:54:48 -06:00
Andreas Hindborg
5e3b7009f1
rust: block: do not use removed queue limit API
...
The Rust block layer API was using the old queue limit API, which was just
removed. Use the new API instead.
Reported-by: Boqun Feng <[email protected] >
Fixes: 3253aba340 ("rust: block: introduce `kernel::block::mq` module")
Signed-off-by: Andreas Hindborg <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected] >
2024-06-14 18:25:13 -06:00
Andreas Hindborg
3253aba340
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 <[email protected] > [1].
[1] https://github.com/wedsonaf/linux/tree/f2cfd2fe0e2ca4e90994f96afe268bbd4382a891/rust/kernel/blk/mq.rs
Cc: Wedson Almeida Filho <[email protected] >
Signed-off-by: Andreas Hindborg <[email protected] >
Reviewed-by: Benno Lossin <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected] >
2024-06-14 07:45:04 -06:00