summaryrefslogtreecommitdiffstats
path: root/include/linux/zpool.h
diff options
context:
space:
mode:
authorGanesh Mahendran2015-02-13 00:00:51 +0100
committerLinus Torvalds2015-02-13 03:54:12 +0100
commit3eba0c6a56c04f2b017b43641a821f1ebfb7fb4c (patch)
treeae8732c7012ccee1573769e2a686eb98df173bca /include/linux/zpool.h
parentzram: remove request_queue from struct zram (diff)
downloadkernel-qcow2-linux-3eba0c6a56c04f2b017b43641a821f1ebfb7fb4c.tar.gz
kernel-qcow2-linux-3eba0c6a56c04f2b017b43641a821f1ebfb7fb4c.tar.xz
kernel-qcow2-linux-3eba0c6a56c04f2b017b43641a821f1ebfb7fb4c.zip
mm/zpool: add name argument to create zpool
Currently the underlay of zpool: zsmalloc/zbud, do not know who creates them. There is not a method to let zsmalloc/zbud find which caller they belong to. Now we want to add statistics collection in zsmalloc. We need to name the debugfs dir for each pool created. The way suggested by Minchan Kim is to use a name passed by caller(such as zram) to create the zsmalloc pool. /sys/kernel/debug/zsmalloc/zram0 This patch adds an argument `name' to zs_create_pool() and other related functions. Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com> Acked-by: Minchan Kim <minchan@kernel.org> Cc: Seth Jennings <sjennings@variantweb.net> Cc: Nitin Gupta <ngupta@vflare.org> Cc: Dan Streetman <ddstreet@ieee.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/zpool.h')
-rw-r--r--include/linux/zpool.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/zpool.h b/include/linux/zpool.h
index f14bd75f08b3..56529b34dc63 100644
--- a/include/linux/zpool.h
+++ b/include/linux/zpool.h
@@ -36,7 +36,8 @@ enum zpool_mapmode {
ZPOOL_MM_DEFAULT = ZPOOL_MM_RW
};
-struct zpool *zpool_create_pool(char *type, gfp_t gfp, struct zpool_ops *ops);
+struct zpool *zpool_create_pool(char *type, char *name,
+ gfp_t gfp, struct zpool_ops *ops);
char *zpool_get_type(struct zpool *pool);
@@ -80,7 +81,7 @@ struct zpool_driver {
atomic_t refcount;
struct list_head list;
- void *(*create)(gfp_t gfp, struct zpool_ops *ops);
+ void *(*create)(char *name, gfp_t gfp, struct zpool_ops *ops);
void (*destroy)(void *pool);
int (*malloc)(void *pool, size_t size, gfp_t gfp,