Changeset b6d7b7c in mainline for uspace/lib/ext4/libext4_extent.c


Ignore:
Timestamp:
2012-04-14T16:29:09Z (12 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.