Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
[deliverable/linux.git] / drivers / staging / ramster / zcache.h
CommitLineData
faca2ef7
DM
1
2/*
3 * zcache.h
4 *
5 * Copyright (c) 2012, Dan Magenheimer, Oracle Corp.
6 */
7
8#ifndef _ZCACHE_H_
9#define _ZCACHE_H_
10
11struct zcache_preload {
12 struct tmem_obj *obj;
13 struct tmem_objnode *objnodes[OBJNODE_TREE_MAX_PATH];
14};
15
16struct tmem_pool;
17
18#define MAX_POOLS_PER_CLIENT 16
19
20#define MAX_CLIENTS 16
21#define LOCAL_CLIENT ((uint16_t)-1)
22
23struct zcache_client {
24 struct tmem_pool *tmem_pools[MAX_POOLS_PER_CLIENT];
25 bool allocated;
26 atomic_t refcount;
27};
28
29extern struct tmem_pool *zcache_get_pool_by_id(uint16_t cli_id,
30 uint16_t poolid);
31extern void zcache_put_pool(struct tmem_pool *pool);
32
33extern int zcache_put_page(int, int, struct tmem_oid *,
34 uint32_t, void *,
35 unsigned int, bool, int);
36extern int zcache_get_page(int, int, struct tmem_oid *, uint32_t,
37 void *, size_t *, bool, int);
38extern int zcache_flush_page(int, int, struct tmem_oid *, uint32_t);
39extern int zcache_flush_object(int, int, struct tmem_oid *);
40extern void zcache_decompress_to_page(char *, unsigned int, struct page *);
41
42#ifdef CONFIG_RAMSTER
43extern void *zcache_pampd_create(char *, unsigned int, bool, int,
44 struct tmem_handle *);
f0290de2 45int zcache_autocreate_pool(unsigned int cli_id, unsigned int pool_id, bool eph);
faca2ef7
DM
46#endif
47
48#define MAX_POOLS_PER_CLIENT 16
49
50#define MAX_CLIENTS 16
51#define LOCAL_CLIENT ((uint16_t)-1)
52
53#endif /* _ZCACHE_H_ */
This page took 0.060163 seconds and 5 git commands to generate.