Changeset 95947d24 in mainline
- Timestamp:
- 2012-04-08T09:21:51Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 847f2cb
- Parents:
- 6f41312
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_balloc.c
r6f41312 r95947d24 143 143 if (rc != EOK) { 144 144 EXT4FS_DBG("error in saving bg_ref \%d", rc); 145 // TODO error146 145 return rc; 147 146 } … … 221 220 if (rc != EOK) { 222 221 EXT4FS_DBG("error in saving bg_ref \%d", rc); 223 // TODO error224 222 return rc; 225 223 } … … 275 273 276 274 if (inode_block_count > 0) { 277 // TODO check retval 278 ext4_filesystem_get_inode_data_block_index(inode_ref, inode_block_count - 1, &goal); 279 280 // TODO 281 // If goal == 0 -> SPARSE file !!! 282 283 goal++; 284 return goal; 275 276 rc = ext4_filesystem_get_inode_data_block_index(inode_ref, inode_block_count - 1, &goal); 277 if (rc != EOK) { 278 return 0; 279 } 280 281 if (goal != 0) { 282 goal++; 283 return goal; 284 } 285 286 // if goal == 0, sparse file -> continue 285 287 } 286 288 … … 338 340 uint32_t goal = ext4_balloc_find_goal(inode_ref); 339 341 if (goal == 0) { 340 // TODO342 // no goal found => partition is full 341 343 EXT4FS_DBG("ERRORR (goal == 0)"); 342 344 return ENOSPC; … … 385 387 rc = block_put(bitmap_block); 386 388 if (rc != EOK) { 387 // TODO error 388 EXT4FS_DBG("goal check: error in saving initial bitmap \%d", rc); 389 EXT4FS_DBG("goal check: error in saving bitmap \%d", rc); 389 390 ext4_filesystem_put_block_group_ref(bg_ref); 390 391 return rc; … … 411 412 rc = block_put(bitmap_block); 412 413 if (rc != EOK) { 413 // TODO error414 414 EXT4FS_DBG("near blocks: error in saving initial bitmap \%d", rc); 415 return rc; 415 416 } 416 417 … … 429 430 rc = block_put(bitmap_block); 430 431 if (rc != EOK) { 431 // TODO error432 432 EXT4FS_DBG("free byte: error in saving initial bitmap \%d", rc); 433 return rc; 433 434 } 434 435 … … 445 446 rc = block_put(bitmap_block); 446 447 if (rc != EOK) { 447 // TODO error448 448 EXT4FS_DBG("free bit: error in saving initial bitmap \%d", rc); 449 return rc; 449 450 } 450 451 … … 468 469 rc = ext4_filesystem_get_block_group_ref(inode_ref->fs, bgid, &bg_ref); 469 470 if (rc != EOK) { 470 EXT4FS_DBG(" errrrrrrrrrrr");471 EXT4FS_DBG("ERROR: unable to load block group \%u", bgid); 471 472 return rc; 472 473 } … … 479 480 if (rc != EOK) { 480 481 ext4_filesystem_put_block_group_ref(bg_ref); 481 EXT4FS_DBG(" errrrrrrrrrr");482 EXT4FS_DBG("ERROR: unable to load bitmap block"); 482 483 return rc; 483 484 } … … 502 503 rc = block_put(bitmap_block); 503 504 if (rc != EOK) { 504 // TODO error505 EXT4FS_DBG("error in saving bitmap \%d", rc);505 EXT4FS_DBG("ERROR: unable to save bitmap block"); 506 return rc; 506 507 } 507 508 … … 518 519 rc = block_put(bitmap_block); 519 520 if (rc != EOK) { 520 // TODO error521 EXT4FS_DBG("error in saving bitmap \%d", rc);521 EXT4FS_DBG("ERROR: unable to save bitmap block"); 522 return rc; 522 523 } 523 524
Note:
See TracChangeset
for help on using the changeset viewer.