Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


minix_fs.h
001: #ifndef _LINUX_MINIX_FS_H
002: #define _LINUX_MINIX_FS_H
003: 
004: #include <linux/types.h>
005: #include <linux/magic.h>
006: 
007: /*
008:  * The minix filesystem constants/structures
009:  */
010: 
011: /*
012:  * Thanks to Kees J Bot for sending me the definitions of the new
013:  * minix filesystem (aka V2) with bigger inodes and 32-bit block
014:  * pointers.
015:  */
016: 
017: #define MINIX_ROOT_INO 1
018: 
019: /* Not the same as the bogus LINK_MAX in <linux/limits.h>. Oh well. */
020: #define MINIX_LINK_MAX  250
021: #define MINIX2_LINK_MAX 65530
022: 
023: #define MINIX_I_MAP_SLOTS       8
024: #define MINIX_Z_MAP_SLOTS       64
025: #define MINIX_VALID_FS          0x0001          /* Clean fs. */
026: #define MINIX_ERROR_FS          0x0002          /* fs has errors. */
027: 
028: #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode)))
029: 
030: /*
031:  * This is the original minix inode layout on disk.
032:  * Note the 8-bit gid and atime and ctime.
033:  */
034: struct minix_inode {
035:         __u16 i_mode;
036:         __u16 i_uid;
037:         __u32 i_size;
038:         __u32 i_time;
039:         __u8  i_gid;
040:         __u8  i_nlinks;
041:         __u16 i_zone[9];
042: };
043: 
044: /*
045:  * The new minix inode has all the time entries, as well as
046:  * long block numbers and a third indirect block (7+1+1+1
047:  * instead of 7+1+1). Also, some previously 8-bit values are
048:  * now 16-bit. The inode is now 64 bytes instead of 32.
049:  */
050: struct minix2_inode {
051:         __u16 i_mode;
052:         __u16 i_nlinks;
053:         __u16 i_uid;
054:         __u16 i_gid;
055:         __u32 i_size;
056:         __u32 i_atime;
057:         __u32 i_mtime;
058:         __u32 i_ctime;
059:         __u32 i_zone[10];
060: };
061: 
062: /*
063:  * minix super-block data on disk
064:  */
065: struct minix_super_block {
066:         __u16 s_ninodes;
067:         __u16 s_nzones;
068:         __u16 s_imap_blocks;
069:         __u16 s_zmap_blocks;
070:         __u16 s_firstdatazone;
071:         __u16 s_log_zone_size;
072:         __u32 s_max_size;
073:         __u16 s_magic;
074:         __u16 s_state;
075:         __u32 s_zones;
076: };
077: 
078: /*
079:  * V3 minix super-block data on disk
080:  */
081: struct minix3_super_block {
082:         __u32 s_ninodes;
083:         __u16 s_pad0;
084:         __u16 s_imap_blocks;
085:         __u16 s_zmap_blocks;
086:         __u16 s_firstdatazone;
087:         __u16 s_log_zone_size;
088:         __u16 s_pad1;
089:         __u32 s_max_size;
090:         __u32 s_zones;
091:         __u16 s_magic;
092:         __u16 s_pad2;
093:         __u16 s_blocksize;
094:         __u8  s_disk_version;
095: };
096: 
097: struct minix_dir_entry {
098:         __u16 inode;
099:         char name[0];
100: };
101: 
102: struct minix3_dir_entry {
103:         __u32 inode;
104:         char name[0];
105: };
106: #endif
107: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/