search for: cache_head

Displaying 4 results from an estimated 4 matches for "cache_head".

Did you mean: cache_end
2011 Oct 21
2
[PATCH] fix for boot crash of syslinux-4.xx
...by commenting out the offending line, that seems not to be needed anyway: --- syslinux-4.04/core/fs/cache.c-orig 2011-04-18 23:24:17.000000000 +0200 +++ syslinux-4.04/core/fs/cache.c 2011-09-29 10:54:46.000000000 +0200 @@ -40,7 +40,9 @@ void cache_init(struct device *dev, int cache = dev->cache_head + 1; /* First cache descriptor */ head->prev = &cache[dev->cache_entries-1]; - head->next->prev = dev->cache_head; + /* following line crashes on some hw - NULL dereference? */ + /* head->next->prev = dev->cache_head; */ + /* it should not be needed a...
2009 May 24
0
malloc() in the core
...ache system to handle multiple block sizes (first of all, because hard disks are going to be changing from 512 to 4K sectors over the next several years, and second because filesystems like ext2 have metadata which is more logically cached on the filesystem block level): static struct cache_struct cache_head, cache[MAX_CACHE_ENTRIES]; static uint8_t cache_data[65536]; static int cache_block_size; static int cache_entries; void cache_init(int block_size) { struct cache_struct *prev, *cur; uint8_t *data = cache_data; int i; cache_block_size = block_size; cache_entries = sizeof cache_...
1998 Sep 04
0
Linux SMB Mount utils patch
...e keep only a minimal amount + * of information here. + */ +struct cache_index { + unsigned short num_entries; + unsigned short space; + struct cache_block * block; +}; + +#define NINDEX (PAGE_SIZE-64)/sizeof(struct cache_index) +/* + * The cache head is mapped as the page at offset 0. + */ +struct cache_head { + int valid; + int status; /* error code or 0 */ + int entries; /* total entries */ + int pages; /* number of data pages */ + int idx; /* index of current data page */ + struct cache_index index[NINDEX]; +}; + +/* + * An array of cache_entry structures holds information + * for each object in...
2013 Dec 26
0
[PATCH] core: Avoid initializing the cache more than once
...re/include/fs.h b/core/include/fs.h index 31ef315..1062893 100644 --- a/core/include/fs.h +++ b/core/include/fs.h @@ -130,6 +130,7 @@ struct device { struct disk *disk; /* the cache stuff */ + uint8_t cache_init; /* cache initialized state */ char *cache_data; struct cache *cache_head; uint16_t cache_block_size; -- 1.7.2.5