root/include/linux/ext_fs.h

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

INCLUDED FROM


   1 #ifndef _LINUX_EXT_FS_H
   2 #define _LINUX_EXT_FS_H
   3 
   4 /*
   5  * The ext filesystem constants/structures
   6  */
   7 
   8 #define EXT_NAME_LEN 255
   9 #define EXT_ROOT_INO 1
  10 
  11 #define EXT_SUPER_MAGIC 0x137D
  12 
  13 #define EXT_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct ext_inode)))
  14 
  15 struct ext_inode {
  16         unsigned short i_mode;
  17         unsigned short i_uid;
  18         unsigned long i_size;
  19         unsigned long i_time;
  20         unsigned short i_gid;
  21         unsigned short i_nlinks;
  22         unsigned long i_zone[12];
  23 };
  24 
  25 struct ext_free_inode {
  26         unsigned long count;
  27         unsigned long free[14];
  28         unsigned long next;
  29 };
  30 
  31 struct ext_free_block {
  32         unsigned long count;
  33         unsigned long free[254];
  34         unsigned long next;
  35 };
  36 
  37 struct ext_super_block {
  38         unsigned long s_ninodes;
  39         unsigned long s_nzones;
  40         unsigned long s_firstfreeblock;
  41         unsigned long s_freeblockscount;
  42         unsigned long s_firstfreeinode;
  43         unsigned long s_freeinodescount;
  44         unsigned long s_firstdatazone;
  45         unsigned long s_log_zone_size;
  46         unsigned long s_max_size;
  47         unsigned long s_reserved1;
  48         unsigned long s_reserved2;
  49         unsigned long s_reserved3;
  50         unsigned long s_reserved4;
  51         unsigned long s_reserved5;
  52         unsigned short s_magic;
  53 };
  54 
  55 struct ext_dir_entry {
  56         unsigned long inode;
  57         unsigned short rec_len;
  58         unsigned short name_len;
  59         char name[EXT_NAME_LEN];
  60 };
  61 
  62 extern int ext_open(struct inode * inode, struct file * filp);
  63 extern void ext_release(struct inode * inode, struct file * filp);
  64 extern int ext_lookup(struct inode * dir,const char * name, int len,
  65         struct inode ** result);
  66 extern int ext_create(struct inode * dir,const char * name, int len, int mode,
  67         struct inode ** result);
  68 extern int ext_mkdir(struct inode * dir, const char * name, int len, int mode);
  69 extern int ext_rmdir(struct inode * dir, const char * name, int len);
  70 extern int ext_unlink(struct inode * dir, const char * name, int len);
  71 extern int ext_symlink(struct inode * inode, const char * name, int len,
  72         const char * symname);
  73 extern int ext_link(struct inode * oldinode, struct inode * dir, const char * name, int len);
  74 extern int ext_mknod(struct inode * dir, const char * name, int len, int mode, int rdev);
  75 extern int ext_rename(struct inode * old_dir, const char * old_name, int old_len,
  76         struct inode * new_dir, const char * new_name, int new_len);
  77 extern struct inode * ext_new_inode(const struct inode * dir);
  78 extern void ext_free_inode(struct inode * inode);
  79 extern unsigned long ext_count_free_inodes(struct super_block *sb);
  80 extern int ext_new_block(struct super_block * sb);
  81 extern void ext_free_block(struct super_block * sb, int block);
  82 extern unsigned long ext_count_free_blocks(struct super_block *sb);
  83 
  84 extern int ext_bmap(struct inode *,int);
  85 
  86 extern struct buffer_head * ext_getblk(struct inode *, int, int);
  87 extern struct buffer_head * ext_bread(struct inode *, int, int);
  88 
  89 extern void ext_truncate(struct inode *);
  90 extern void ext_put_super(struct super_block *);
  91 extern void ext_write_super(struct super_block *);
  92 extern struct super_block *ext_read_super(struct super_block *,void *,int);
  93 extern void ext_read_inode(struct inode *);
  94 extern void ext_write_inode(struct inode *);
  95 extern void ext_put_inode(struct inode *);
  96 extern void ext_statfs(struct super_block *, struct statfs *);
  97 
  98 extern int ext_lseek(struct inode *, struct file *, off_t, int);
  99 extern int ext_read(struct inode *, struct file *, char *, int);
 100 extern int ext_write(struct inode *, struct file *, char *, int);
 101 
 102 extern struct inode_operations ext_file_inode_operations;
 103 extern struct inode_operations ext_dir_inode_operations;
 104 extern struct inode_operations ext_symlink_inode_operations;
 105 
 106 extern struct file_operations ext_file_operations;
 107 extern struct file_operations ext_dir_operations;
 108 
 109 #endif

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