diff options
Diffstat (limited to 'include/linux/mbcache.h')
-rw-r--r-- | include/linux/mbcache.h | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/include/linux/mbcache.h b/include/linux/mbcache.h index a09b84e4fdb4..54cbbac1e71d 100644 --- a/include/linux/mbcache.h +++ b/include/linux/mbcache.h | |||
@@ -4,9 +4,6 @@ | |||
4 | (C) 2001 by Andreas Gruenbacher, <a.gruenbacher@computer.org> | 4 | (C) 2001 by Andreas Gruenbacher, <a.gruenbacher@computer.org> |
5 | */ | 5 | */ |
6 | 6 | ||
7 | /* Hardwire the number of additional indexes */ | ||
8 | #define MB_CACHE_INDEXES_COUNT 1 | ||
9 | |||
10 | struct mb_cache_entry { | 7 | struct mb_cache_entry { |
11 | struct list_head e_lru_list; | 8 | struct list_head e_lru_list; |
12 | struct mb_cache *e_cache; | 9 | struct mb_cache *e_cache; |
@@ -18,17 +15,12 @@ struct mb_cache_entry { | |||
18 | struct { | 15 | struct { |
19 | struct list_head o_list; | 16 | struct list_head o_list; |
20 | unsigned int o_key; | 17 | unsigned int o_key; |
21 | } e_indexes[0]; | 18 | } e_index; |
22 | }; | ||
23 | |||
24 | struct mb_cache_op { | ||
25 | int (*free)(struct mb_cache_entry *, gfp_t); | ||
26 | }; | 19 | }; |
27 | 20 | ||
28 | /* Functions on caches */ | 21 | /* Functions on caches */ |
29 | 22 | ||
30 | struct mb_cache * mb_cache_create(const char *, struct mb_cache_op *, size_t, | 23 | struct mb_cache *mb_cache_create(const char *, int); |
31 | int, int); | ||
32 | void mb_cache_shrink(struct block_device *); | 24 | void mb_cache_shrink(struct block_device *); |
33 | void mb_cache_destroy(struct mb_cache *); | 25 | void mb_cache_destroy(struct mb_cache *); |
34 | 26 | ||
@@ -36,17 +28,15 @@ void mb_cache_destroy(struct mb_cache *); | |||
36 | 28 | ||
37 | struct mb_cache_entry *mb_cache_entry_alloc(struct mb_cache *, gfp_t); | 29 | struct mb_cache_entry *mb_cache_entry_alloc(struct mb_cache *, gfp_t); |
38 | int mb_cache_entry_insert(struct mb_cache_entry *, struct block_device *, | 30 | int mb_cache_entry_insert(struct mb_cache_entry *, struct block_device *, |
39 | sector_t, unsigned int[]); | 31 | sector_t, unsigned int); |
40 | void mb_cache_entry_release(struct mb_cache_entry *); | 32 | void mb_cache_entry_release(struct mb_cache_entry *); |
41 | void mb_cache_entry_free(struct mb_cache_entry *); | 33 | void mb_cache_entry_free(struct mb_cache_entry *); |
42 | struct mb_cache_entry *mb_cache_entry_get(struct mb_cache *, | 34 | struct mb_cache_entry *mb_cache_entry_get(struct mb_cache *, |
43 | struct block_device *, | 35 | struct block_device *, |
44 | sector_t); | 36 | sector_t); |
45 | #if !defined(MB_CACHE_INDEXES_COUNT) || (MB_CACHE_INDEXES_COUNT > 0) | 37 | struct mb_cache_entry *mb_cache_entry_find_first(struct mb_cache *cache, |
46 | struct mb_cache_entry *mb_cache_entry_find_first(struct mb_cache *cache, int, | ||
47 | struct block_device *, | 38 | struct block_device *, |
48 | unsigned int); | 39 | unsigned int); |
49 | struct mb_cache_entry *mb_cache_entry_find_next(struct mb_cache_entry *, int, | 40 | struct mb_cache_entry *mb_cache_entry_find_next(struct mb_cache_entry *, |
50 | struct block_device *, | 41 | struct block_device *, |
51 | unsigned int); | 42 | unsigned int); |
52 | #endif | ||