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 #ifdef __KERNEL__
  66 
  67 extern int xiafs_lookup(struct inode * dir,const char * name, int len, 
  68                         struct inode ** result);
  69 extern int xiafs_create(struct inode * dir,const char * name, int len, int mode,
  70                         struct inode ** result);
  71 extern int xiafs_mkdir(struct inode * dir, const char * name, int len, int mode);
  72 extern int xiafs_rmdir(struct inode * dir, const char * name, int len);
  73 extern int xiafs_unlink(struct inode * dir, const char * name, int len);
  74 extern int xiafs_symlink(struct inode * inode, const char * name, int len,
  75                         const char * symname);
  76 extern int xiafs_link(struct inode * oldinode, struct inode * dir, 
  77                         const char * name, int len);
  78 extern int xiafs_mknod(struct inode * dir, const char * name, int len, 
  79                         int mode, int rdev);
  80 extern int xiafs_rename(struct inode * old_dir, const char * old_name, 
  81                         int old_len, struct inode * new_dir, 
  82                         const char * new_name, int new_len);
  83 extern struct inode * xiafs_new_inode(struct inode * dir);
  84 extern void xiafs_free_inode(struct inode * inode);
  85 extern unsigned long xiafs_count_free_inodes(struct super_block *sb);
  86 extern int xiafs_new_zone(struct super_block * sb, u_long prev_addr);
  87 extern void xiafs_free_zone(struct super_block * sb, int block);
  88 extern unsigned long xiafs_count_free_zones(struct super_block *sb);
  89 
  90 extern int xiafs_bmap(struct inode *,int);
  91 
  92 extern struct buffer_head * xiafs_getblk(struct inode *, int, int);
  93 extern struct buffer_head * xiafs_bread(struct inode *, int, int);
  94 
  95 extern void xiafs_truncate(struct inode *);
  96 extern void xiafs_put_super(struct super_block *);
  97 extern struct super_block *xiafs_read_super(struct super_block *,void *,int);
  98 extern void xiafs_read_inode(struct inode *);
  99 extern void xiafs_write_inode(struct inode *);
 100 extern void xiafs_put_inode(struct inode *);
 101 extern void xiafs_statfs(struct super_block *, struct statfs *, int);
 102 extern int xiafs_sync_inode(struct inode *);
 103 extern int xiafs_sync_file(struct inode *, struct file *);
 104 
 105 extern struct inode_operations xiafs_file_inode_operations;
 106 extern struct inode_operations xiafs_dir_inode_operations;
 107 extern struct inode_operations xiafs_symlink_inode_operations;
 108 
 109 #endif /* __KERNEL__ */
 110 
 111 #endif  /* _XIA_FS_H */
 112 
 113 
 114 
 115 
 116 
 117 
 118 
 119 

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