Changeset 9104bb5 in mainline for uspace/lib/ext4/libext4_directory_index.c
- Timestamp:
- 2012-03-20T20:22:19Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a4419e7
- Parents:
- cd581120
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_directory_index.c
rcd581120 r9104bb5 189 189 190 190 static int ext4_directory_dx_get_leaf(ext4_hash_info_t *hinfo, 191 ext4_filesystem_t *fs, ext4_inode_ t *inode, block_t *root_block,191 ext4_filesystem_t *fs, ext4_inode_ref_t *inode_ref, block_t *root_block, 192 192 ext4_directory_dx_block_t **dx_block, ext4_directory_dx_block_t *dx_blocks) 193 193 { … … 239 239 240 240 uint32_t fblock; 241 rc = ext4_filesystem_get_inode_data_block_index(fs, inode , next_block, &fblock);241 rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref, next_block, &fblock); 242 242 if (rc != EOK) { 243 243 return rc; … … 270 270 271 271 272 static int ext4_directory_dx_next_block(ext4_filesystem_t *fs, ext4_inode_t *inode, uint32_t hash, 272 static int ext4_directory_dx_next_block(ext4_filesystem_t *fs, 273 ext4_inode_ref_t *inode_ref, uint32_t hash, 273 274 ext4_directory_dx_block_t *handle, ext4_directory_dx_block_t *handles) 274 275 { … … 309 310 uint32_t block_idx = ext4_directory_dx_entry_get_block(p->position); 310 311 uint32_t block_addr; 311 rc = ext4_filesystem_get_inode_data_block_index(fs, inode , block_idx, &block_addr);312 rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref, block_idx, &block_addr); 312 313 if (rc != EOK) { 313 314 return rc; … … 339 340 // get direct block 0 (index root) 340 341 uint32_t root_block_addr; 341 rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref ->inode, 0, &root_block_addr);342 rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref, 0, &root_block_addr); 342 343 if (rc != EOK) { 343 344 return rc; … … 360 361 ext4_directory_dx_block_t dx_blocks[2]; 361 362 ext4_directory_dx_block_t *dx_block, *tmp; 362 rc = ext4_directory_dx_get_leaf(&hinfo, fs, inode_ref ->inode, root_block, &dx_block, dx_blocks);363 rc = ext4_directory_dx_get_leaf(&hinfo, fs, inode_ref, root_block, &dx_block, dx_blocks); 363 364 if (rc != EOK) { 364 365 block_put(root_block); … … 371 372 uint32_t leaf_block_idx = ext4_directory_dx_entry_get_block(dx_block->position); 372 373 uint32_t leaf_block_addr; 373 rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref ->inode, leaf_block_idx, &leaf_block_addr);374 rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref, leaf_block_idx, &leaf_block_addr); 374 375 if (rc != EOK) { 375 376 goto cleanup; … … 399 400 } 400 401 401 rc = ext4_directory_dx_next_block(fs, inode_ref ->inode, hinfo.hash, dx_block, &dx_blocks[0]);402 rc = ext4_directory_dx_next_block(fs, inode_ref, hinfo.hash, dx_block, &dx_blocks[0]); 402 403 if (rc < 0) { 403 404 goto cleanup; … … 747 748 // get direct block 0 (index root) 748 749 uint32_t root_block_addr; 749 rc = ext4_filesystem_get_inode_data_block_index(fs, parent ->inode, 0, &root_block_addr);750 rc = ext4_filesystem_get_inode_data_block_index(fs, parent, 0, &root_block_addr); 750 751 if (rc != EOK) { 751 752 return rc; … … 769 770 ext4_directory_dx_block_t dx_blocks[2]; 770 771 ext4_directory_dx_block_t *dx_block, *dx_it; 771 rc = ext4_directory_dx_get_leaf(&hinfo, fs, parent ->inode, root_block, &dx_block, dx_blocks);772 rc = ext4_directory_dx_get_leaf(&hinfo, fs, parent, root_block, &dx_block, dx_blocks); 772 773 if (rc != EOK) { 773 774 rc = EXT4_ERR_BAD_DX_DIR; … … 779 780 uint32_t leaf_block_idx = ext4_directory_dx_entry_get_block(dx_block->position); 780 781 uint32_t leaf_block_addr; 781 rc = ext4_filesystem_get_inode_data_block_index(fs, parent ->inode, leaf_block_idx, &leaf_block_addr);782 rc = ext4_filesystem_get_inode_data_block_index(fs, parent, leaf_block_idx, &leaf_block_addr); 782 783 if (rc != EOK) { 783 784 goto release_index;
Note:
See TracChangeset
for help on using the changeset viewer.