Changeset 60c409c in mainline


Ignore:
Timestamp:
2015-04-26T21:01:35Z (10 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
418f21d
Parents:
d76973c
Message:

libext4: fix ext4_filesystem_blockaddr2group() to support filesystems with block size = 1 Kb

File:
1 edited

Legend:

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

    rd76973c r60c409c  
    261261{
    262262        uint32_t blocks_per_group = ext4_superblock_get_blocks_per_group(sb);
    263 
    264         return b / blocks_per_group;
     263        uint32_t first_block = ext4_superblock_get_first_data_block(sb);
     264
     265        return (b - first_block) / blocks_per_group;
    265266}
    266267
Note: See TracChangeset for help on using the changeset viewer.