* [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref @ 2025-07-16 9:07 ` Shankari Anand 2025-07-16 12:38 ` Miguel Ojeda 2025-08-08 9:53 ` Andreas Hindborg 0 siblings, 2 replies; 10+ messages in thread From: Shankari Anand @ 2025-07-16 9:07 UTC (permalink / raw) To: Andreas Hindborg, Jens Axboe, Miguel Ojeda, Alex Gaynor, linux-block, rust-for-linux, linux-kernel Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich, Shankari Anand Update call sites in the block subsystem to import `ARef` and `AlwaysRefCounted` from `sync::aref` instead of `types`. This aligns with the ongoing effort to move `ARef` and `AlwaysRefCounted` to sync. Suggested-by: Benno Lossin <lossin@kernel.org> Link: https://github.com/Rust-for-Linux/linux/issues/1173 Signed-off-by: Shankari Anand <shankari.ak0208@gmail.com> --- It part of a subsystem-wise split series, as suggested in: https://lore.kernel.org/rust-for-linux/CANiq72=NSRMV_6UxXVgkebmWmbgN4i=sfRszr-G+x3W5A4DYOg@mail.gmail.com/T/#u This split series is intended to ease review and subsystem-level maintenance. The original moving patch is here: https://lore.kernel.org/rust-for-linux/20250625111133.698481-1-shankari.ak0208@gmail.com/ Gradually the re-export from types.rs will be eliminated in the future cycle. --- drivers/block/rnull.rs | 3 +-- rust/kernel/block/mq.rs | 8 ++++---- rust/kernel/block/mq/operations.rs | 2 +- rust/kernel/block/mq/request.rs | 3 ++- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/block/rnull.rs b/drivers/block/rnull.rs index d07e76ae2c13..80a0f7aa949e 100644 --- a/drivers/block/rnull.rs +++ b/drivers/block/rnull.rs @@ -20,8 +20,7 @@ error::Result, new_mutex, pr_info, prelude::*, - sync::{Arc, Mutex}, - types::ARef, + sync::{aref::ARef, Arc, Mutex}, }; module! { diff --git a/rust/kernel/block/mq.rs b/rust/kernel/block/mq.rs index 831445d37181..3e7e0de92604 100644 --- a/rust/kernel/block/mq.rs +++ b/rust/kernel/block/mq.rs @@ -20,7 +20,7 @@ //! The kernel will interface with the block device driver by calling the method //! implementations of the `Operations` trait. //! -//! IO requests are passed to the driver as [`kernel::types::ARef<Request>`] +//! IO requests are passed to the driver as [`kernel::sync::aref::ARef<Request>`] //! instances. The `Request` type is a wrapper around the C `struct request`. //! The driver must mark end of processing by calling one of the //! `Request::end`, methods. Failure to do so can lead to deadlock or timeout @@ -57,12 +57,12 @@ //! //! ```rust //! use kernel::{ //! alloc::flags, //! block::mq::*, //! new_mutex, //! prelude::*, -//! sync::{Arc, Mutex}, -//! types::{ARef, ForeignOwnable}, +//! sync::{aref::ARef, Arc, Mutex}, +//! types::ForeignOwnable, //! }; //! //! struct MyBlkDevice; diff --git a/rust/kernel/block/mq/operations.rs b/rust/kernel/block/mq/operations.rs index c2b98f507bcb..18d858763e08 100644 --- a/rust/kernel/block/mq/operations.rs +++ b/rust/kernel/block/mq/operations.rs @@ -10,7 +10,7 @@ block::mq::Request, error::{from_result, Result}, prelude::*, - types::ARef, + sync::aref::ARef, }; use core::{marker::PhantomData, sync::atomic::AtomicU64, sync::atomic::Ordering}; diff --git a/rust/kernel/block/mq/request.rs b/rust/kernel/block/mq/request.rs index fefd394f064a..9cca7852b309 100644 --- a/rust/kernel/block/mq/request.rs +++ b/rust/kernel/block/mq/request.rs @@ -8,7 +8,8 @@ bindings, block::mq::Operations, error::Result, - types::{ARef, AlwaysRefCounted, Opaque}, + sync::aref::{ARef, AlwaysRefCounted}, + types::Opaque, }; use core::{ marker::PhantomData, -- 2.34.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref 2025-07-16 9:07 ` [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref Shankari Anand @ 2025-07-16 12:38 ` Miguel Ojeda 2025-08-08 9:53 ` Andreas Hindborg 1 sibling, 0 replies; 10+ messages in thread From: Miguel Ojeda @ 2025-07-16 12:38 UTC (permalink / raw) To: Shankari Anand Cc: Andreas Hindborg, Jens Axboe, Miguel Ojeda, Alex Gaynor, linux-block, rust-for-linux, linux-kernel, Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich On Wed, Jul 16, 2025 at 11:07 AM Shankari Anand <shankari.ak0208@gmail.com> wrote: > > It part of a subsystem-wise split series, as suggested in: > https://lore.kernel.org/rust-for-linux/CANiq72=NSRMV_6UxXVgkebmWmbgN4i=sfRszr-G+x3W5A4DYOg@mail.gmail.com/T/#u > This split series is intended to ease review and subsystem-level maintenance. > > The original moving patch is here: > https://lore.kernel.org/rust-for-linux/20250625111133.698481-1-shankari.ak0208@gmail.com/ > > Gradually the re-export from types.rs will be eliminated in the > future cycle. Thanks for splitting it Shankari, that should help get this landed. Cheers, Miguel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref 2025-07-16 9:07 ` [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref Shankari Anand 2025-07-16 12:38 ` Miguel Ojeda @ 2025-08-08 9:53 ` Andreas Hindborg 2025-08-10 11:42 ` Miguel Ojeda 1 sibling, 1 reply; 10+ messages in thread From: Andreas Hindborg @ 2025-08-08 9:53 UTC (permalink / raw) To: Shankari Anand, Jens Axboe, Miguel Ojeda, Alex Gaynor, linux-block, rust-for-linux, linux-kernel Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich, Shankari Anand "Shankari Anand" <shankari.ak0208@gmail.com> writes: > Update call sites in the block subsystem to import `ARef` and > `AlwaysRefCounted` from `sync::aref` instead of `types`. > > This aligns with the ongoing effort to move `ARef` and > `AlwaysRefCounted` to sync. > > Suggested-by: Benno Lossin <lossin@kernel.org> > Link: https://github.com/Rust-for-Linux/linux/issues/1173 > Signed-off-by: Shankari Anand <shankari.ak0208@gmail.com> Acked-by: Andreas Hindborg <a.hindborg@kernel.org> Best regards, Andreas Hindborg ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref 2025-08-08 9:53 ` Andreas Hindborg @ 2025-08-10 11:42 ` Miguel Ojeda 2025-08-11 7:49 ` Andreas Hindborg 0 siblings, 1 reply; 10+ messages in thread From: Miguel Ojeda @ 2025-08-10 11:42 UTC (permalink / raw) To: Andreas Hindborg Cc: Shankari Anand, Jens Axboe, Miguel Ojeda, Alex Gaynor, linux-block, rust-for-linux, linux-kernel, Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich On Fri, Aug 8, 2025 at 11:53 AM Andreas Hindborg <a.hindborg@kernel.org> wrote: > > Acked-by: Andreas Hindborg <a.hindborg@kernel.org> I think you can pick this one, i.e. the idea was to allow changes to be picked independently. Otherwise, I can pick it eventually with the final change, but it would be best to get these cleanups done. Thanks! Cheers, Miguel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref 2025-08-10 11:42 ` Miguel Ojeda @ 2025-08-11 7:49 ` Andreas Hindborg 2025-08-11 10:44 ` Miguel Ojeda 0 siblings, 1 reply; 10+ messages in thread From: Andreas Hindborg @ 2025-08-11 7:49 UTC (permalink / raw) To: Miguel Ojeda, Jens Axboe Cc: Shankari Anand, Miguel Ojeda, Alex Gaynor, linux-block, rust-for-linux, linux-kernel, Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich "Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com> writes: > On Fri, Aug 8, 2025 at 11:53 AM Andreas Hindborg <a.hindborg@kernel.org> wrote: >> >> Acked-by: Andreas Hindborg <a.hindborg@kernel.org> > > I think you can pick this one, i.e. the idea was to allow changes to > be picked independently. Jens is picking the block patches directly from list. I would prefer sending a PR, but that is not the way we agreed on doing it. @Jens, do you still prefer to pick the rust block patches directly? Best regards, Andreas Hindborg ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref 2025-08-11 7:49 ` Andreas Hindborg @ 2025-08-11 10:44 ` Miguel Ojeda 2025-08-25 5:41 ` Shankari Anand 0 siblings, 1 reply; 10+ messages in thread From: Miguel Ojeda @ 2025-08-11 10:44 UTC (permalink / raw) To: Andreas Hindborg Cc: Jens Axboe, Shankari Anand, Miguel Ojeda, Alex Gaynor, linux-block, rust-for-linux, linux-kernel, Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich On Mon, Aug 11, 2025 at 9:49 AM Andreas Hindborg <a.hindborg@kernel.org> wrote: > > Jens is picking the block patches directly from list. I would prefer > sending a PR, but that is not the way we agreed on doing it. > > @Jens, do you still prefer to pick the rust block patches directly? That is fine, if Jens wants to pick it, that is nice. Otherwise, I can pick it up, no worries. Thanks! Cheers, Miguel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref 2025-08-11 10:44 ` Miguel Ojeda @ 2025-08-25 5:41 ` Shankari Anand 0 siblings, 0 replies; 10+ messages in thread From: Shankari Anand @ 2025-08-25 5:41 UTC (permalink / raw) To: Miguel Ojeda, Andreas Hindborg, Jens Axboe Cc: Miguel Ojeda, Alex Gaynor, linux-block, rust-for-linux, linux-kernel, Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich On Mon, Aug 11, 2025 at 12:44:01PM +0200, Miguel Ojeda wrote: > On Mon, Aug 11, 2025 at 9:49 AM Andreas Hindborg <a.hindborg@kernel.org> wrote: > > > > Jens is picking the block patches directly from list. I would prefer > > sending a PR, but that is not the way we agreed on doing it. > > > > @Jens, do you still prefer to pick the rust block patches directly? > > That is fine, if Jens wants to pick it, that is nice. Otherwise, I can > pick it up, no worries. > > Thanks! > > Cheers, > Miguel Hi Jens, Miguel, Just a kind reminder about this patch I sent earlier. Thanks a lot for your time! Cheers, Shankari ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <CANiq72=ox809CAhMijbvxvy_-tx4QgJ=pGbbWfCcZR8J8XFrkg@mail.gmail.com>]
* Re: [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref [not found] <CANiq72=ox809CAhMijbvxvy_-tx4QgJ=pGbbWfCcZR8J8XFrkg@mail.gmail.com> @ 2025-10-12 14:04 ` Shankari Anand 2025-10-12 18:01 ` Miguel Ojeda 0 siblings, 1 reply; 10+ messages in thread From: Shankari Anand @ 2025-10-12 14:04 UTC (permalink / raw) To: Andreas Hindborg, Jens Axboe, Miguel Ojeda, Alex Gaynor, linux-block, rust-for-linux, linux-kernel Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich, Shankari Anand On Tue, Sep 30, 2025 at 06:00:41PM +0200, Miguel Ojeda wrote: > > Thanks, that would be appreciated -- if you can, please rebase it and > send it on top of -rc1 when it gets published in less than 2 weeks, > then we can apply it soon after. > > Cheers, > Miguel Hi Miguel, I'll resend it on top of -rc1. I also noticed that several files have received new commits using types::ARef or types::AlwaysRefCounted. I wanted to check if it would make sense to update the documentation to reflect their new file location. Without clear documentation, it might become increasingly difficult to remove the re-export as soon as possible, especially as more such commits are added. Let me know what you think. Best regards, Shankari ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref 2025-10-12 14:04 ` Shankari Anand @ 2025-10-12 18:01 ` Miguel Ojeda 2025-10-13 8:44 ` Shankari Anand 0 siblings, 1 reply; 10+ messages in thread From: Miguel Ojeda @ 2025-10-12 18:01 UTC (permalink / raw) To: Shankari Anand Cc: Andreas Hindborg, Jens Axboe, Miguel Ojeda, Alex Gaynor, linux-block, rust-for-linux, linux-kernel, Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich On Sun, Oct 12, 2025 at 4:05 PM Shankari Anand <shankari.ak0208@gmail.com> wrote: > > I'll resend it on top of -rc1. Yeah, please, thanks! (in v2 I think you say it is on top of linux-next -- did you mean -rc1?). > I also noticed that several files have received new commits using > types::ARef or types::AlwaysRefCounted. > I wanted to check if it would make sense to update the documentation > to reflect their new file location. > Without clear documentation, it might become increasingly difficult > to remove the re-export as soon as possible, especially as more such commits are added. > > Let me know what you think. I think it is simpler if I apply (even if temporarily) a commit that moves everything and removes the re-export in linux-next -- that way people will notice when they try to introduce the code during the cycle. Cheers, Miguel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref 2025-10-12 18:01 ` Miguel Ojeda @ 2025-10-13 8:44 ` Shankari Anand 0 siblings, 0 replies; 10+ messages in thread From: Shankari Anand @ 2025-10-13 8:44 UTC (permalink / raw) To: Miguel Ojeda Cc: Andreas Hindborg, Jens Axboe, Alex Gaynor, linux-block, rust-for-linux, linux-kernel, Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich, Shankari Anand On Sun, Oct 12, 2025 at 08:01:19PM +0200, Miguel Ojeda wrote: > On Sun, Oct 12, 2025 at 4:05 PM Shankari Anand > <shankari.ak0208@gmail.com> wrote: > > > > I'll resend it on top of -rc1. > > Yeah, please, thanks! (in v2 I think you say it is on top of > linux-next -- did you mean -rc1?). > I've rebased it on linux-next, and I've included the exact base commit at the end for reference. Let me know if you'd prefer it to be rebased onto the latest mainline instead. > > I think it is simpler if I apply (even if temporarily) a commit that > moves everything and removes the re-export in linux-next -- that way > people will notice when they try to introduce the code during the > cycle. > That sounds good. Just to confirm - since this spans multiple drivers/subsystems, is it still okay to send it as a single patch? Thanks and regards, Shankari ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-10-13 8:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <KnSfzGK6OiA0mL5BZ32IZgEYWCuETu6ggzSHiqnzsYBLsUHWR5GcVRzt-FSa8sCXmYXz_jOKWGZ6B_QyeTZS2w==@protonmail.internalid>
2025-07-16 9:07 ` [PATCH 1/7] rust: block: update ARef and AlwaysRefCounted imports from sync::aref Shankari Anand
2025-07-16 12:38 ` Miguel Ojeda
2025-08-08 9:53 ` Andreas Hindborg
2025-08-10 11:42 ` Miguel Ojeda
2025-08-11 7:49 ` Andreas Hindborg
2025-08-11 10:44 ` Miguel Ojeda
2025-08-25 5:41 ` Shankari Anand
[not found] <CANiq72=ox809CAhMijbvxvy_-tx4QgJ=pGbbWfCcZR8J8XFrkg@mail.gmail.com>
2025-10-12 14:04 ` Shankari Anand
2025-10-12 18:01 ` Miguel Ojeda
2025-10-13 8:44 ` Shankari Anand
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.