5 * Copyright (c) 2012, Dan Magenheimer, Oracle Corp.
11 struct zcache_preload
{
13 struct tmem_objnode
*objnodes
[OBJNODE_TREE_MAX_PATH
];
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
];
29 extern struct tmem_pool
*zcache_get_pool_by_id(uint16_t cli_id
,
31 extern void zcache_put_pool(struct tmem_pool
*pool
);
33 extern int zcache_put_page(int, int, struct tmem_oid
*,
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
*);
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
);
48 #define MAX_POOLS_PER_CLIENT 16
50 #define MAX_CLIENTS 16
51 #define LOCAL_CLIENT ((uint16_t)-1)
53 #endif /* _ZCACHE_H_ */