Changeset b6d7b7c in mainline for uspace/lib


Ignore:
Timestamp:
2012-04-14T16:29:09Z (13 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1df3f57a
Parents:
831507b
Message:

debugged block appending to extent + directory index initialization

Location:
uspace/lib/ext4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_directory.c

    r831507b rb6d7b7c  
    372372        }
    373373
    374         EXT4FS_DBG("loaded");
    375 
    376374        // Fill block with zeroes
    377375        memset(new_block->data, 0, block_size);
    378376        ext4_directory_entry_ll_t *block_entry = new_block->data;
    379377        ext4_directory_write_entry(fs->superblock, block_entry, block_size, child, name, name_len);
    380 
    381         EXT4FS_DBG("written");
    382378
    383379        // Save new block
     
    387383                return rc;
    388384        }
    389 
    390         EXT4FS_DBG("returning");
    391385
    392386        return EOK;
  • uspace/lib/ext4/libext4_extent.c

    r831507b rb6d7b7c  
    769769        }
    770770
    771         uint32_t phys_block = 0;
    772 
    773771        // Add new extent to the node
    774772        if (path_ptr->extent == NULL) {
     
    779777        uint16_t block_limit = (1 << 15);
    780778
     779        uint32_t phys_block = 0;
    781780        if (block_count < block_limit) {
    782781
     
    791790                        ext4_extent_set_start(path_ptr->extent, phys_block);
    792791                        ext4_extent_set_block_count(path_ptr->extent, 1);
     792
     793                        ext4_inode_set_size(inode_ref->inode, inode_size + block_size);
     794                        inode_ref->dirty = true;
    793795
    794796                        path_ptr->block->dirty = true;
     
    813815
    814816                        ext4_extent_set_block_count(path_ptr->extent, block_count + 1);
     817
     818                        ext4_inode_set_size(inode_ref->inode, inode_size + block_size);
     819                        inode_ref->dirty = true;
    815820
    816821                        path_ptr->block->dirty = true;
     
    840845        ext4_extent_set_start(path_ptr->extent, phys_block);
    841846
     847        ext4_inode_set_size(inode_ref->inode, inode_size + block_size);
     848        inode_ref->dirty = true;
     849
    842850        path_ptr->block->dirty = true;
    843851
  • uspace/lib/ext4/libext4_filesystem.c

    r831507b rb6d7b7c  
    594594                rc = ext4_extent_find_block(inode_ref, iblock, &current_block);
    595595
    596                 EXT4FS_DBG("ext: loading iblock \%u, address \%u", (uint32_t)iblock, current_block);
    597 
    598596                if (rc != EOK) {
    599597                        return rc;
Note: See TracChangeset for help on using the changeset viewer.