summaryrefslogtreecommitdiff
path: root/include/linux/zpool.h
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2024-03-12 11:34:12 -0400
committerAndrew Morton <akpm@linux-foundation.org>2024-04-25 20:55:48 -0700
commit4196b48ddd382419e51658bf94a25af195ba9450 (patch)
treed40a1612881356123e6b4896bdb888039dab0822 /include/linux/zpool.h
parent91cdcd8d624bfdf05e8db9d572759516f3c786b8 (diff)
mm: zpool: return pool size in pages
All zswap backends track their pool sizes in pages. Currently they multiply by PAGE_SIZE for zswap, only for zswap to divide again in order to do limit math. Report pages directly. Link: https://lkml.kernel.org/r/20240312153901.3441-2-hannes@cmpxchg.org Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Yosry Ahmed <yosryahmed@google.com> Reviewed-by: Chengming Zhou <chengming.zhou@linux.dev> Reviewed-by: Nhat Pham <nphamcs@gmail.com> Cc: Yosry Ahmed <yosryahmed@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/zpool.h')
-rw-r--r--include/linux/zpool.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/zpool.h b/include/linux/zpool.h
index 3296438eec06..a67d62b79698 100644
--- a/include/linux/zpool.h
+++ b/include/linux/zpool.h
@@ -53,7 +53,7 @@ void *zpool_map_handle(struct zpool *pool, unsigned long handle,
void zpool_unmap_handle(struct zpool *pool, unsigned long handle);
-u64 zpool_get_total_size(struct zpool *pool);
+u64 zpool_get_total_pages(struct zpool *pool);
/**
@@ -91,7 +91,7 @@ struct zpool_driver {
enum zpool_mapmode mm);
void (*unmap)(void *pool, unsigned long handle);
- u64 (*total_size)(void *pool);
+ u64 (*total_pages)(void *pool);
};
void zpool_register_driver(struct zpool_driver *driver);