~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/minix_fs.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 #ifndef _LINUX_MINIX_FS_H
  3 #define _LINUX_MINIX_FS_H
  4 
  5 #include <linux/types.h>
  6 #include <linux/magic.h>
  7 
  8 /*
  9  * The minix filesystem constants/structures
 10  */
 11 
 12 /*
 13  * Thanks to Kees J Bot for sending me the definitions of the new
 14  * minix filesystem (aka V2) with bigger inodes and 32-bit block
 15  * pointers.
 16  */
 17 
 18 #define MINIX_ROOT_INO 1
 19 
 20 /* Not the same as the bogus LINK_MAX in <linux/limits.h>. Oh well. */
 21 #define MINIX_LINK_MAX  250
 22 #define MINIX2_LINK_MAX 65530
 23 
 24 #define MINIX_I_MAP_SLOTS       8
 25 #define MINIX_Z_MAP_SLOTS       64
 26 #define MINIX_VALID_FS          0x0001          /* Clean fs. */
 27 #define MINIX_ERROR_FS          0x0002          /* fs has errors. */
 28 
 29 #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode)))
 30 
 31 /*
 32  * This is the original minix inode layout on disk.
 33  * Note the 8-bit gid and atime and ctime.
 34  */
 35 struct minix_inode {
 36         __u16 i_mode;
 37         __u16 i_uid;
 38         __u32 i_size;
 39         __u32 i_time;
 40         __u8  i_gid;
 41         __u8  i_nlinks;
 42         __u16 i_zone[9];
 43 };
 44 
 45 /*
 46  * The new minix inode has all the time entries, as well as
 47  * long block numbers and a third indirect block (7+1+1+1
 48  * instead of 7+1+1). Also, some previously 8-bit values are
 49  * now 16-bit. The inode is now 64 bytes instead of 32.
 50  */
 51 struct minix2_inode {
 52         __u16 i_mode;
 53         __u16 i_nlinks;
 54         __u16 i_uid;
 55         __u16 i_gid;
 56         __u32 i_size;
 57         __u32 i_atime;
 58         __u32 i_mtime;
 59         __u32 i_ctime;
 60         __u32 i_zone[10];
 61 };
 62 
 63 /*
 64  * minix super-block data on disk
 65  */
 66 struct minix_super_block {
 67         __u16 s_ninodes;
 68         __u16 s_nzones;
 69         __u16 s_imap_blocks;
 70         __u16 s_zmap_blocks;
 71         __u16 s_firstdatazone;
 72         __u16 s_log_zone_size;
 73         __u32 s_max_size;
 74         __u16 s_magic;
 75         __u16 s_state;
 76         __u32 s_zones;
 77 };
 78 
 79 /*
 80  * V3 minix super-block data on disk
 81  */
 82 struct minix3_super_block {
 83         __u32 s_ninodes;
 84         __u16 s_pad0;
 85         __u16 s_imap_blocks;
 86         __u16 s_zmap_blocks;
 87         __u16 s_firstdatazone;
 88         __u16 s_log_zone_size;
 89         __u16 s_pad1;
 90         __u32 s_max_size;
 91         __u32 s_zones;
 92         __u16 s_magic;
 93         __u16 s_pad2;
 94         __u16 s_blocksize;
 95         __u8  s_disk_version;
 96 };
 97 
 98 struct minix_dir_entry {
 99         __u16 inode;
100         char name[];
101 };
102 
103 struct minix3_dir_entry {
104         __u32 inode;
105         char name[];
106 };
107 #endif
108 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php