Changeset b53a733 in mainline for uspace/lib/ext4/libext4_extent.h


Ignore:
Timestamp:
2012-03-07T09:33:14Z (13 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e2629b08
Parents:
a872fc09
Message:

Data types definitions groupped to one file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_extent.h

    ra872fc09 rb53a733  
    3434#define LIBEXT4_LIBEXT4_EXTENT_H_
    3535
    36 /*
    37  * This is the extent on-disk structure.
    38  * It's used at the bottom of the tree.
    39  */
    40 typedef struct ext4_extent {
    41         uint32_t first_block; // First logical block extent covers
    42         uint16_t block_count; // Number of blocks covered by extent
    43         uint16_t start_hi;    // High 16 bits of physical block
    44         uint32_t start_lo;    // Low 32 bits of physical block
    45 } ext4_extent_t;
    46 
    47 /*
    48  * This is index on-disk structure.
    49  * It's used at all the levels except the bottom.
    50  */
    51 typedef struct ext4_extent_index {
    52         uint32_t first_block; // Index covers logical blocks from 'block'
    53         uint32_t leaf_lo; /* Pointer to the physical block of the next
    54                                            * level. leaf or next index could be there */
    55         uint16_t leaf_hi;     /* high 16 bits of physical block */
    56         uint16_t padding;
    57 } ext4_extent_index_t;
    58 
    59 /*
    60  * Each block (leaves and indexes), even inode-stored has header.
    61  */
    62 typedef struct ext4_extent_header {
    63         uint16_t magic;
    64         uint16_t entries_count; // Number of valid entries
    65         uint16_t max_entries_count; // Capacity of store in entries
    66         uint16_t depth; // Has tree real underlying blocks?
    67         uint32_t generation; // generation of the tree
    68 } ext4_extent_header_t;
    69 
    70 #define EXT4_EXTENT_MAGIC       0xF30A
    71 #define EXT4_EXTENT_FIRST(header)       \
    72                 ((ext4_extent_t *) (((void *) (header)) + sizeof(ext4_extent_header_t)))
    73 #define EXT4_EXTENT_FIRST_INDEX(header) \
    74                 ((ext4_extent_index_t *) (((void *) (header)) + sizeof(ext4_extent_header_t)))
     36#include "libext4_types.h"
    7537
    7638extern uint32_t ext4_extent_get_first_block(ext4_extent_t *);
Note: See TracChangeset for help on using the changeset viewer.