- pre3:
[davej-history.git] / include / linux / affs_fs_i.h
bloba55951fbf837ed1ef45a0848f209688b924893c0
1 #ifndef _AFFS_FS_I
2 #define _AFFS_FS_I
4 #include <linux/a.out.h>
5 #include <linux/time.h>
7 #define AFFS_MAX_PREALLOC 16 /* MUST be a power of 2 */
8 #define AFFS_KCSIZE 73 /* Allows for 1 extension block at 512 byte-blocks */
10 struct key_cache {
11 struct timeval kc_lru_time; /* Last time this cache was used */
12 s32 kc_first; /* First cached key */
13 s32 kc_last; /* Last cached key */
14 s32 kc_this_key; /* Key of extension block this data block keys are from */
15 int kc_this_seq; /* Sequence number of this extension block */
16 s32 kc_next_key; /* Key of next extension block */
17 s32 kc_keys[AFFS_KCSIZE]; /* Key cache */
20 #define EC_SIZE (PAGE_SIZE - 4 * sizeof(struct key_cache) - 4) / 4
22 struct ext_cache {
23 struct key_cache kc[4]; /* The 4 key caches */
24 s32 ec[EC_SIZE]; /* Keys of assorted extension blocks */
25 int max_ext; /* Index of last known extension block */
29 * affs fs inode data in memory
31 struct affs_inode_info {
32 unsigned long mmu_private;
33 u32 i_protect; /* unused attribute bits */
34 s32 i_parent; /* parent ino */
35 s32 i_original; /* if != 0, this is the key of the original */
36 s32 i_data[AFFS_MAX_PREALLOC]; /* preallocated blocks */
37 struct ext_cache *i_ec; /* Cache gets allocated dynamically */
38 int i_cache_users; /* Cache cannot be freed while > 0 */
39 int i_lastblock; /* last allocated block */
40 short i_pa_cnt; /* number of preallocated blocks */
41 short i_pa_next; /* Index of next block in i_data[] */
42 short i_pa_last; /* Index of next free slot in i_data[] */
43 short i_zone; /* write zone */
44 unsigned char i_hlink; /* This is a fake */
45 unsigned char i_pad;
48 #endif