5 #include "sofs_superblock.h"
7 /* usefull macro and function */
9 void printError (int errcode
, char *cmd_name
);
13 printError(-(err), argv[0]);\
17 #define FABORT(err, fname) \
19 printError(-(err), fname);\
23 typedef enum{idle
, busy
, bah
} ic_t
;
25 //typedef enum{idle, busy, bah} cc_t;
28 void fetch_superblock(SOSuperBlock
**sb
);
30 /* inode control table */
32 void ictable_create(void);
33 void ictable_free(void);
34 void ictable_set(uint32_t index
, ic_t value
);
35 void ictable_get(uint32_t index
, ic_t
*value
);
36 void ictable_print(void);
38 /* cluster control table */
39 /* index < dzone_size */
40 void cctable_create(void);
41 void cctable_free(void);
42 void cctable_set(uint32_t index
, cc_t value
);
43 void cctable_get(uint32_t index
, cc_t
*value
);
44 void cctable_print(void);
46 /* inode refcount table */
48 void irtable_create(void);
49 void irtable_free(void);
50 void irtable_inc(uint32_t index
);
51 void irtable_get(uint32_t index
, uint32_t *value
);
53 #endif /* _FSCK_HELPER_ */