Changeset 63ffffd in mainline


Ignore:
Timestamp:
2011-03-04T18:53:02Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1ffbbc1
Parents:
7413683
Message:

MFSv3 superblock structure is different than V1/V2 superblock

Location:
uspace/srv/fs/minixfs
Files:
2 edited

Legend:

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

    r7413683 r63ffffd  
    4747        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    4848        enum cache_mode cmode; 
    49         struct mfs_superblock *sp;
     49        struct mfs3_superblock *sp;
    5050        bool native;
    5151        mfs_version_t version;
  • uspace/srv/fs/minixfs/mfs_super.h

    r7413683 r63ffffd  
    4545#define MFS_MAGIC_V3R           0x5A4D
    4646
    47 /*V3 superblock data on disk*/
     47/*MFS V1/V2 superblock data on disk*/
    4848struct mfs_superblock {
    4949        /*Total number of inodes on the device*/
     50        uint16_t        s_ninodes;
     51        /*Total number of zones on the device*/
     52        uint16_t        s_nzones;
     53        /*Number of inode bitmap blocks*/
     54        uint16_t        s_ibmap_blocks;
     55        /*Number of zone bitmap blocks*/
     56        uint16_t        s_zbmap_blocks;
     57        /*First data zone on device*/
     58        uint16_t        s_first_data_zone;
     59        /*Base 2 logarithm of the zone to block ratio*/
     60        uint16_t        s_log2_zone_size;
     61        /*Maximum file size expressed in bytes*/
     62        uint32_t        s_max_file_size;
     63        /*
     64         *Magic number used to recognize MinixFS
     65         *and to detect on-disk endianness
     66         */
     67        uint16_t        s_magic;
     68        /*Flag used to detect FS errors*/
     69        uint16_t        s_state;
     70        /*Total number of zones on the device (V2 only)*/
     71        uint32_t        s_nzones2;
     72} __attribute__ ((packed));
     73
     74
     75/*MFS V3 superblock data on disk*/
     76struct mfs3_superblock {
     77        /*Total number of inodes on the device*/
    5078        uint32_t        s_ninodes;
    51         /*Device size expressed as number of zones (unused)*/
    52         uint16_t        s_nzones;
    5379        /*Number of inode bitmap blocks*/
    5480        int16_t         s_ibmap_blocks;
     
    6490        /*Total number of zones on the device*/
    6591        uint32_t        s_total_zones;
    66         /*Magic number used to recognize MinixFS and to detect on-disk endianness*/
     92        /*
     93         *Magic number used to recognize MinixFS
     94         *and to detect on-disk endianness
     95         */
    6796        int16_t         s_magic;
    6897        int16_t         s_pad2;
Note: See TracChangeset for help on using the changeset viewer.