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


Ignore:
Timestamp:
2011-10-18T19:58:36Z (14 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7bd2c19
Parents:
12f55220
Message:

First part of reading htree directory index - the most important functionality (computing hashes) still missing

File:
1 edited

Legend:

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

    r12f55220 r7bc4508  
    7575static int ext4fs_read_directory(ipc_callid_t, aoff64_t, size_t,
    7676    ext4fs_instance_t *, ext4_inode_ref_t *, size_t *);
    77 static int ext4fs_read_dx_directory(ipc_callid_t, aoff64_t, size_t,
    78     ext4fs_instance_t *, ext4_inode_ref_t *, size_t *);
    7977static int ext4fs_read_file(ipc_callid_t, aoff64_t, size_t, ext4fs_instance_t *,
    8078    ext4_inode_ref_t *, size_t *);
     
    216214            EXT4_INODE_MODE_DIRECTORY)) {
    217215                return ENOTDIR;
     216        }
     217
     218        // TODO check super block COMPAT FEATURES
     219        if (ext4_inode_has_flag(eparent->inode_ref->inode, EXT4_INODE_FLAG_INDEX)) {
     220
     221                rc = ext4_directory_dx_find_entry(&it, fs, eparent->inode_ref, component);
     222
     223                // Index isn't corrupted
     224                if (rc != EXT4_ERR_BAD_DX_DIR) {
     225
     226                        // TODO check return value
     227                        if (rc != EOK) {
     228                                return rc;
     229                        }
     230
     231                        inode = ext4_directory_entry_ll_get_inode(it.current);
     232                        return ext4fs_node_get_core(rfn, eparent->instance, inode);
     233                }
     234
    218235        }
    219236
     
    748765        bool found = false;
    749766
    750         // TODO check super block COMPAT FEATURES
    751         if (ext4_inode_has_flag(inode_ref->inode, EXT4_INODE_FLAG_INDEX)) {
    752                 rc = ext4fs_read_dx_directory(callid, pos, size, inst, inode_ref, rbytes);
    753                 // TODO return...
    754                 // return rc;
    755         }
    756 
    757767        rc = ext4_directory_iterator_init(&it, inst->filesystem, inode_ref, pos);
    758768        if (rc != EOK) {
     
    825835                return ENOENT;
    826836        }
    827 }
    828 
    829 int ext4fs_read_dx_directory(ipc_callid_t callid, aoff64_t pos, size_t size,
    830     ext4fs_instance_t *inst, ext4_inode_ref_t *inode_ref, size_t *rbytes)
    831 {
    832         EXT4FS_DBG("Directory using HTree index");
    833         return ENOTSUP;
    834837}
    835838
Note: See TracChangeset for help on using the changeset viewer.