Changeset 6088193 in mainline for uspace/srv/fs/ext4fs/ext4fs_ops.c


Ignore:
Timestamp:
2011-11-10T19:59:51Z (14 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
27ca3a3
Parents:
b3d7277
Message:

bugfixes in indirect block writing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/ext4fs/ext4fs_ops.c

    rb3d7277 r6088193  
    935935        rc = ext4fs_node_get(&fn, service_id, index);
    936936        if (rc != EOK) {
     937                EXT4FS_DBG("node get error");
    937938                return rc;
    938939        }
     
    942943                ext4fs_node_put(fn);
    943944                async_answer_0(callid, rc);
     945                EXT4FS_DBG("data write recv");
    944946                return rc;
    945947        }
     
    962964
    963965        rc = ext4_filesystem_get_inode_data_block_index(fs, inode_ref->inode, iblock, &fblock);
     966        if (rc != EOK) {
     967                // TODO error
     968                ext4fs_node_put(fn);
     969                EXT4FS_DBG("error loading block addr");
     970                return rc;
     971        }
    964972
    965973        if (fblock == 0) {
     974
    966975                rc =  ext4_bitmap_alloc_block(fs, inode_ref, &fblock);
    967976                if (rc != EOK) {
     977                        EXT4FS_DBG("allocation failed");
    968978                        ext4fs_node_put(fn);
    969979                        async_answer_0(callid, rc);
     
    980990        rc = block_get(&write_block, service_id, fblock, flags);
    981991        if (rc != EOK) {
     992                EXT4FS_DBG("error in loading block \%d", rc);
    982993                ext4fs_node_put(fn);
    983994                async_answer_0(callid, rc);
     
    9991010        rc = block_put(write_block);
    10001011        if (rc != EOK) {
     1012                EXT4FS_DBG("error in writing block \%d", rc);
    10011013                ext4fs_node_put(fn);
    10021014                return rc;
     
    10191031ext4fs_truncate(service_id_t service_id, fs_index_t index, aoff64_t new_size)
    10201032{
    1021         EXT4FS_DBG("");
    10221033        fs_node_t *fn;
    10231034        ext4fs_node_t *enode;
     
    11121123static int ext4fs_sync(service_id_t service_id, fs_index_t index)
    11131124{
    1114         EXT4FS_DBG("");
    1115 
    11161125        int rc;
    11171126        fs_node_t *fn;
Note: See TracChangeset for help on using the changeset viewer.