UAPI: (Scripted) Disintegrate include/linux/netfilter
[linux-2.6/libata-dev.git] / drivers / staging / ramster / zcache.h
blob81722b33b0872ac8a165f983af2cc1dd6494d8e8
2 /*
3 * zcache.h
5 * Copyright (c) 2012, Dan Magenheimer, Oracle Corp.
6 */
8 #ifndef _ZCACHE_H_
9 #define _ZCACHE_H_
11 struct zcache_preload {
12 struct tmem_obj *obj;
13 struct tmem_objnode *objnodes[OBJNODE_TREE_MAX_PATH];
16 struct tmem_pool;
18 #define MAX_POOLS_PER_CLIENT 16
20 #define MAX_CLIENTS 16
21 #define LOCAL_CLIENT ((uint16_t)-1)
23 struct zcache_client {
24 struct tmem_pool *tmem_pools[MAX_POOLS_PER_CLIENT];
25 bool allocated;
26 atomic_t refcount;
29 extern struct tmem_pool *zcache_get_pool_by_id(uint16_t cli_id,
30 uint16_t poolid);
31 extern void zcache_put_pool(struct tmem_pool *pool);
33 extern int zcache_put_page(int, int, struct tmem_oid *,
34 uint32_t, void *,
35 unsigned int, bool, int);
36 extern int zcache_get_page(int, int, struct tmem_oid *, uint32_t,
37 void *, size_t *, bool, int);
38 extern int zcache_flush_page(int, int, struct tmem_oid *, uint32_t);
39 extern int zcache_flush_object(int, int, struct tmem_oid *);
40 extern void zcache_decompress_to_page(char *, unsigned int, struct page *);
42 #ifdef CONFIG_RAMSTER
43 extern void *zcache_pampd_create(char *, unsigned int, bool, int,
44 struct tmem_handle *);
45 int zcache_autocreate_pool(unsigned int cli_id, unsigned int pool_id, bool eph);
46 #endif
48 #define MAX_POOLS_PER_CLIENT 16
50 #define MAX_CLIENTS 16
51 #define LOCAL_CLIENT ((uint16_t)-1)
53 #endif /* _ZCACHE_H_ */