From 0d701f8a814792f5db473d417648c2e5a9f6a20c Mon Sep 17 00:00:00 2001 From: Liu Aleaxander Date: Mon, 11 May 2009 16:47:51 +0800 Subject: Make cache based on block size and fixed some bugs well, it's a big change. 1st, make the caceh based on block but not sector 2nd, make the fast symlink check worked. 3rd, totally changed the linsector function. 4th, some little changes. --- cache.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 33e07b6..4b3abc6 100644 --- a/cache.h +++ b/cache.h @@ -4,17 +4,13 @@ #include "types.h" -#define CACHE_ENTRIES 0x04 /* just a test */ +#define CACHE_ENTRIES 0x064 /* just a test */ /* The cache structure */ struct cache_struct { - /* - * This structure is based on secotr and I am thinking - * if we should make it based on block for performace. - */ - __u32 sector; + __u32 block; struct cache_struct *prev; struct cache_struct *next; void *data; @@ -25,6 +21,6 @@ struct cache_struct { /* functions defined in cache.c */ void cache_init(void); -struct cache_struct *get_cache_sector( int ); +struct cache_struct *get_cache_block(__u32 block); #endif /* cache.h */ -- cgit