lkml.org 
[lkml]   [2025]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v4 0/2] rust: zpool: add abstraction for zpool drivers
Date
Zpool is a common frontend for memory storage pool implementations.
These pools are typically used to store compressed memory objects,
e. g. for Zswap, the lightweight compressed cache for swap pages.

This patch provides the interface to use Zpool in Rust kernel code,
thus enabling Rust implementations of Zpool allocators for Zswap.

Co-developed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.se>
---
Changelog:
v1 -> v2:
* reworked to stick to the existing Rust driver infrastructure
* removed raw pointers from the Rust API
v2 -> v3:
* detailed safety requirements for unsafe API functions
* removed unwrap()
* some typo corrections
v3 -> v4:
* added a working example of zpool Rust API usage in the
documentation part
* change to Flags arranged as a separate patch
* improved safety requirements for ZpoolDriver trait
---
bindings/bindings_helper.h | 1
helpers/helpers.c | 1
helpers/zpool.c | 6 +
kernel/alloc.rs | 5
kernel/lib.rs | 2
kernel/zpool.rs | 338 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 353 insertions(+)


\
 
 \ /
  Last update: 2025-08-23 15:05    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog