Changeset a6e094f in mainline for uspace/srv/fs/minixfs/mfs_super.h


Ignore:
Timestamp:
2011-03-01T18:34:30Z (14 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
85d32df7
Parents:
128b8ee
Message:

Drop code copied from minix3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/minixfs/mfs_super.h

    r128b8ee ra6e094f  
    3636#include "mfs_const.h"
    3737
    38 /* Super block table.  The root file system and every mounted file system
    39  * has an entry here.  The entry holds information about the sizes of the bit
    40  * maps and inodes.  The s_ninodes field gives the number of inodes available
    41  * for files and directories, including the root directory.  Inode 0 is
    42  * on the disk, but not used.  Thus s_ninodes = 4 means that 5 bits will be
    43  * used in the bit map, bit 0, which is always 1 and not used, and bits 1-4
    44  * for files and directories.  The disk layout is:
    45  *
    46  *    Item        # blocks
    47  *    boot block      1
    48  *    super block     1    (offset 1kB)
    49  *    inode map     s_imap_blocks
    50  *    zone map      s_zmap_blocks
    51  *    inodes        (s_ninodes + 'inodes per block' - 1)/'inodes per block'
    52  *    unused        whatever is needed to fill out the current zone
    53  *    data zones    (s_zones - s_firstdatazone) << s_log_zone_size
    54  *
    55  */
    5638
    57 struct mfs_v3_superblock {
    58         uint32_t        s_ninodes;              /*# usable inodes on the device*/
    59         uint16_t        s_nzones;               /*total device size including bitmaps etc*/
    60         int16_t         s_imap_blocks;          /*# of blocks used by inode bitmap*/
    61         int16_t         s_zmap_blocks;          /*# of blocks used by zone bitmap*/
    62         uint16_t        s_firstdatazone_old;    /*# of first data zone (small)*/
    63         int16_t         s_log_zone_size;        /*log2 of blocks / zone*/
    64         int16_t         s_pad;                  /*try to avoid compiler dependent padding*/
    65         int32_t         s_max_size;             /*maximum file size*/
    66         uint32_t        s_zones;                /*number of zones*/
    67         int16_t         s_magic;                /*magic number to recognize superblocks*/
     39struct mfs_superblock {
     40        /*Total number of inodes on the device*/
     41        uint32_t        s_ninodes;
     42        /*Device size expressed as number of zones (unused)*/
     43        uint16_t        s_nzones;
     44        /*Number of inode bitmap blocks*/
     45        int16_t         s_ibmap_blocks;
     46        /*Number of zone bitmap blocks*/
     47        int16_t         s_zbmap_blocks;
     48        /*First data zone on device*/
     49        uint16_t        s_first_data_zone;
     50        /*Base 2 logarithm of the zone to block ratio*/
     51        int16_t         s_log2_zone_size;
     52        int16_t         s_pad;
     53        /*Maximum file size expressed in bytes*/
     54        int32_t         s_max_file_size;
     55        /*Total number of zones on the device*/
     56        uint32_t        s_total_zones;
     57        /*Magic number used to recognize MinixFS and to detect on-disk endianness*/
     58        int16_t         s_magic;
    6859
    69         /* The following items are valid on disk only for V3 and above */
    70        
     60        /* The following fields are valid only for MinixFS V3 */
     61
    7162        int16_t         s_pad2;
    72         uint16_t        s_block_size;           /*block size in bytes*/
    73         int8_t          s_disk_version;         /*filesystem format sub-version*/
     63        /*Filesystem block size expressed in bytes*/
     64        uint16_t        s_block_size;
     65        /*Filesystem disk format version*/
     66        int8_t          s_disk_version;
    7467} __attribute__ ((packed));
    7568
Note: See TracChangeset for help on using the changeset viewer.