root/include/linux/minix_fs.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_MINIX_FS_H
   2 #define _LINUX_MINIX_FS_H
   3 
   4 /*
   5  * The minix filesystem constants/structures
   6  */
   7 
   8 /*
   9  * Thanks to Kees J Bot for sending me the definitions of the new
  10  * minix filesystem (aka V2) with bigger inodes and 32-bit block
  11  * pointers. It's not actually implemented yet, but I'll look into
  12  * it.
  13  */
  14 
  15 #define MINIX_ROOT_INO 1
  16 
  17 /* Not the same as the bogus LINK_MAX in <linux/limits.h>. Oh well. */
  18 #define MINIX_LINK_MAX  250
  19 
  20 #define MINIX_I_MAP_SLOTS       8
  21 #define MINIX_Z_MAP_SLOTS       8
  22 #define MINIX_SUPER_MAGIC       0x137F          /* original minix fs */
  23 #define MINIX_SUPER_MAGIC2      0x138F          /* minix fs, 30 char names */
  24 #define NEW_MINIX_SUPER_MAGIC   0x2468          /* minix V2 - not implemented */
  25 
  26 #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode)))
  27 
  28 struct minix_inode {
  29         unsigned short i_mode;
  30         unsigned short i_uid;
  31         unsigned long i_size;
  32         unsigned long i_time;
  33         unsigned char i_gid;
  34         unsigned char i_nlinks;
  35         unsigned short i_zone[9];
  36 };
  37 
  38 /*
  39  * The new minix inode has all the time entries, as well as
  40  * long block numbers and a third indirect block (7+1+1+1
  41  * instead of 7+1+1). Also, some previously 8-bit values are
  42  * now 16-bit. The inode is now 64 bytes instead of 32.
  43  */
  44 struct new_minix_inode {
  45         unsigned short i_mode;
  46         unsigned short i_nlinks;
  47         unsigned short i_uid;
  48         unsigned short i_gid;
  49         unsigned long i_size;
  50         unsigned long i_atime;
  51         unsigned long i_mtime;
  52         unsigned long i_ctime;
  53         unsigned long i_zone[10];
  54 };
  55 
  56 /*
  57  * minix super-block data on disk
  58  */
  59 struct minix_super_block {
  60         unsigned short s_ninodes;
  61         unsigned short s_nzones;
  62         unsigned short s_imap_blocks;
  63         unsigned short s_zmap_blocks;
  64         unsigned short s_firstdatazone;
  65         unsigned short s_log_zone_size;
  66         unsigned long s_max_size;
  67         unsigned short s_magic;
  68 };
  69 
  70 struct minix_dir_entry {
  71         unsigned short inode;
  72         char name[0];
  73 };
  74 
  75 extern int minix_lookup(struct inode * dir,const char * name, int len,
  76         struct inode ** result);
  77 extern int minix_create(struct inode * dir,const char * name, int len, int mode,
  78         struct inode ** result);
  79 extern int minix_mkdir(struct inode * dir, const char * name, int len, int mode);
  80 extern int minix_rmdir(struct inode * dir, const char * name, int len);
  81 extern int minix_unlink(struct inode * dir, const char * name, int len);
  82 extern int minix_symlink(struct inode * inode, const char * name, int len,
  83         const char * symname);
  84 extern int minix_link(struct inode * oldinode, struct inode * dir, const char * name, int len);
  85 extern int minix_mknod(struct inode * dir, const char * name, int len, int mode, int rdev);
  86 extern int minix_rename(struct inode * old_dir, const char * old_name, int old_len,
  87         struct inode * new_dir, const char * new_name, int new_len);
  88 extern struct inode * minix_new_inode(const struct inode * dir);
  89 extern void minix_free_inode(struct inode * inode);
  90 extern unsigned long minix_count_free_inodes(struct super_block *sb);
  91 extern int minix_new_block(struct super_block * sb);
  92 extern void minix_free_block(struct super_block * sb, int block);
  93 extern unsigned long minix_count_free_blocks(struct super_block *sb);
  94 
  95 extern int minix_bmap(struct inode *,int);
  96 
  97 extern struct buffer_head * minix_getblk(struct inode *, int, int);
  98 extern struct buffer_head * minix_bread(struct inode *, int, int);
  99 
 100 extern void minix_truncate(struct inode *);
 101 extern void minix_put_super(struct super_block *);
 102 extern struct super_block *minix_read_super(struct super_block *,void *,int);
 103 extern void minix_read_inode(struct inode *);
 104 extern void minix_write_inode(struct inode *);
 105 extern void minix_put_inode(struct inode *);
 106 extern void minix_statfs(struct super_block *, struct statfs *);
 107 
 108 extern struct inode_operations minix_file_inode_operations;
 109 extern struct inode_operations minix_dir_inode_operations;
 110 extern struct inode_operations minix_symlink_inode_operations;
 111 
 112 extern struct file_operations minix_file_operations;
 113 extern struct file_operations minix_dir_operations;
 114 
 115 #endif

/* [previous][next][first][last][top][bottom][index][help] */