revert-mm-fix-blkdev-size-calculation-in-generic_write_checks
[linux-2.6/linux-trees-mm.git] / fs / reiser4 / pool.h
blobeedc7d7bcbf4b57c4eff99803fc1b6197ee98283
1 /* Copyright 2001, 2002, 2003 by Hans Reiser, licensing governed by reiser4/README */
3 /* Fast pool allocation */
5 #ifndef __REISER4_POOL_H__
6 #define __REISER4_POOL_H__
8 #include <linux/types.h>
10 struct reiser4_pool {
11 size_t obj_size;
12 int objs;
13 char *data;
14 struct list_head free;
15 struct list_head used;
16 struct list_head extra;
19 struct reiser4_pool_header {
20 /* object is either on free or "used" lists */
21 struct list_head usage_linkage;
22 struct list_head level_linkage;
23 struct list_head extra_linkage;
26 typedef enum {
27 POOLO_BEFORE,
28 POOLO_AFTER,
29 POOLO_LAST,
30 POOLO_FIRST
31 } pool_ordering;
33 /* pool manipulation functions */
35 extern void reiser4_init_pool(struct reiser4_pool * pool, size_t obj_size,
36 int num_of_objs, char *data);
37 extern void reiser4_done_pool(struct reiser4_pool * pool);
38 extern void reiser4_pool_free(struct reiser4_pool * pool,
39 struct reiser4_pool_header * h);
40 struct reiser4_pool_header *reiser4_add_obj(struct reiser4_pool * pool,
41 struct list_head * list,
42 pool_ordering order,
43 struct reiser4_pool_header *reference);
45 /* __REISER4_POOL_H__ */
46 #endif
48 /* Make Linus happy.
49 Local variables:
50 c-indentation-style: "K&R"
51 mode-name: "LC"
52 c-basic-offset: 8
53 tab-width: 8
54 fill-column: 120
55 End: