mm-zpool-add-interfaces-for-object-read-write-apis.patch removed from -mm tree
The quilt patch titled
Subject: mm: zpool: add interfaces for object read/write APIs
has been removed from the -mm tree. Its filename was
mm-zpool-add-interfaces-for-object-read-write-apis.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Yosry Ahmed <[email protected]>
Subject: mm: zpool: add interfaces for object read/write APIs
Date: Wed, 5 Mar 2025 06:11:29 +0000
Patch series "Switch zswap to object read/write APIs".
This patch series updates zswap to use the new object read/write APIs defined by zsmalloc in [1], and remove the old object mapping APIs and the related code from zpool and zsmalloc.
This patch (of 5):
Zsmalloc introduced new APIs to read/write objects besides mapping them. Add the necessary zpool interfaces.
---
include/linux/zpool.h | 17 ++++++++++++++ mm/zpool.c | 48 ++++++++++++++++++++++++++++++++++++++++ mm/zsmalloc.c | 21 +++++++++++++++++ 3 files changed, 86 insertions(+)
include/linux/zpool.h renamed from include/linux/zpool.h~mm-zpool-add-interfaces-for-object-read-write-apis +17 -0
@@ -52,6 +52,16 @@ void *zpool_map_handle(struct zpool *poovoid zpool_unmap_handle (struct zpool *pool,unsigned long handle); + +void *zpool_obj_read_begin (struct zpool *zpool,unsigned long handle, +void *local_copy); + +void zpool_obj_read_end (struct zpool *zpool,unsigned long handle, +void *handle_mem); + +void zpool_obj_write (struct zpool *zpool,unsigned long handle, +void *handle_mem,size_t mem_len); +u64 zpool_get_total_pages (struct zpool *pool);
@@ -90,6 +100,13 @@ struct zpool_driver { enum zpool_mapmode mm);void (*unmap)(void *pool,unsigned long handle); +void *(*obj_read_begin)(void *pool,unsigned long handle, +void *local_copy); +void (*obj_read_end)(void *pool,unsigned long handle, +void *handle_mem); +void (*obj_write)(void *pool,unsigned long handle, +void *handle_mem,size_t mem_len); +u64 (*total_pages)(void *pool); };
mm/zpool.c renamed from mm/zpool.c~mm-zpool-add-interfaces-for-object-read-write-apis +48 -0
54 lines not on this page · raw message
mm/zsmalloc.c renamed from mm/zsmalloc.c~mm-zpool-add-interfaces-for-object-read-write-apis +21 -0
@@ -507,6 +507,24 @@ static void zs_zpool_unmap(void *pool, uzs_unmap_object (pool, handle); } +static void *zs_zpool_obj_read_begin (void *pool,unsigned long handle, +void *local_copy) +{ +return zs_obj_read_begin (pool, handle, local_copy); +} + +static void zs_zpool_obj_read_end (void *pool,unsigned long handle, +void *handle_mem) +{ +zs_obj_read_end (pool, handle, handle_mem); +} + +static void zs_zpool_obj_write (void *pool,unsigned long handle, +void *handle_mem,size_t mem_len) +{ +zs_obj_write (pool, handle, handle_mem, mem_len); +} +static u64 zs_zpool_total_pages (void *pool) {return zs_get_total_pages (pool);
@@ -522,6 +540,9 @@ static struct zpool_driver zs_zpool_driv .free = zs_zpool_free, .map = zs_zpool_map, .unmap = zs_zpool_unmap, + .obj_read_begin = zs_zpool_obj_read_begin, + .obj_read_end = zs_zpool_obj_read_end, + .obj_write = zs_zpool_obj_write, .total_pages = zs_zpool_total_pages, };
_
Patches currently in -mm which might be from [email protected] are