Skip to content

rust: xarray: add `insert` and `reserve`

Tamir Duberstein linux-fsdevel linux-mm lkml rust-for-linux 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20250701-xarray-insert-reserve-bd811ad46a1d

Versions newest first

  1. v2 Latest3 patches 12 repliesIn review
  2. v13 patches 11 repliesSuperseded

Changes in v2 from the cover letter

- Explain the need to disambiguate Iterator::chain. (Boqun Feng)
- Mention what Guard::alloc does in the doc comment. (Miguel Ojeda)
- Include new APIs in the module-level example. (Miguel Ojeda)
- Mention users of these APIs in the cover letter.
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rust: xarray: use the preluderust/kernel/xarray.rs+20 -141 reply
2/3rust: xarray: implement Default for AllocKindrust/kernel/xarray.rs+6 -31 reply
3/3rust: xarray: add `insert` and `reserve`include/linux/xarray.h lib/xarray.c rust/helpers/xarray.c +1 more+512 -178 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJanne GrunauDaniel AlmeidaBeata MichalskaAndreas Hindborg
SeriesT-b R-b
1/3T-b R-b R-b
2/3T-b R-b R-b
3/3T-b R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/3] rust: xarray: add `insert` and `reserve`

The reservation API is used by asahi; currently they use their own abstractions but intend to use these when available.

Rust Binder intends to use the reservation API as well.

Daniel Almeida mentions a use case for insert_limit, but didn't name it specifically.

---
Changes in v2:
- Explain the need to disambiguate Iterator::chain. (Boqun Feng)
- Mention what Guard::alloc does in the doc comment. (Miguel Ojeda)
- Include new APIs in the module-level example. (Miguel Ojeda)
- Mention users of these APIs in the cover letter.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Tamir Duberstein (3):
rust: xarray: use the prelude
rust: xarray: implement Default for AllocKind
rust: xarray: add insert and reserve

 include/linux/xarray.h |   2 +
 lib/xarray.c           |  28 ++-
 rust/helpers/xarray.c  |   5 +
 rust/kernel/xarray.rs  | 533 ++++++++++++++++++++++++++++++++++++++++++++++---
 4 files changed, 536 insertions(+), 32 deletions(-)

---
base-commit: 2009a2d5696944d85c34d75e691a6f3884e787c0
change-id: 20250701-xarray-insert-reserve-bd811ad46a1d

Best regards,

Signature · 1 line
Tamir Duberstein <[email protected]>