root/include/linux/xia_fs.h

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

INCLUDED FROM


   1 #ifndef _XIA_FS_H
   2 #define _XIA_FS_H
   3 
   4 /*
   5  * include/linux/xia_fs.h
   6  *
   7  * Copyright (C) Q. Frank Xia, 1993.
   8  *
   9  * Based on Linus' minix_fs.h.
  10  * Copyright (C) Linus Torvalds, 1991, 1992.
  11  */
  12 
  13 #define _XIAFS_SUPER_MAGIC 0x012FD16D
  14 #define _XIAFS_ROOT_INO 1
  15 #define _XIAFS_BAD_INO  2
  16 
  17 #define _XIAFS_NAME_LEN 248
  18 
  19 #define _XIAFS_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof(struct xiafs_inode)))
  20 
  21 struct xiafs_inode {            /* 64 bytes */
  22     mode_t   i_mode;
  23     nlink_t  i_nlinks;
  24     uid_t    i_uid;
  25     gid_t    i_gid;
  26     size_t   i_size;            /* 8 */
  27     time_t   i_ctime;
  28     time_t   i_atime;
  29     time_t   i_mtime;
  30     daddr_t  i_zone[8];
  31     daddr_t  i_ind_zone;
  32     daddr_t  i_dind_zone;
  33 };
  34 
  35 /*
  36  * linux super-block data on disk
  37  */
  38 struct xiafs_super_block {
  39     u_char  s_boot_segment[512];        /*  1st sector reserved for boot */
  40     u_long  s_zone_size;                /*  0: the name says it          */
  41     u_long  s_nzones;                   /*  1: volume size, zone aligned */ 
  42     u_long  s_ninodes;                  /*  2: # of inodes               */
  43     u_long  s_ndatazones;               /*  3: # of data zones           */
  44     u_long  s_imap_zones;               /*  4: # of imap zones           */
  45     u_long  s_zmap_zones;               /*  5: # of zmap zones           */
  46     u_long  s_firstdatazone;            /*  6: first data zone           */
  47     u_long  s_zone_shift;               /*  7: z size = 1KB << z shift   */
  48     u_long  s_max_size;                 /*  8: max size of a single file */
  49     u_long  s_reserved0;                /*  9: reserved                  */
  50     u_long  s_reserved1;                /* 10:                           */
  51     u_long  s_reserved2;                /* 11:                           */
  52     u_long  s_reserved3;                /* 12:                           */
  53     u_long  s_firstkernzone;            /* 13: first kernel zone         */
  54     u_long  s_kernzones;                /* 14: kernel size in zones      */
  55     u_long  s_magic;                    /* 15: magic number for xiafs    */
  56 };
  57 
  58 struct xiafs_direct {
  59     ino_t   d_ino;
  60     u_short d_rec_len;
  61     u_char  d_name_len;
  62     char    d_name[_XIAFS_NAME_LEN+1];
  63 };
  64 
  65 extern int xiafs_lookup(struct inode * dir,const char * name, int len, 
  66                         struct inode ** result);
  67 extern int xiafs_create(struct inode * dir,const char * name, int len, int mode,
  68                         struct inode ** result);
  69 extern int xiafs_mkdir(struct inode * dir, const char * name, int len, int mode);
  70 extern int xiafs_rmdir(struct inode * dir, const char * name, int len);
  71 extern int xiafs_unlink(struct inode * dir, const char * name, int len);
  72 extern int xiafs_symlink(struct inode * inode, const char * name, int len,
  73                         const char * symname);
  74 extern int xiafs_link(struct inode * oldinode, struct inode * dir, 
  75                         const char * name, int len);
  76 extern int xiafs_mknod(struct inode * dir, const char * name, int len, 
  77                         int mode, int rdev);
  78 extern int xiafs_rename(struct inode * old_dir, const char * old_name, 
  79                         int old_len, struct inode * new_dir, 
  80                         const char * new_name, int new_len);
  81 extern struct inode * xiafs_new_inode(struct inode * dir);
  82 extern void xiafs_free_inode(struct inode * inode);
  83 extern unsigned long xiafs_count_free_inodes(struct super_block *sb);
  84 extern int xiafs_new_zone(struct super_block * sb, u_long prev_addr);
  85 extern void xiafs_free_zone(struct super_block * sb, int block);
  86 extern unsigned long xiafs_count_free_zones(struct super_block *sb);
  87 
  88 extern int xiafs_bmap(struct inode *,int);
  89 
  90 extern struct buffer_head * xiafs_getblk(struct inode *, int, int);
  91 extern struct buffer_head * xiafs_bread(struct inode *, int, int);
  92 
  93 extern void xiafs_truncate(struct inode *);
  94 extern void xiafs_put_super(struct super_block *);
  95 extern struct super_block *xiafs_read_super(struct super_block *,void *,int);
  96 extern void xiafs_read_inode(struct inode *);
  97 extern void xiafs_write_inode(struct inode *);
  98 extern void xiafs_put_inode(struct inode *);
  99 extern void xiafs_statfs(struct super_block *, struct statfs *);
 100 
 101 extern struct inode_operations xiafs_file_inode_operations;
 102 extern struct inode_operations xiafs_dir_inode_operations;
 103 extern struct inode_operations xiafs_symlink_inode_operations;
 104 
 105 extern struct file_operations xiafs_file_operations;
 106 extern struct file_operations xiafs_dir_operations;
 107 
 108 #endif  /* _XIA_FS_H */
 109 
 110 
 111 
 112 
 113 
 114 
 115 
 116 

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