rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] rust: configfs abstractions
@ 2025-02-07 14:41 Andreas Hindborg
  2025-02-07 14:41 ` [PATCH v2 1/3] rust: sync: change `<Arc<T> as ForeignOwnable>::PointedTo` to `T` Andreas Hindborg
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Andreas Hindborg @ 2025-02-07 14:41 UTC (permalink / raw)
  To: Danilo Krummrich, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
	Joel Becker, Christoph Hellwig, Peter Zijlstra, Ingo Molnar,
	Will Deacon, Waiman Long, Fiona Behrens, Charalampos Mitrodimas
  Cc: rust-for-linux, linux-kernel, Andreas Hindborg

This series adds a safe Rust API that allows Rust modules to interface
the `configfs` machinery.

The series contains an example for the samples folder to demonstrate
usage of the API. As such, there is no inline example in the
documentation.

The last patch adds a maintainer entry for the Rust configfs
abstractions, to make it absolutely clear that I will commit to maintain
these abstractions, if required. Feel free to drop this patch if this is
not required.

The series is a dependency of `rnull`, the Rust null block driver.
Please see [1] for initial `configfs` support in `rnull`.

[1] https://github.com/metaspace/linux/tree/9ac53130f5fb05b9b3074fa261b445b8fde547dd/drivers/block/rnull

Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
---
Changes in v2:
- Remove generalization over pointer type and enforce use of `Arc`.
- Use type system to enforce connection between `ItemType` and
  `Subsystem` or `Group`. Differentiate construction of vtables on this
  type difference.
- Move drop logic of child nodes from parent to child.
- Pick `ForeignOwnable::PointedTo` patch as dependency instead of
  including it here.
- Fix some rustdoc warnings.
- Use CamelCase for generic type parameter declaration.
- Destroy mutex in `Subsystem::drop`.
- Move `GroupOperationsVTable` struct definition next to implementation.
- Rebase on v6.14-rc1.
- Link to v1: https://lore.kernel.org/r/20250131-configfs-v1-0-87947611401c@kernel.org

---
Andreas Hindborg (3):
      rust: sync: change `<Arc<T> as ForeignOwnable>::PointedTo` to `T`
      rust: configfs: introduce rust support for configfs
      MAINTAINERS: add entry for configfs Rust abstractions

 MAINTAINERS                     |   7 +
 rust/bindings/bindings_helper.h |   1 +
 rust/helpers/mutex.c            |   5 +
 rust/kernel/configfs.rs         | 860 ++++++++++++++++++++++++++++++++++++++++
 rust/kernel/lib.rs              |   2 +
 rust/kernel/sync/arc.rs         |  21 +-
 samples/rust/Kconfig            |  11 +
 samples/rust/Makefile           |   1 +
 samples/rust/rust_configfs.rs   | 186 +++++++++
 9 files changed, 1089 insertions(+), 5 deletions(-)
---
base-commit: 379487e17ca406b47392e7ab6cf35d1c3bacb371
change-id: 20250131-configfs-b888cd82d84a
prerequisite-patch-id: 275efe8e08839e3a0de28ed26e8de80be9852024

Best regards,
-- 
Andreas Hindborg <a.hindborg@kernel.org>



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-02-18 13:10 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-07 14:41 [PATCH v2 0/3] rust: configfs abstractions Andreas Hindborg
2025-02-07 14:41 ` [PATCH v2 1/3] rust: sync: change `<Arc<T> as ForeignOwnable>::PointedTo` to `T` Andreas Hindborg
2025-02-17  0:21   ` Benno Lossin
2025-02-17  2:03   ` Tamir Duberstein
2025-02-17  7:34     ` Andreas Hindborg
2025-02-07 14:41 ` [PATCH v2 2/3] rust: configfs: introduce rust support for configfs Andreas Hindborg
2025-02-08 21:26   ` Charalampos Mitrodimas
2025-02-10 10:36     ` Andreas Hindborg
2025-02-16 16:12   ` Charalampos Mitrodimas
2025-02-17  7:36     ` Andreas Hindborg
2025-02-17  2:17   ` Benno Lossin
2025-02-17 11:08     ` Andreas Hindborg
2025-02-17 11:40       ` Benno Lossin
2025-02-17 12:20         ` Andreas Hindborg
2025-02-17 23:04           ` Benno Lossin
2025-02-18  8:40             ` Andreas Hindborg
2025-02-18 12:17           ` Andreas Hindborg
2025-02-18 12:41             ` Benno Lossin
2025-02-18 13:00       ` Danilo Krummrich
2025-02-18 13:10         ` Andreas Hindborg
2025-02-07 14:41 ` [PATCH v2 3/3] MAINTAINERS: add entry for configfs Rust abstractions Andreas Hindborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).