Changeset 1196df6 in mainline for uspace/lib/ext4/libext4_extent.c
- Timestamp:
- 2012-04-08T09:02:16Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6f41312
- Parents:
- 3b5c119
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_extent.c
r3b5c119 r1196df6 249 249 ext4_extent_binsearch(header, &extent, iblock); 250 250 251 assert(extent != NULL); 252 253 uint32_t phys_block; 254 phys_block = ext4_extent_get_start(extent) + iblock; 255 phys_block -= ext4_extent_get_first_block(extent); 256 257 *fblock = phys_block; 251 if (extent == NULL) { 252 *fblock = 0; 253 } else { 254 uint32_t phys_block; 255 phys_block = ext4_extent_get_start(extent) + iblock; 256 phys_block -= ext4_extent_get_first_block(extent); 257 258 *fblock = phys_block; 259 } 258 260 259 261 if (block != NULL) { 260 262 block_put(block); 261 263 } 262 263 264 264 265 return EOK; … … 396 397 } 397 398 398 int ext4_extent_release_blocks_from(ext4_inode_ref_t *inode_ref, uint32_t iblock_from) 399 int ext4_extent_release_blocks_from(ext4_inode_ref_t *inode_ref, 400 uint32_t iblock_from) 399 401 { 400 402 int rc; … … 600 602 601 603 } else { 602 // try allocate s ucceeding extent block604 // try allocate scceeding extent block 603 605 604 606 // TODO … … 609 611 610 612 finish: 613 614 *iblock = new_block_idx; 615 *fblock = phys_block; 616 611 617 // Put loaded blocks 612 618 // From 1 -> 0 is a block with inode data
Note:
See TracChangeset
for help on using the changeset viewer.