Index: uspace/lib/ext4/libext4_extent.c
===================================================================
--- uspace/lib/ext4/libext4_extent.c	(revision 5b16912d1ef099ba464cf42444dec618e36ad4d3)
+++ uspace/lib/ext4/libext4_extent.c	(revision ce6de5935c56af6571cd082318a04172146fff04)
@@ -539,4 +539,88 @@
 }
 
+int ext4_extent_append_block(ext4_inode_ref_t *inode_ref,
+		uint32_t *iblock, uint32_t *fblock)
+{
+	int rc;
+
+	ext4_superblock_t *sb = inode_ref->fs->superblock;
+	uint64_t inode_size = ext4_inode_get_size(sb, inode_ref->inode);
+
+	ext4_extent_header_t *header =
+			ext4_inode_get_extent_header(inode_ref->inode);
+
+	// Initialize if empty inode
+	if (inode_size == 0) {
+		ext4_extent_t *first = EXT4_EXTENT_FIRST(header);
+		ext4_extent_set_block_count(first, 0);
+		ext4_extent_set_first_block(first, 0);
+		ext4_extent_set_start(first, 0);
+
+		ext4_extent_header_set_depth(header, 0);
+		ext4_extent_header_set_entries_count(header, 1);
+	}
+
+	uint32_t block_size = ext4_superblock_get_block_size(sb);
+	uint32_t new_block_idx = inode_size / block_size;
+
+	ext4_extent_path_t *path;
+	rc = ext4_extent_find_extent(inode_ref, new_block_idx, &path);
+	if (rc != EOK) {
+		EXT4FS_DBG("find extent ERROR");
+		return rc;
+	}
+
+	// Jump to last item of the path (extent)
+	ext4_extent_path_t *path_ptr = path;
+	while (path_ptr->depth != 0) {
+		path_ptr++;
+	}
+
+	// Check if extent exists
+	assert(path_ptr->extent != NULL);
+
+	uint32_t phys_block;
+
+	if (ext4_extent_get_block_count(path_ptr->extent) == 0) {
+
+		// Add first block to the extent
+
+		rc = ext4_balloc_alloc_block(inode_ref, &phys_block);
+		if (rc != EOK) {
+			EXT4FS_DBG("ERRO in balloc");
+			return rc;
+		}
+
+		ext4_extent_set_block_count(path_ptr->extent, 1);
+		ext4_extent_set_start(path_ptr->extent, phys_block);
+
+		path_ptr->block->dirty = true;
+
+		goto finish;
+
+	} else {
+		// try allocate succeeding extent block
+
+		// TODO
+		assert(false);
+
+	}
+
+
+finish:
+	// Put loaded blocks
+	// From 1 -> 0 is a block with inode data
+	for (uint16_t i = 1; i < path->depth; ++i) {
+		if (path[i].block) {
+			block_put(path[i].block);
+		}
+	}
+
+	// Destroy temporary data structure
+	free(path);
+
+	return EOK;
+}
+
 /**
  * @}
Index: uspace/lib/ext4/libext4_extent.h
===================================================================
--- uspace/lib/ext4/libext4_extent.h	(revision 5b16912d1ef099ba464cf42444dec618e36ad4d3)
+++ uspace/lib/ext4/libext4_extent.h	(revision ce6de5935c56af6571cd082318a04172146fff04)
@@ -64,4 +64,6 @@
 extern int ext4_extent_release_blocks_from(ext4_inode_ref_t *, uint32_t);
 
+extern int ext4_extent_append_block(ext4_inode_ref_t *, uint32_t *, uint32_t *);
+
 #endif
 
Index: uspace/lib/ext4/libext4_filesystem.c
===================================================================
--- uspace/lib/ext4/libext4_filesystem.c	(revision 5b16912d1ef099ba464cf42444dec618e36ad4d3)
+++ uspace/lib/ext4/libext4_filesystem.c	(revision ce6de5935c56af6571cd082318a04172146fff04)
@@ -323,5 +323,5 @@
 	}
 
-	// TODO extents, dir_index etc...
+	// TODO dir_index initialization
 
 	rc = ext4_filesystem_get_inode_ref(fs, index, inode_ref);
@@ -340,4 +340,9 @@
 		ext4_inode_set_mode(fs->superblock, inode, EXT4_INODE_MODE_FILE);
 		ext4_inode_set_links_count(inode, 0);
+	}
+
+	if (ext4_superblock_has_feature_incompatible(
+			fs->superblock, EXT4_FEATURE_INCOMPAT_EXTENTS)) {
+		ext4_inode_set_flag(inode, EXT4_INODE_FLAG_EXTENTS);
 	}
 
@@ -666,5 +671,5 @@
 	if (ext4_superblock_has_feature_compatible(fs->superblock, EXT4_FEATURE_INCOMPAT_EXTENTS) &&
 			ext4_inode_has_flag(inode_ref->inode, EXT4_INODE_FLAG_EXTENTS)) {
-		// TODO
+		// not reachable !!!
 		return ENOTSUP;
 	}
@@ -802,5 +807,5 @@
 	ext4_filesystem_t *fs = inode_ref->fs;
 
-	// EXTENTS are handled
+	// EXTENTS are handled otherwise
 	assert(! (ext4_superblock_has_feature_incompatible(fs->superblock,
 			EXT4_FEATURE_INCOMPAT_EXTENTS) &&
@@ -890,8 +895,14 @@
 		uint32_t *fblock, uint32_t *iblock)
 {
-
-	// TODO append to extent
-
-	int rc;
+	int rc;
+
+	// Handle extents separately
+	if (ext4_superblock_has_feature_incompatible(
+			inode_ref->fs->superblock, EXT4_FEATURE_INCOMPAT_EXTENTS) &&
+			ext4_inode_has_flag(inode_ref->inode, EXT4_INODE_FLAG_EXTENTS)) {
+
+		return ext4_extent_append_block(inode_ref, iblock, fblock);
+
+	}
 
 	ext4_superblock_t *sb = inode_ref->fs->superblock;
