VM: make mapping types explicit
[minix.git] / usr.sbin / mkfs.mfs / type.h
blob2c65282b1bb10a4afa45301b040ea06a42975418
1 #ifndef __MFS_TYPE_H__
2 #define __MFS_TYPE_H__
4 /* Declaration of the V1 inode as it is on the disk (not in core). */
5 typedef struct { /* V1.x disk inode */
6 uint16_t d1_mode; /* file type, protection, etc. */
7 int16_t d1_uid; /* user id of the file's owner */
8 int32_t d1_size; /* current file size in bytes */
9 int32_t d1_mtime; /* when was file data last changed */
10 uint8_t d1_gid; /* group number */
11 uint8_t d1_nlinks; /* how many links to this file */
12 uint16_t d1_zone[V1_NR_TZONES];/* block nums for direct, ind, and dbl ind */
13 } d1_inode;
15 /* Declaration of the V2 inode as it is on the disk (not in core). */
16 typedef struct { /* V2.x disk inode */
17 uint16_t d2_mode; /* file type, protection, etc. */
18 uint16_t d2_nlinks; /* how many links to this file. HACK! */
19 int16_t d2_uid; /* user id of the file's owner. */
20 uint16_t d2_gid; /* group number HACK! */
21 int32_t d2_size; /* current file size in bytes */
22 int32_t d2_atime; /* when was file data last accessed */
23 int32_t d2_mtime; /* when was file data last changed */
24 int32_t d2_ctime; /* when was inode data last changed */
25 uint32_t d2_zone[V2_NR_TZONES];/* block nums for direct, ind, and dbl ind */
26 } d2_inode;
28 struct buf {
29 /* Data portion of the buffer. */
30 union fsdata_u *bp;
32 /* Header portion of the buffer. */
33 struct buf *b_next; /* used to link all free bufs in a chain */
34 struct buf *b_prev; /* used to link all free bufs the other way */
35 struct buf *b_hash; /* used to link bufs on hash chains */
36 uint32_t b_blocknr; /* block number of its (minor) device */
37 dev_t b_dev; /* major | minor device where block resides */
38 char b_dirt; /* BP_CLEAN or BP_DIRTY */
39 char b_count; /* number of users of this buffer */
40 unsigned int b_bytes; /* Number of bytes allocated in bp */
43 #endif