aboutsummaryrefslogtreecommitdiffstats
path: root/cache.h
diff options
context:
space:
mode:
authorLiu Aleaxander <Aleaxander@gmail.com>2009-05-11 16:47:51 +0800
committerLiu Aleaxander <Aleaxander@gmail.com>2009-05-11 16:47:51 +0800
commit0d701f8a814792f5db473d417648c2e5a9f6a20c (patch)
treea6ef6f1800fe043aa9a812714b5b7fb01946ba13 /cache.h
parentdcc79fb69015fd7aed1db14544b155969f4d1783 (diff)
downloaddevel-0d701f8a814792f5db473d417648c2e5a9f6a20c.tar.gz
devel-0d701f8a814792f5db473d417648c2e5a9f6a20c.tar.xz
devel-0d701f8a814792f5db473d417648c2e5a9f6a20c.zip
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.
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h10
1 files changed, 3 insertions, 7 deletions
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 */