OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [LINUX_2_4_26_OR32/] [linux/] [linux-2.4/] [include/] [linux/] [affs_fs_i.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#ifndef _AFFS_FS_I
2
#define _AFFS_FS_I
3
 
4
#include <linux/a.out.h>
5
 
6
// move this to linux/coda.h!!!
7
#include <linux/time.h>
8
 
9
#define AFFS_CACHE_SIZE         PAGE_SIZE
10
//#define AFFS_CACHE_SIZE               (4*4)
11
 
12
#define AFFS_MAX_PREALLOC       32
13
#define AFFS_LC_SIZE            (AFFS_CACHE_SIZE/sizeof(u32)/2)
14
#define AFFS_AC_SIZE            (AFFS_CACHE_SIZE/sizeof(struct affs_ext_key)/2)
15
#define AFFS_AC_MASK            (AFFS_AC_SIZE-1)
16
 
17
struct affs_ext_key {
18
        u32     ext;                            /* idx of the extended block */
19
        u32     key;                            /* block number */
20
};
21
 
22
/*
23
 * affs fs inode data in memory
24
 */
25
struct affs_inode_info {
26
        u32      i_opencnt;
27
        struct semaphore i_link_lock;           /* Protects internal inode access. */
28
        struct semaphore i_ext_lock;            /* Protects internal inode access. */
29
#define i_hash_lock i_ext_lock
30
        u32      i_blkcnt;                      /* block count */
31
        u32      i_extcnt;                      /* extended block count */
32
        u32     *i_lc;                          /* linear cache of extended blocks */
33
        u32      i_lc_size;
34
        u32      i_lc_shift;
35
        u32      i_lc_mask;
36
        struct affs_ext_key *i_ac;              /* associative cache of extended blocks */
37
        u32      i_ext_last;                    /* last accessed extended block */
38
        struct buffer_head *i_ext_bh;           /* bh of last extended block */
39
        unsigned long mmu_private;
40
        u32      i_protect;                     /* unused attribute bits */
41
        u32      i_lastalloc;                   /* last allocated block */
42
        int      i_pa_cnt;                      /* number of preallocated blocks */
43
#if 0
44
        s32      i_original;                    /* if != 0, this is the key of the original */
45
        u32      i_data[AFFS_MAX_PREALLOC];     /* preallocated blocks */
46
        int      i_cache_users;                 /* Cache cannot be freed while > 0 */
47
        unsigned char i_hlink;                  /* This is a fake */
48
        unsigned char i_pad;
49
        s32      i_parent;                      /* parent ino */
50
#endif
51
};
52
 
53
/* short cut to get to the affs specific inode data */
54
#define AFFS_INODE      (&inode->u.affs_i)
55
#define AFFS_DIR        (&dir->u.affs_i)
56
 
57
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.