Changes in uspace/lib/ext4/src/extent.c [38d150e:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/src/extent.c
r38d150e rb7fd2a0 372 372 * 373 373 */ 374 int ext4_extent_find_block(ext4_inode_ref_t *inode_ref, uint32_t iblock,374 errno_t ext4_extent_find_block(ext4_inode_ref_t *inode_ref, uint32_t iblock, 375 375 uint32_t *fblock) 376 376 { 377 int rc = EOK;377 errno_t rc = EOK; 378 378 /* Compute bound defined by i-node size */ 379 379 uint64_t inode_size = … … 454 454 * 455 455 */ 456 static int ext4_extent_find_extent(ext4_inode_ref_t *inode_ref, uint32_t iblock,456 static errno_t ext4_extent_find_extent(ext4_inode_ref_t *inode_ref, uint32_t iblock, 457 457 ext4_extent_path_t **ret_path) 458 458 { … … 475 475 /* Walk through the extent tree */ 476 476 uint16_t pos = 0; 477 int rc;477 errno_t rc; 478 478 while (ext4_extent_header_get_depth(eh) != 0) { 479 479 /* Search index in index node by iblock */ … … 515 515 ; 516 516 517 int rc2 = EOK;517 errno_t rc2 = EOK; 518 518 519 519 /* … … 543 543 * 544 544 */ 545 static int ext4_extent_release(ext4_inode_ref_t *inode_ref,545 static errno_t ext4_extent_release(ext4_inode_ref_t *inode_ref, 546 546 ext4_extent_t *extent) 547 547 { … … 565 565 * 566 566 */ 567 static int ext4_extent_release_branch(ext4_inode_ref_t *inode_ref,567 static errno_t ext4_extent_release_branch(ext4_inode_ref_t *inode_ref, 568 568 ext4_extent_index_t *index) 569 569 { … … 571 571 572 572 block_t* block; 573 int rc = block_get(&block, inode_ref->fs->device, fblock, BLOCK_FLAGS_NONE);573 errno_t rc = block_get(&block, inode_ref->fs->device, fblock, BLOCK_FLAGS_NONE); 574 574 if (rc != EOK) 575 575 return rc; … … 618 618 * 619 619 */ 620 int ext4_extent_release_blocks_from(ext4_inode_ref_t *inode_ref,620 errno_t ext4_extent_release_blocks_from(ext4_inode_ref_t *inode_ref, 621 621 uint32_t iblock_from) 622 622 { 623 623 /* Find the first extent to modify */ 624 624 ext4_extent_path_t *path; 625 int rc = ext4_extent_find_extent(inode_ref, iblock_from, &path);625 errno_t rc = ext4_extent_find_extent(inode_ref, iblock_from, &path); 626 626 if (rc != EOK) 627 627 return rc; … … 736 736 ; 737 737 738 int rc2 = EOK;738 errno_t rc2 = EOK; 739 739 740 740 /* … … 767 767 * 768 768 */ 769 static int ext4_extent_append_extent(ext4_inode_ref_t *inode_ref,769 static errno_t ext4_extent_append_extent(ext4_inode_ref_t *inode_ref, 770 770 ext4_extent_path_t *path, uint32_t iblock) 771 771 { … … 785 785 /* Full node - allocate block for new one */ 786 786 uint32_t fblock; 787 int rc = ext4_balloc_alloc_block(inode_ref, &fblock);787 errno_t rc = ext4_balloc_alloc_block(inode_ref, &fblock); 788 788 if (rc != EOK) 789 789 return rc; … … 863 863 if (entries == limit) { 864 864 uint32_t new_fblock; 865 int rc = ext4_balloc_alloc_block(inode_ref, &new_fblock);865 errno_t rc = ext4_balloc_alloc_block(inode_ref, &new_fblock); 866 866 if (rc != EOK) 867 867 return rc; … … 964 964 * 965 965 */ 966 int ext4_extent_append_block(ext4_inode_ref_t *inode_ref, uint32_t *iblock,966 errno_t ext4_extent_append_block(ext4_inode_ref_t *inode_ref, uint32_t *iblock, 967 967 uint32_t *fblock, bool update_size) 968 968 { … … 982 982 /* Load the nearest leaf (with extent) */ 983 983 ext4_extent_path_t *path; 984 int rc = ext4_extent_find_extent(inode_ref, new_block_idx, &path);984 errno_t rc = ext4_extent_find_extent(inode_ref, new_block_idx, &path); 985 985 if (rc != EOK) 986 986 return rc; … … 1088 1088 ; 1089 1089 1090 int rc2 = EOK;1090 errno_t rc2 = EOK; 1091 1091 1092 1092 /* Set return values */
Note:
See TracChangeset
for help on using the changeset viewer.