summaryrefslogtreecommitdiff
path: root/drivers/staging/zcache/zcache.h
diff options
context:
space:
mode:
authorDan Magenheimer <dan.magenheimer@oracle.com>2013-01-18 21:24:24 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-18 21:43:44 (GMT)
commit703ba7fe5e085f2c85eeb451c2ac13cf275c7cb2 (patch)
treeda3dfb70775ed2cbe697bb69260bda164c4cece4 /drivers/staging/zcache/zcache.h
parent14c43aca244d009d33e7f187aa2c08e2133c9ffc (diff)
downloadlinux-fsl-qoriq-703ba7fe5e085f2c85eeb451c2ac13cf275c7cb2.tar.xz
staging: zcache: rename ramster to zcache
[V2: no code changes, patchset now generated via git format-patch -M] In staging, rename ramster to zcache The original zcache in staging was a "demo" version, and this new zcache is a significant rewrite. While certain disagreements were being resolved, both "old zcache" and "new zcache" needed to reside in the staging tree simultaneously. In order to minimize code change and churn, the newer version of zcache was temporarily merged into the "ramster" staging driver which, prior to that, had at one time heavily leveraged the older version of zcache. So, recently, "new zcache" resided in the ramster directory. Got that? No? Sorry, temporary political compromises are rarely pretty. The older version of zcache is no longer being maintained and has now been removed from the staging tree. So now the newer version of zcache can rightfully reclaim sole possession of the name "zcache". FYI, this [PATCH 2/5] is simply a "git mv" generated by "git format-patch -M". Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/zcache/zcache.h')
-rw-r--r--drivers/staging/zcache/zcache.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/staging/zcache/zcache.h b/drivers/staging/zcache/zcache.h
new file mode 100644
index 0000000..81722b3
--- /dev/null
+++ b/drivers/staging/zcache/zcache.h
@@ -0,0 +1,53 @@
+
+/*
+ * zcache.h
+ *
+ * Copyright (c) 2012, Dan Magenheimer, Oracle Corp.
+ */
+
+#ifndef _ZCACHE_H_
+#define _ZCACHE_H_
+
+struct zcache_preload {
+ struct tmem_obj *obj;
+ struct tmem_objnode *objnodes[OBJNODE_TREE_MAX_PATH];
+};
+
+struct tmem_pool;
+
+#define MAX_POOLS_PER_CLIENT 16
+
+#define MAX_CLIENTS 16
+#define LOCAL_CLIENT ((uint16_t)-1)
+
+struct zcache_client {
+ struct tmem_pool *tmem_pools[MAX_POOLS_PER_CLIENT];
+ bool allocated;
+ atomic_t refcount;
+};
+
+extern struct tmem_pool *zcache_get_pool_by_id(uint16_t cli_id,
+ uint16_t poolid);
+extern void zcache_put_pool(struct tmem_pool *pool);
+
+extern int zcache_put_page(int, int, struct tmem_oid *,
+ uint32_t, void *,
+ unsigned int, bool, int);
+extern int zcache_get_page(int, int, struct tmem_oid *, uint32_t,
+ void *, size_t *, bool, int);
+extern int zcache_flush_page(int, int, struct tmem_oid *, uint32_t);
+extern int zcache_flush_object(int, int, struct tmem_oid *);
+extern void zcache_decompress_to_page(char *, unsigned int, struct page *);
+
+#ifdef CONFIG_RAMSTER
+extern void *zcache_pampd_create(char *, unsigned int, bool, int,
+ struct tmem_handle *);
+int zcache_autocreate_pool(unsigned int cli_id, unsigned int pool_id, bool eph);
+#endif
+
+#define MAX_POOLS_PER_CLIENT 16
+
+#define MAX_CLIENTS 16
+#define LOCAL_CLIENT ((uint16_t)-1)
+
+#endif /* _ZCACHE_H_ */