Changeset 5cef315 in mainline for uspace/lib/ext4/src/superblock.c
- Timestamp:
- 2018-10-01T23:41:49Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dbcaa2d
- Parents:
- 3f7fe9e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/src/superblock.c
r3f7fe9e r5cef315 1248 1248 uint32_t ext4_superblock_get_block_group_count(ext4_superblock_t *sb) 1249 1249 { 1250 uint64_t blocks_count = ext4_superblock_get_blocks_count(sb) ;1250 uint64_t blocks_count = ext4_superblock_get_blocks_count(sb) - 1; 1251 1251 uint32_t blocks_per_group = ext4_superblock_get_blocks_per_group(sb); 1252 1252 … … 1274 1274 ext4_superblock_get_blocks_per_group(sb); 1275 1275 uint64_t total_blocks = 1276 ext4_superblock_get_blocks_count(sb) ;1276 ext4_superblock_get_blocks_count(sb) - 1; 1277 1277 1278 1278 if (bgid < block_group_count - 1) … … 1533 1533 ext4_superblock_set_magic(sb, EXT4_SUPERBLOCK_MAGIC); 1534 1534 ext4_superblock_set_inodes_count(sb, inodes_count); 1535 ext4_superblock_set_blocks_count(sb, blocks_count); 1535 /* This seems to include the boot block, despite the ext2fs docs */ 1536 ext4_superblock_set_blocks_count(sb, fs_blocks); 1536 1537 ext4_superblock_set_reserved_blocks_count(sb, res_blocks); 1537 1538 ext4_superblock_set_free_blocks_count(sb, free_blocks); … … 1583 1584 /* Compute free blocks */ 1584 1585 free_blocks = blocks_count; 1586 ++free_blocks; // XXX Why? 1585 1587 for (idx = 0; idx < ngroups; idx++) { 1586 1588 free_blocks -= ext4_superblock_get_group_backup_blocks(sb, idx);
Note:
See TracChangeset
for help on using the changeset viewer.