Changeset b6d7b7c in mainline


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
Files:
4 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;
  • uspace/srv/fs/ext4fs/ext4fs_ops.c

    r831507b rb6d7b7c  
    616616
    617617                // Initialize directory index if necessary
    618 //              if (ext4_superblock_has_feature_compatible(
    619 //                              fs->superblock, EXT4_FEATURE_COMPAT_DIR_INDEX)) {
    620 //
    621 //                      rc = ext4_directory_dx_init(child->inode_ref);
    622 //                      if (rc != EOK) {
    623 //                              return rc;
    624 //                      }
    625 //
    626 //                      ext4_inode_set_flag(child->inode_ref->inode, EXT4_INODE_FLAG_INDEX);
    627 //                      child->inode_ref->dirty = true;
    628 //              }
     618                if (ext4_superblock_has_feature_compatible(
     619                                fs->superblock, EXT4_FEATURE_COMPAT_DIR_INDEX)) {
     620
     621                        rc = ext4_directory_dx_init(child->inode_ref);
     622                        if (rc != EOK) {
     623                                return rc;
     624                        }
     625
     626                        ext4_inode_set_flag(child->inode_ref->inode, EXT4_INODE_FLAG_INDEX);
     627                        child->inode_ref->dirty = true;
     628                }
    629629
    630630                uint16_t parent_links = ext4_inode_get_links_count(parent->inode_ref->inode);
Note: See TracChangeset for help on using the changeset viewer.