ref: c5f8d135cf3555404f1c4df5617f94f4fc2bac87
parent: 1aa974054274a4f59dfa59c88bb9a85461eca113
author: Grzegorz Kostka <kostka.grzegorz@gmail.com>
date: Wed Sep 26 18:35:36 EDT 2018
ext4: fix ext4_fsymlink creation Solve the problem with long symbolic links creation. Thanks to: @cobenhan
--- a/src/ext4.c
+++ b/src/ext4.c
@@ -2474,15 +2474,16 @@
memcpy(ref.inode->blocks, buf, size);
ext4_inode_clear_flag(ref.inode, EXT4_INODE_FLAG_EXTENTS);
} else {
+ uint64_t off;
ext4_fs_inode_blocks_init(&f->mp->fs, &ref);
r = ext4_fs_append_inode_dblk(&ref, &fblock, &sblock);
if (r != EOK)
goto Finish;
- r = ext4_block_writebytes(f->mp->fs.bdev, 0, buf, size);
+ off = fblock * block_size;
+ r = ext4_block_writebytes(f->mp->fs.bdev, off, buf, size);
if (r != EOK)
goto Finish;
-
}
/*Stop write back cache mode*/