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

Linux Cross Reference
Linux/include/linux/sysv_fs_sb.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _SYSV_FS_SB
  2 #define _SYSV_FS_SB
  3 
  4 /*
  5  * SystemV/Coherent super-block data in memory
  6  * The SystemV/Coherent superblock contains dynamic data (it gets modified
  7  * while the system is running). This is in contrast to the Minix and Berkeley
  8  * filesystems (where the superblock is never modified). This affects the
  9  * sync() operation: we must keep the superblock in a disk buffer and use this
 10  * one as our "working copy".
 11  */
 12 
 13 struct sysv_sb_info {
 14         int            s_type;          /* file system type: FSTYPE_{XENIX|SYSV|COH} */
 15         unsigned int   s_block_size;    /* zone size, = 512 or = 1024 */
 16         unsigned int   s_block_size_1;  /* block_size - 1 */
 17         unsigned int   s_block_size_bits;       /* log2(block_size) */
 18         unsigned int   s_block_size_inc_bits;   /* log2(block_size/BLOCK_SIZE) if >0 */
 19         unsigned int   s_block_size_dec_bits;   /* log2(BLOCK_SIZE/block_size) if >0 */
 20         char           s_convert;       /* flag whether byte ordering requires conversion */
 21         char           s_kludge_symlinks; /* flag whether symlinks have a kludgey mode */
 22         char           s_truncate;      /* if 1: names > SYSV_NAMELEN chars are truncated */
 23                                         /* if 0: they are disallowed (ENAMETOOLONG) */
 24         nlink_t        s_link_max;      /* max number of hard links to a file */
 25         unsigned int   s_inodes_per_block;      /* number of inodes per block */
 26         unsigned int   s_inodes_per_block_1;    /* inodes_per_block - 1 */
 27         unsigned int   s_inodes_per_block_bits; /* log2(inodes_per_block) */
 28         unsigned int   s_ind_per_block;         /* number of indirections per block */
 29         unsigned int   s_ind_per_block_1;       /* ind_per_block - 1 */
 30         unsigned int   s_ind_per_block_bits;    /* log2(ind_per_block) */
 31         unsigned int   s_ind_per_block_2;       /* ind_per_block ^ 2 */
 32         unsigned int   s_ind_per_block_2_1;     /* ind_per_block ^ 2 - 1 */
 33         unsigned int   s_ind_per_block_2_bits;  /* log2(ind_per_block^2) */
 34         unsigned int   s_ind_per_block_3;       /* ind_per_block ^ 3 */
 35         unsigned int   s_ind_per_block_block_size_1;    /* ind_per_block*block_size - 1 */
 36         unsigned int   s_ind_per_block_block_size_bits; /* log2(ind_per_block*block_size) */
 37         unsigned int   s_ind_per_block_2_block_size_1;  /* ind_per_block^2 * block_size - 1 */
 38         unsigned int   s_ind_per_block_2_block_size_bits; /* log2(ind_per_block^2 * block_size) */
 39         unsigned int   s_ind0_size;             /* 10 * block_size */
 40         unsigned int   s_ind1_size;             /* (10 + ipb) * block_size */
 41         unsigned int   s_ind2_size;             /* (10 + ipb + ipb^2) * block_size */
 42         unsigned int   s_toobig_block;          /* 10 + ipb + ipb^2 + ipb^3 */
 43         unsigned int   s_block_base;    /* physical block number of block 0 */
 44         unsigned short s_fic_size;      /* free inode cache size, NICINOD */
 45         unsigned short s_flc_size;      /* free block list chunk size, NICFREE */
 46         /* The superblock is kept in one or two disk buffers: */
 47         struct buffer_head *s_bh1;
 48         struct buffer_head *s_bh2;
 49         /* These are pointers into the disk buffer, to compensate for
 50            different superblock layout. */
 51         char *         s_sbd1;          /* entire superblock data, for part 1 */
 52         char *         s_sbd2;          /* entire superblock data, for part 2 */
 53         u16            *s_sb_fic_count; /* pointer to s_sbd->s_ninode */
 54         u16            *s_sb_fic_inodes; /* pointer to s_sbd->s_inode */
 55         u16            *s_sb_total_free_inodes; /* pointer to s_sbd->s_tinode */
 56         u16            *s_sb_flc_count; /* pointer to s_sbd->s_nfree */
 57         u32            *s_sb_flc_blocks; /* pointer to s_sbd->s_free */
 58         u32            *s_sb_total_free_blocks;/* pointer to s_sbd->s_tfree */
 59         u32            *s_sb_time;      /* pointer to s_sbd->s_time */
 60         u32            *s_sb_state;     /* pointer to s_sbd->s_state, only FSTYPE_SYSV */
 61         /* We keep those superblock entities that don't change here;
 62            this saves us an indirection and perhaps a conversion. */
 63         u32            s_firstinodezone; /* index of first inode zone */
 64         u32            s_firstdatazone; /* same as s_sbd->s_isize */
 65         u32            s_ninodes;       /* total number of inodes */
 66         u32            s_ndatazones;    /* total number of data zones */
 67         u32            s_nzones;        /* same as s_sbd->s_fsize */
 68 };
 69 /* The fields s_ind_per_block_2_1, s_toobig_block are currently unused. */
 70 
 71 /* sv_ == u.sysv_sb.s_ */
 72 #define sv_type                                 u.sysv_sb.s_type
 73 #define sv_block_size                           u.sysv_sb.s_block_size
 74 #define sv_block_size_1                         u.sysv_sb.s_block_size_1
 75 #define sv_block_size_bits                      u.sysv_sb.s_block_size_bits
 76 #define sv_block_size_inc_bits                  u.sysv_sb.s_block_size_inc_bits
 77 #define sv_block_size_dec_bits                  u.sysv_sb.s_block_size_dec_bits
 78 #define sv_convert                              u.sysv_sb.s_convert
 79 #define sv_kludge_symlinks                      u.sysv_sb.s_kludge_symlinks
 80 #define sv_truncate                             u.sysv_sb.s_truncate
 81 #define sv_link_max                             u.sysv_sb.s_link_max
 82 #define sv_inodes_per_block                     u.sysv_sb.s_inodes_per_block
 83 #define sv_inodes_per_block_1                   u.sysv_sb.s_inodes_per_block_1
 84 #define sv_inodes_per_block_bits                u.sysv_sb.s_inodes_per_block_bits
 85 #define sv_ind_per_block                        u.sysv_sb.s_ind_per_block
 86 #define sv_ind_per_block_1                      u.sysv_sb.s_ind_per_block_1
 87 #define sv_ind_per_block_bits                   u.sysv_sb.s_ind_per_block_bits
 88 #define sv_ind_per_block_2                      u.sysv_sb.s_ind_per_block_2
 89 #define sv_ind_per_block_2_1                    u.sysv_sb.s_ind_per_block_2_1
 90 #define sv_ind_per_block_2_bits                 u.sysv_sb.s_ind_per_block_2_bits
 91 #define sv_ind_per_block_3                      u.sysv_sb.s_ind_per_block_3
 92 #define sv_ind_per_block_block_size_1           u.sysv_sb.s_ind_per_block_block_size_1
 93 #define sv_ind_per_block_block_size_bits        u.sysv_sb.s_ind_per_block_block_size_bits
 94 #define sv_ind_per_block_2_block_size_1         u.sysv_sb.s_ind_per_block_2_block_size_1
 95 #define sv_ind_per_block_2_block_size_bits      u.sysv_sb.s_ind_per_block_2_block_size_bits
 96 #define sv_ind0_size                            u.sysv_sb.s_ind0_size
 97 #define sv_ind1_size                            u.sysv_sb.s_ind1_size
 98 #define sv_ind2_size                            u.sysv_sb.s_ind2_size
 99 #define sv_toobig_block                         u.sysv_sb.s_toobig_block
