Changeset 1e65444 in mainline for uspace/srv/fs/ext4fs/ext4fs_ops.c
- Timestamp:
- 2011-11-09T17:52:33Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2b9e142
- Parents:
- 35f48f2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/ext4fs/ext4fs_ops.c
r35f48f2 r1e65444 926 926 size_t *wbytes, aoff64_t *nsize) 927 927 { 928 EXT4FS_DBG("");929 930 928 int rc; 931 929 int flags = BLOCK_FLAGS_NONE; … … 966 964 } 967 965 968 EXT4FS_DBG("bytes == \%u", bytes);966 // EXT4FS_DBG("bytes == \%u", bytes); 969 967 970 968 iblock = pos / block_size; … … 973 971 974 972 if (fblock == 0) { 975 EXT4FS_DBG("Allocate block !!!");973 // EXT4FS_DBG("Allocate block !!!"); 976 974 rc = ext4_bitmap_alloc_block(fs, inode_ref, &fblock); 977 975 if (rc != EOK) { … … 981 979 } 982 980 983 ext4_filesystem_set_inode_data_block_index(fs, inode_ref ->inode, iblock, fblock);981 ext4_filesystem_set_inode_data_block_index(fs, inode_ref, iblock, fblock); 984 982 inode_ref->dirty = true; 985 983 986 984 flags = BLOCK_FLAGS_NOREAD; 987 985 988 EXT4FS_DBG("block \%u allocated", fblock);986 // EXT4FS_DBG("block \%u allocated", fblock); 989 987 } 990 988 … … 996 994 } 997 995 998 EXT4FS_DBG("block loaded");999 1000 996 if (flags == BLOCK_FLAGS_NOREAD) { 1001 EXT4FS_DBG("fill block with zeros");997 // EXT4FS_DBG("fill block with zeros"); 1002 998 memset(write_block->data, 0, block_size); 1003 999 } … … 1005 1001 rc = async_data_write_finalize(callid, write_block->data + (pos % block_size), bytes); 1006 1002 if (rc != EOK) { 1003 // TODO error 1007 1004 EXT4FS_DBG("error in write finalize \%d", rc); 1008 1005 } 1009 1006 1010 char *data = write_block->data + (pos % block_size);1011 for (uint32_t x = 0; x < bytes; ++x) {1012 printf("%c", data[x]);1013 }1014 printf("\n");1015 1016 1007 write_block->dirty = true; 1017 1008 … … 1022 1013 } 1023 1014 1024 EXT4FS_DBG("writing finished");1015 // EXT4FS_DBG("writing finished"); 1025 1016 1026 1017 old_inode_size = ext4_inode_get_size(fs->superblock, inode_ref->inode);
Note:
See TracChangeset
for help on using the changeset viewer.