Changeset d76973c in mainline for uspace/lib/ext4/libext4_filesystem.h


Ignore:
Timestamp:
2015-04-25T21:20:11Z (10 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
60c409c
Parents:
7f29575
Message:

libext4: introduce support for flexible block groups.

With FLEX_BG, several block groups are tied together as one single group,
the first group of the flex_bg contains the block/inode bitmaps and the inode tables of all the other groups.
This improves metadata locality and frees up a lot of contiguous free space for extents.

  • modified ext4_balloc_free_blocks() so it can free extents spanning 2 or more block groups
  • with FLEX_BG the inode table, the bitmap and inode blocks of a group can reside on a different group.
    • the ext4_balloc_get_first_data_block_in_group() function has been modified to return a correct result in such a case.
    • improve the ext4_filesystem_init_block_bitmap() for the flex_bg case.
  • added the ext4_filesystem_blockaddr2group() function that given a block number returns the id of the group it belongs to.
  • added the ext4_filesystem_bg_get_itable_size() functions that given a group id number returns the size in blocks of its inode table.
File:
1 edited

Legend:

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

    r7f29575 rd76973c  
    4747extern uint32_t ext4_filesystem_index_in_group2blockaddr(ext4_superblock_t *,
    4848    uint32_t, uint32_t);
     49extern uint32_t ext4_filesystem_blockaddr2group(ext4_superblock_t *, uint64_t);
    4950extern int ext4_filesystem_get_block_group_ref(ext4_filesystem_t *, uint32_t,
    5051    ext4_block_group_ref_t **);
     
    6465extern int ext4_filesystem_append_inode_block(ext4_inode_ref_t *, uint32_t *,
    6566    uint32_t *);
    66 uint32_t ext4_block_group_get_backup_blocks(ext4_block_group_ref_t *bg);
     67uint32_t ext4_filesystem_bg_get_backup_blocks(ext4_block_group_ref_t *bg);
     68uint32_t ext4_filesystem_bg_get_itable_size(ext4_superblock_t *sb,
     69    ext4_block_group_ref_t *bg_ref);
    6770
    6871#endif
Note: See TracChangeset for help on using the changeset viewer.