Changeset 829d238 in mainline


Ignore:
Timestamp:
2011-10-10T18:55:04Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6d52126b
Parents:
7b9381b
Message:

Basic extent structures + applied bugfix from M. Lombardi

Location:
uspace
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/Makefile

    r7b9381b r829d238  
    3535        libext4_block_group.c \
    3636        libext4_directory.c \
     37        libext4_extent.c \
    3738        libext4_filesystem.c \
    3839        libext4_inode.c \
  • uspace/lib/ext4/libext4.h

    r7b9381b r829d238  
    3636#include "libext4_block_group.h"
    3737#include "libext4_directory.h"
     38#include "libext4_extent.h"
    3839#include "libext4_filesystem.h"
    3940#include "libext4_inode.h"
  • uspace/lib/ext4/libext4_filesystem.c

    r7b9381b r829d238  
    196196}
    197197
     198int ext4_filesystem_put_block_group_ref(ext4_block_group_ref_t *ref)
     199{
     200        int rc;
     201
     202        rc = block_put(ref->block);
     203        free(ref);
     204
     205        return rc;
     206}
     207
    198208int ext4_filesystem_get_inode_ref(ext4_filesystem_t *fs, uint32_t index,
    199209    ext4_inode_ref_t **ref)
     
    235245            bg_ref->block_group);
    236246
     247        rc = ext4_filesystem_put_block_group_ref(bg_ref);
     248        if (rc != EOK) {
     249                free(newref);
     250                return rc;
     251        }
     252
    237253        inode_size = ext4_superblock_get_inode_size(fs->superblock);
    238254        block_size = ext4_superblock_get_block_size(fs->superblock);
  • uspace/lib/ext4/libext4_filesystem.h

    r7b9381b r829d238  
    109109extern int ext4_filesystem_get_block_group_ref(ext4_filesystem_t *, uint32_t,
    110110    ext4_block_group_ref_t **);
     111extern int ext4_filesystem_put_block_group_ref(ext4_block_group_ref_t *);
    111112extern int ext4_filesystem_get_inode_ref(ext4_filesystem_t *, uint32_t,
    112113                ext4_inode_ref_t **);
  • uspace/srv/fs/ext4fs/ext4fs_ops.c

    r7b9381b r829d238  
    833833        uint8_t *buffer;
    834834
     835        // TODO Check extent
     836        if (ext4_filesystem_has_feature_incompatible(inst->filesystem, EXT4_FEATURE_INCOMPAT_EXTENTS)
     837                        && ext4_inode_has_flag(inode_ref->inode, EXT4_INODE_FLAG_EXTENTS)) {
     838                EXT4FS_DBG("Extent found");
     839        }
     840
    835841        file_size = ext4_inode_get_size(inst->filesystem->superblock,
    836842                inode_ref->inode);
Note: See TracChangeset for help on using the changeset viewer.