Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2363 | konopa | 1 | /* Data block. */ |
2 | |||
3 | #ifndef _BLOCK_H |
||
4 | #define _BLOCK_H |
||
5 | |||
6 | #include "dir.h" |
||
7 | |||
8 | #define DIRECTORY_BLOCK 1 /* directory block */ |
||
9 | #define INDIRECT_BLOCK 2 /* pointer block */ |
||
10 | |||
11 | typedef struct { |
||
12 | union { |
||
13 | char b__data[BLOCK_SIZE]; /* ordinary user data */ |
||
14 | direct_t b__dir[NR_DIR_ENTRIES]; /* directory block */ |
||
15 | directex_t b__direx[NR_DIR_ENTRIES_EX]; /* extended directory block */ |
||
16 | zone1_t b__v1_ind[V1_INDIRECTS]; /* V1 indirect block */ |
||
17 | zone_t b__v2_ind[V2_INDIRECTS]; /* V2 indirect block */ |
||
18 | d1_inode_t b__v1_ino[V1_INODES_PER_BLOCK]; /* V1 inode block */ |
||
19 | d2_inode_t b__v2_ino[V2_INODES_PER_BLOCK]; /* V2 inode block */ |
||
20 | } b; |
||
21 | |||
22 | block_num_t b_blocknr; /* number of block */ |
||
23 | char b_count; /* number of users of this block */ |
||
24 | } block_t; |
||
25 | |||
26 | extern block_t* work_block; |
||
27 | |||
28 | #endif /* _BLOCK_H */ |