Changeset ca47f656 in mainline


Ignore:
Timestamp:
2012-06-03T15:05:56Z (13 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
840e227
Parents:
4059a28
Message:

excluded functions working with orphans - not needed by driver actually

File:
1 edited

Legend:

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

    r4059a28 rca47f656  
    544544
    545545        ext4fs_node_t *enode = EXT4FS_NODE(fn);
    546         ext4_filesystem_t *fs = enode->instance->filesystem;
    547546        ext4_inode_ref_t *inode_ref = enode->inode_ref;
    548547
     
    555554
    556555        // Handle orphans
    557         uint32_t rev_level = ext4_superblock_get_rev_level(fs->superblock);
    558         if (rev_level > 0) {
    559                 ext4_filesystem_delete_orphan(inode_ref);
    560         }
     556//      ext4_filesystem_t *fs = enode->instance->filesystem;
     557//      uint32_t rev_level = ext4_superblock_get_rev_level(fs->superblock);
     558//      uint16_t lnk_count = ext4_inode_get_links_count(inode_ref->inode);
     559//      if ((rev_level > 0) && (lnk_count == 0)) {
     560//              rc = ext4_filesystem_delete_orphan(inode_ref);
     561//              if (rc != EOK) {
     562//                      EXT4FS_DBG("delete orphan error, rc = \%d", rc);
     563//              }
     564//      }
    561565
    562566        // TODO set real deletion time when it will be supported,
    563567        // temporary set fake time
    564568//      time_t now = time(NULL);
    565         ext4_inode_set_deletion_time(inode_ref->inode, 12345678);
     569        ext4_inode_set_deletion_time(inode_ref->inode, 0xdeadbeef);
    566570        inode_ref->dirty = true;
    567571
     
    573577        }
    574578
    575         ext4fs_node_put(fn);
    576         return EOK;
     579        return ext4fs_node_put(fn);
    577580}
    578581
     
    674677        // Remove entry from parent directory
    675678        ext4_inode_ref_t *parent = EXT4FS_NODE(pfn)->inode_ref;
    676         ext4_filesystem_t *fs = EXT4FS_NODE(pfn)->instance->filesystem;
    677679        rc = ext4_directory_remove_entry(parent, name);
    678680        if (rc != EOK) {
     
    703705        }
    704706
    705         uint32_t rev_level = ext4_superblock_get_rev_level(fs->superblock);
    706         if ((rev_level > 0) && (lnk_count == 0)) {
    707                 ext4_filesystem_add_orphan(child_inode_ref);
    708         }
     707//      ext4_filesystem_t *fs = EXT4FS_NODE(pfn)->instance->filesystem;
     708//      uint32_t rev_level = ext4_superblock_get_rev_level(fs->superblock);
     709//      if ((rev_level > 0) && (lnk_count == 0)) {
     710//              rc = ext4_filesystem_add_orphan(child_inode_ref);
     711//              if (rc != EOK) {
     712//                      EXT4FS_DBG("add orphan error, rc = \%d", rc);
     713//              }
     714//      }
    709715
    710716        // TODO set timestamps for parent (when we have wall-clock time)
Note: See TracChangeset for help on using the changeset viewer.