00001
00002 #define V1_NR_DZONES 7
00003 #define V1_NR_TZONES 9
00004 #define V2_NR_DZONES 7
00005 #define V2_NR_TZONES 10
00006
00007 #define NR_INODES 256
00008 #define GETDENTS_BUFSIZ 257
00009
00010 #define INODE_HASH_LOG2 7
00011 #define INODE_HASH_SIZE ((unsigned long)1<<INODE_HASH_LOG2)
00012 #define INODE_HASH_MASK (((unsigned long)1<<INODE_HASH_LOG2)-1)
00013
00014
00015
00016
00017
00018
00019 #define usizeof(t) ((unsigned) sizeof(t))
00020
00021
00022 #define SUPER_MAGIC 0x137F
00023 #define SUPER_REV 0x7F13
00024 #define SUPER_V2 0x2468
00025 #define SUPER_V2_REV 0x6824
00026 #define SUPER_V3 0x4d5a
00027
00028 #define V1 1
00029 #define V2 2
00030 #define V3 3
00031
00032
00033 #define SU_UID ((uid_t) 0)
00034 #define SERVERS_UID ((uid_t) 11)
00035 #define SYS_UID ((uid_t) 0)
00036 #define SYS_GID ((gid_t) 0)
00037 #define NORMAL 0
00038 #define NO_READ 1
00039 #define PREFETCH 2
00040
00041 #define NO_BIT ((bit_t) 0)
00042
00043 #define LOOK_UP 0
00044 #define ENTER 1
00045 #define DELETE 2
00046 #define IS_EMPTY 3
00047
00048
00049 #define WMAP_FREE (1 << 0)
00050
00051 #define IGN_PERM 0
00052 #define CHK_PERM 1
00053
00054 #define PATH_TRANSPARENT 000
00055 #define PATH_PENULTIMATE 001
00056 #define PATH_OPAQUE 002
00057 #define PATH_NONSYMBOLIC 004
00058 #define PATH_STRIPDOT 010
00059 #define EAT_PATH PATH_TRANSPARENT
00060 #define EAT_PATH_OPAQUE PATH_OPAQUE
00061 #define LAST_DIR PATH_PENULTIMATE
00062 #define LAST_DIR_NOTDOT PATH_PENULTIMATE | PATH_STRIPDOT
00063 #define LAST_DIR_EATSYM PATH_NONSYMBOLIC
00064
00065 #define CLEAN 0
00066 #define DIRTY 1
00067 #define ATIME 002
00068 #define CTIME 004
00069 #define MTIME 010
00070
00071 #define BYTE_SWAP 0
00072
00073 #define END_OF_FILE (-104)
00074
00075 #define ROOT_INODE 1
00076 #define BOOT_BLOCK ((block_t) 0)
00077 #define SUPER_BLOCK_BYTES (1024)
00078 #define START_BLOCK 2
00079
00080 #define DIR_ENTRY_SIZE usizeof (struct direct)
00081 #define NR_DIR_ENTRIES(b) ((b)/DIR_ENTRY_SIZE)
00082 #define SUPER_SIZE usizeof (struct super_block)
00083
00084 #define FS_BITMAP_CHUNKS(b) ((b)/usizeof (bitchunk_t))
00085 #define FS_BITCHUNK_BITS (usizeof(bitchunk_t) * CHAR_BIT)
00086 #define FS_BITS_PER_BLOCK(b) (FS_BITMAP_CHUNKS(b) * FS_BITCHUNK_BITS)
00087
00088
00089 #define V1_ZONE_NUM_SIZE usizeof (zone1_t)
00090 #define V1_INODE_SIZE usizeof (d1_inode)
00091
00092
00093 #define V1_INDIRECTS (_STATIC_BLOCK_SIZE/V1_ZONE_NUM_SIZE)
00094
00095
00096 #define V1_INODES_PER_BLOCK (_STATIC_BLOCK_SIZE/V1_INODE_SIZE)
00097
00098
00099 #define V2_ZONE_NUM_SIZE usizeof (zone_t)
00100 #define V2_INODE_SIZE usizeof (d2_inode)
00101 #define V2_INDIRECTS(b) ((b)/V2_ZONE_NUM_SIZE)
00102 #define V2_INODES_PER_BLOCK(b) ((b)/V2_INODE_SIZE)
00103
00104 #define MFS_MIN(a,b) mfs_min_f(__FILE__,__LINE__,(a), (b))
00105 #define MFS_NUL(str,l,m) mfs_nul_f(__FILE__,__LINE__,(str), (l), (m))
00106
00107
00108 #define MFS_DEV_READ 10001
00109 #define MFS_DEV_WRITE 10002
00110 #define MFS_DEV_SCATTER 10003
00111 #define MFS_DEV_GATHER 10004
00112