Blame view
include/linux/mbcache.h
1.21 KB
1da177e4c
|
1 2 3 4 5 |
/* File: linux/mbcache.h (C) 2001 by Andreas Gruenbacher, <a.gruenbacher@computer.org> */ |
1da177e4c
|
6 7 8 9 10 11 12 13 14 15 16 |
struct mb_cache_entry { struct list_head e_lru_list; struct mb_cache *e_cache; unsigned short e_used; unsigned short e_queued; struct block_device *e_bdev; sector_t e_block; struct list_head e_block_list; struct { struct list_head o_list; unsigned int o_key; |
2aec7c523
|
17 |
} e_index; |
1da177e4c
|
18 19 20 |
}; /* Functions on caches */ |
2aec7c523
|
21 |
struct mb_cache *mb_cache_create(const char *, int); |
8c52ab42c
|
22 |
void mb_cache_shrink(struct block_device *); |
1da177e4c
|
23 24 25 |
void mb_cache_destroy(struct mb_cache *); /* Functions on cache entries */ |
335e92e8a
|
26 |
struct mb_cache_entry *mb_cache_entry_alloc(struct mb_cache *, gfp_t); |
1da177e4c
|
27 |
int mb_cache_entry_insert(struct mb_cache_entry *, struct block_device *, |
2aec7c523
|
28 |
sector_t, unsigned int); |
1da177e4c
|
29 30 31 32 33 |
void mb_cache_entry_release(struct mb_cache_entry *); void mb_cache_entry_free(struct mb_cache_entry *); struct mb_cache_entry *mb_cache_entry_get(struct mb_cache *, struct block_device *, sector_t); |
2aec7c523
|
34 |
struct mb_cache_entry *mb_cache_entry_find_first(struct mb_cache *cache, |
1da177e4c
|
35 36 |
struct block_device *, unsigned int); |
2aec7c523
|
37 |
struct mb_cache_entry *mb_cache_entry_find_next(struct mb_cache_entry *, |
1da177e4c
|
38 39 |
struct block_device *, unsigned int); |