Index: uspace/lib/ext4/libext4_extent.c
===================================================================
--- uspace/lib/ext4/libext4_extent.c	(revision 3b5c1199dcda2808ee3cc3190e1cc86bf67f5b35)
+++ uspace/lib/ext4/libext4_extent.c	(revision 1196df68031af4bfbb2484851bef728c95910e57)
@@ -249,16 +249,17 @@
 	ext4_extent_binsearch(header, &extent, iblock);
 
-	assert(extent != NULL);
-
-	uint32_t phys_block;
-	phys_block = ext4_extent_get_start(extent) + iblock;
-	phys_block -= ext4_extent_get_first_block(extent);
-
-	*fblock = phys_block;
+	if (extent == NULL) {
+		*fblock = 0;
+	} else {
+		uint32_t phys_block;
+		phys_block = ext4_extent_get_start(extent) + iblock;
+		phys_block -= ext4_extent_get_first_block(extent);
+
+		*fblock = phys_block;
+	}
 
 	if (block != NULL) {
 		block_put(block);
 	}
-
 
 	return EOK;
@@ -396,5 +397,6 @@
 }
 
-int ext4_extent_release_blocks_from(ext4_inode_ref_t *inode_ref, uint32_t iblock_from)
+int ext4_extent_release_blocks_from(ext4_inode_ref_t *inode_ref,
+		uint32_t iblock_from)
 {
 	int rc;
@@ -600,5 +602,5 @@
 
 	} else {
-		// try allocate succeeding extent block
+		// try allocate scceeding extent block
 
 		// TODO
@@ -609,4 +611,8 @@
 
 finish:
+
+	*iblock = new_block_idx;
+	*fblock = phys_block;
+
 	// Put loaded blocks
 	// From 1 -> 0 is a block with inode data
Index: uspace/lib/ext4/libext4_filesystem.c
===================================================================
--- uspace/lib/ext4/libext4_filesystem.c	(revision 3b5c1199dcda2808ee3cc3190e1cc86bf67f5b35)
+++ uspace/lib/ext4/libext4_filesystem.c	(revision 1196df68031af4bfbb2484851bef728c95910e57)
@@ -541,5 +541,6 @@
 				ext4_inode_has_flag(inode_ref->inode, EXT4_INODE_FLAG_EXTENTS)) {
 
-		rc = ext4_extent_release_blocks_from(inode_ref, old_blocks_count - diff_blocks_count);
+		rc = ext4_extent_release_blocks_from(inode_ref,
+				old_blocks_count - diff_blocks_count);
 		if (rc != EOK) {
 			return rc;
Index: uspace/srv/fs/ext4fs/ext4fs_ops.c
===================================================================
--- uspace/srv/fs/ext4fs/ext4fs_ops.c	(revision 3b5c1199dcda2808ee3cc3190e1cc86bf67f5b35)
+++ uspace/srv/fs/ext4fs/ext4fs_ops.c	(revision 1196df68031af4bfbb2484851bef728c95910e57)
@@ -1097,21 +1097,38 @@
 
 	if (fblock == 0) {
-		rc =  ext4_balloc_alloc_block(inode_ref, &fblock);
-		if (rc != EOK) {
-			ext4fs_node_put(fn);
-			async_answer_0(callid, rc);
-			return rc;
-		}
-
-		rc = ext4_filesystem_set_inode_data_block_index(inode_ref, iblock, fblock);
-		if (rc != EOK) {
-			ext4_balloc_free_block(inode_ref, fblock);
-			ext4fs_node_put(fn);
-			async_answer_0(callid, rc);
-			return rc;
-		}
+
+		if (ext4_superblock_has_feature_incompatible(
+				fs->superblock, EXT4_FEATURE_INCOMPAT_EXTENTS) &&
+				(ext4_inode_has_flag(inode_ref->inode, EXT4_INODE_FLAG_EXTENTS))) {
+
+			uint32_t tmp_iblock = 0;
+			do {
+				rc = ext4_filesystem_append_inode_block(inode_ref, &fblock, &tmp_iblock);
+				if (rc != EOK) {
+					ext4fs_node_put(fn);
+					async_answer_0(callid, rc);
+					return rc;
+				}
+			} while (tmp_iblock < iblock);
+
+		} else {
+			rc =  ext4_balloc_alloc_block(inode_ref, &fblock);
+			if (rc != EOK) {
+				ext4fs_node_put(fn);
+				async_answer_0(callid, rc);
+				return rc;
+			}
+
+			rc = ext4_filesystem_set_inode_data_block_index(inode_ref, iblock, fblock);
+			if (rc != EOK) {
+				ext4_balloc_free_block(inode_ref, fblock);
+				ext4fs_node_put(fn);
+				async_answer_0(callid, rc);
+				return rc;
+			}
+		}
+
+		flags = BLOCK_FLAGS_NOREAD;
 		inode_ref->dirty = true;
-
-		flags = BLOCK_FLAGS_NOREAD;
 	}
 
