Index: uspace/lib/ext4/libext4_filesystem.c
===================================================================
--- uspace/lib/ext4/libext4_filesystem.c	(revision f2eece1cca18bf0f3e1a61a3df9f63e5bac84254)
+++ uspace/lib/ext4/libext4_filesystem.c	(revision 8060341ace4f86c7f6f3864c067d69bba801bdff)
@@ -821,6 +821,10 @@
 }
 
-/** TODO comment
- *
+/** Set physical block address for the block logical address into the i-node.
+ *
+ * @param inode_ref		i-node to set block address to
+ * @param iblock		logical index of block
+ * @param fblock		physical block address
+ * @return				error code
  */
 int ext4_filesystem_set_inode_data_block_index(ext4_inode_ref_t *inode_ref,
@@ -831,5 +835,5 @@
 	ext4_filesystem_t *fs = inode_ref->fs;
 
-	/* Handle inode using extents */
+	// Handle inode using extents
 	if (ext4_superblock_has_feature_compatible(fs->superblock, EXT4_FEATURE_INCOMPAT_EXTENTS) &&
 			ext4_inode_has_flag(inode_ref->inode, EXT4_INODE_FLAG_EXTENTS)) {
@@ -838,5 +842,5 @@
 	}
 
-	/* Handle simple case when we are dealing with direct reference */
+	// Handle simple case when we are dealing with direct reference
 	if (iblock < EXT4_INODE_DIRECT_BLOCK_COUNT) {
 		ext4_inode_set_direct_block(inode_ref->inode, (uint32_t)iblock, fblock);
@@ -845,5 +849,5 @@
 	}
 
-	/* Determine the indirection level needed to get the desired block */
+	// Determine the indirection level needed to get the desired block
 	int level = -1;
 	for (int i = 1; i < 4; i++) {
@@ -860,5 +864,5 @@
 	uint32_t block_size = ext4_superblock_get_block_size(fs->superblock);
 
-	/* Compute offsets for the topmost level */
+	// Compute offsets for the topmost level
 	aoff64_t block_offset_in_level = iblock - fs->inode_block_limits[level-1];
 	uint32_t current_block = ext4_inode_get_indirect_block(inode_ref->inode, level-1);
@@ -868,5 +872,8 @@
 	block_t *block, *new_block;
 
+	// Is needed to allocate indirect block on the i-node level
 	if (current_block == 0) {
+
+		// Allocate new indirect block
 		rc = ext4_balloc_alloc_block(inode_ref, &new_block_addr);
 		if (rc != EOK) {
@@ -874,8 +881,9 @@
 		}
 
+		// Update i-node
 		ext4_inode_set_indirect_block(inode_ref->inode, level - 1, new_block_addr);
-
 		inode_ref->dirty = true;
 
+		// Load newly allocated block
 		rc = block_get(&new_block, fs->device, new_block_addr, BLOCK_FLAGS_NOREAD);
 		if (rc != EOK) {
@@ -884,7 +892,9 @@
 		}
 
+		// Initialize new block
 		memset(new_block->data, 0, block_size);
 		new_block->dirty = true;
 
+		// Put back the allocated block
 		rc = block_put(new_block);
 		if (rc != EOK) {
@@ -908,4 +918,6 @@
 
 		if ((level > 1) && (current_block == 0)) {
+
+			// Allocate new block
 			rc = ext4_balloc_alloc_block(inode_ref, &new_block_addr);
 			if (rc != EOK) {
@@ -914,4 +926,5 @@
 			}
 
+			// Load newly allocated block
 			rc = block_get(&new_block, fs->device, new_block_addr, BLOCK_FLAGS_NOREAD);
 			if (rc != EOK) {
@@ -920,4 +933,5 @@
 			}
 
+			// Initialize allocated block
 			memset(new_block->data, 0, block_size);
 			new_block->dirty = true;
@@ -929,4 +943,5 @@
 			}
 
+			// Write block address to the parent
 			((uint32_t*)block->data)[offset_in_block] = host2uint32_t_le(new_block_addr);
 			block->dirty = true;
@@ -934,4 +949,5 @@
 		}
 
+		// Will be finished, write the fblock address
 		if (level == 1) {
 			((uint32_t*)block->data)[offset_in_block] = host2uint32_t_le(fblock);
@@ -961,6 +977,9 @@
 }
 
-/** TODO comment
- *
+/** Release data block from i-node
+ *
+ * @param inode_ref 	i-node to release block from
+ * @param iblock		logical block to be released
+ * @return				error code
  */
 int ext4_filesystem_release_inode_block(
@@ -973,5 +992,5 @@
 	ext4_filesystem_t *fs = inode_ref->fs;
 
-	// EXTENTS are handled otherwise
+	// EXTENTS are handled otherwise = there is not support in this function
 	assert(! (ext4_superblock_has_feature_incompatible(fs->superblock,
 			EXT4_FEATURE_INCOMPAT_EXTENTS) &&
@@ -980,5 +999,5 @@
 	ext4_inode_t *inode = inode_ref->inode;
 
-	/* Handle simple case when we are dealing with direct reference */
+	// Handle simple case when we are dealing with direct reference
 	if (iblock < EXT4_INODE_DIRECT_BLOCK_COUNT) {
 		fblock = ext4_inode_get_direct_block(inode, iblock);
@@ -993,5 +1012,5 @@
 
 
-	/* Determine the indirection level needed to get the desired block */
+	// Determine the indirection level needed to get the desired block
 	int level = -1;
 	for (int i = 1; i < 4; i++) {
@@ -1006,5 +1025,5 @@
 	}
 
-	/* Compute offsets for the topmost level */
+	// Compute offsets for the topmost level
 	aoff64_t block_offset_in_level = iblock - fs->inode_block_limits[level-1];
 	uint32_t current_block = ext4_inode_get_indirect_block(inode, level-1);
@@ -1023,5 +1042,5 @@
 		current_block = uint32_t_le2host(((uint32_t*)block->data)[offset_in_block]);
 
-		// Set zero
+		// Set zero if physical data block address found
 		if (level == 1) {
 			((uint32_t*)block->data)[offset_in_block] = host2uint32_t_le(0);
@@ -1053,4 +1072,6 @@
 		return EOK;
 	}
+
+	// Physical block is not referenced, it can be released
 
 	return ext4_balloc_free_block(inode_ref, fblock);