100 #define sv_block_base                           u.sysv_sb.s_block_base
101 #define sv_fic_size                             u.sysv_sb.s_fic_size
102 #define sv_flc_size                             u.sysv_sb.s_flc_size
103 #define sv_bh1                                  u.sysv_sb.s_bh1
104 #define sv_bh2                                  u.sysv_sb.s_bh2
105 #define sv_sbd1                                 u.sysv_sb.s_sbd1
106 #define sv_sbd2                                 u.sysv_sb.s_sbd2
107 #define sv_sb_fic_count                         u.sysv_sb.s_sb_fic_count
108 #define sv_sb_fic_inodes                        u.sysv_sb.s_sb_fic_inodes
109 #define sv_sb_total_free_inodes                 u.sysv_sb.s_sb_total_free_inodes
110 #define sv_sb_flc_count                         u.sysv_sb.s_sb_flc_count
111 #define sv_sb_flc_blocks                        u.sysv_sb.s_sb_flc_blocks
112 #define sv_sb_total_free_blocks                 u.sysv_sb.s_sb_total_free_blocks
113 #define sv_sb_time                              u.sysv_sb.s_sb_time
114 #define sv_sb_state                             u.sysv_sb.s_sb_state
115 #define sv_firstinodezone                       u.sysv_sb.s_firstinodezone
116 #define sv_firstdatazone                        u.sysv_sb.s_firstdatazone
117 #define sv_ninodes                              u.sysv_sb.s_ninodes
118 #define sv_ndatazones                           u.sysv_sb.s_ndatazones
119 #define sv_nzones                               u.sysv_sb.s_nzones
120 
121 #endif
122 
123 

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

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.