Changeset fe27eb4 in mainline for uspace/lib/ext4/libext4_balloc.c
- Timestamp:
- 2011-11-20T12:07:50Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 343ccfd
- Parents:
- ae3d4f8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_balloc.c
rae3d4f8 rfe27eb4 96 96 } 97 97 98 uint32_t bitmap_block_addr = ext4_block_group_get_block_bitmap(bg_ref->block_group); 98 uint32_t bitmap_block_addr = ext4_block_group_get_block_bitmap( 99 bg_ref->block_group, fs->superblock); 99 100 block_t *bitmap_block; 100 101 rc = block_get(&bitmap_block, fs->device, bitmap_block_addr, 0); … … 129 130 130 131 // Update block group free blocks count 131 uint32_t free_blocks = ext4_block_group_get_free_blocks_count(bg_ref->block_group); 132 uint32_t free_blocks = ext4_block_group_get_free_blocks_count( 133 bg_ref->block_group, fs->superblock); 132 134 free_blocks++; 133 ext4_block_group_set_free_blocks_count(bg_ref->block_group, free_blocks); 135 ext4_block_group_set_free_blocks_count(bg_ref->block_group, 136 fs->superblock, free_blocks); 134 137 bg_ref->dirty = true; 135 138 … … 148 151 { 149 152 uint32_t block_group_count = ext4_superblock_get_block_group_count(sb); 150 uint32_t inode_table_first_block = ext4_block_group_get_inode_table_first_block(bg); 153 uint32_t inode_table_first_block = ext4_block_group_get_inode_table_first_block( 154 bg, sb); 151 155 uint16_t inode_table_item_size = ext4_superblock_get_inode_size(sb); 152 156 uint32_t inodes_per_group = ext4_superblock_get_inodes_per_group(sb); … … 210 214 211 215 uint32_t block_group_count = ext4_superblock_get_block_group_count(fs->superblock); 212 uint32_t inode_table_first_block = ext4_block_group_get_inode_table_first_block(bg_ref->block_group); 216 uint32_t inode_table_first_block = ext4_block_group_get_inode_table_first_block( 217 bg_ref->block_group, fs->superblock); 213 218 uint16_t inode_table_item_size = ext4_superblock_get_inode_size(fs->superblock); 214 219 uint32_t inode_table_bytes; … … 278 283 279 284 // Load bitmap 280 bitmap_block_addr = ext4_block_group_get_block_bitmap(bg_ref->block_group); 285 bitmap_block_addr = ext4_block_group_get_block_bitmap(bg_ref->block_group, 286 fs->superblock); 281 287 282 288 rc = block_get(&bitmap_block, fs->device, bitmap_block_addr, 0); … … 380 386 381 387 // Load bitmap 382 bitmap_block_addr = ext4_block_group_get_block_bitmap(bg_ref->block_group); 388 bitmap_block_addr = ext4_block_group_get_block_bitmap( 389 bg_ref->block_group, fs->superblock); 383 390 384 391 rc = block_get(&bitmap_block, fs->device, bitmap_block_addr, 0); … … 461 468 462 469 // Update block group free blocks count 463 uint32_t bg_free_blocks = ext4_block_group_get_free_blocks_count(bg_ref->block_group); 470 uint32_t bg_free_blocks = ext4_block_group_get_free_blocks_count( 471 bg_ref->block_group, fs->superblock); 464 472 bg_free_blocks--; 465 ext4_block_group_set_free_blocks_count(bg_ref->block_group, bg_free_blocks); 473 ext4_block_group_set_free_blocks_count(bg_ref->block_group, 474 fs->superblock, bg_free_blocks); 466 475 bg_ref->dirty = true; 467 476
Note:
See TracChangeset
for help on using the changeset viewer.