Changeset 0b293a6 in mainline
- Timestamp:
- 2012-07-21T08:58:29Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7deca26
- Parents:
- fe61181
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_filesystem.c
rfe61181 r0b293a6 47 47 * @return error code 48 48 */ 49 int ext4_filesystem_init(ext4_filesystem_t *fs, service_id_t service_id) 49 int ext4_filesystem_init(ext4_filesystem_t *fs, service_id_t service_id, 50 enum cache_mode cmode) 50 51 { 51 52 int rc; … … 75 76 76 77 /* Initialize block caching by libblock */ 77 rc = block_cache_init(service_id, block_size, 0, CACHE_MODE_WB);78 rc = block_cache_init(service_id, block_size, 0, cmode); 78 79 if (rc != EOK) { 79 80 block_fini(fs->device); … … 136 137 137 138 /* Finish work with block library */ 139 block_cache_fini(fs->device); 138 140 block_fini(fs->device); 139 141 … … 878 880 inode_ref->dirty = true; 879 881 882 /* Free block with extended attributes if present */ 883 uint32_t xattr_block = ext4_inode_get_file_acl( 884 inode_ref->inode, fs->superblock); 885 if (xattr_block) { 886 rc = ext4_balloc_free_block(inode_ref, xattr_block); 887 if (rc != EOK) { 888 return rc; 889 } 890 891 ext4_inode_set_file_acl(inode_ref->inode, fs->superblock, 0); 892 } 893 880 894 /* Free inode by allocator */ 881 895 if (ext4_inode_is_type(fs->superblock, inode_ref->inode, -
uspace/lib/ext4/libext4_filesystem.h
rfe61181 r0b293a6 37 37 #include "libext4_types.h" 38 38 39 extern int ext4_filesystem_init(ext4_filesystem_t *, service_id_t); 39 extern int ext4_filesystem_init(ext4_filesystem_t *, 40 service_id_t, enum cache_mode); 40 41 extern int ext4_filesystem_fini(ext4_filesystem_t *fs); 41 42 extern int ext4_filesystem_check_sanity(ext4_filesystem_t *fs); -
uspace/srv/fs/ext4fs/ext4fs_ops.c
rfe61181 r0b293a6 910 910 } 911 911 912 enum cache_mode cmode; 913 if (str_cmp(opts, "wtcache") == 0) { 914 cmode = CACHE_MODE_WT; 915 } else { 916 cmode = CACHE_MODE_WB; 917 } 918 912 919 /* Initialize the filesystem */ 913 rc = ext4_filesystem_init(fs, service_id );920 rc = ext4_filesystem_init(fs, service_id, cmode); 914 921 if (rc != EOK) { 915 922 free(fs);
Note:
See TracChangeset
for help on using the changeset viewer.