Index: uspace/lib/ext4/libext4_inode.c
===================================================================
--- uspace/lib/ext4/libext4_inode.c	(revision f22d5ef0d580ce8083ee98c5938da438d37a3bdd)
+++ uspace/lib/ext4/libext4_inode.c	(revision 296ef5d6c8734ef74a4d6df24a957f5cd4333397)
@@ -41,4 +41,9 @@
 #include "libext4.h"
 
+/** Compute number of bits for block count.
+ *
+ *  @param block_size	filesystem block_size
+ *  @return		number of bits
+ */
 static uint32_t ext4_inode_block_bits_count(uint32_t block_size)
 {
@@ -54,4 +59,10 @@
 }
 
+/** Get mode of the i-node.
+ *
+ * @param sb		superblock
+ * @param inode		i-node to load mode from
+ * @return 		mode of the i-node
+ */
 uint32_t ext4_inode_get_mode(ext4_superblock_t *sb, ext4_inode_t *inode)
 {
@@ -63,4 +74,10 @@
 }
 
+/** Set mode of the i-node.
+ *
+ * @param sb		superblock
+ * @param inode		i-node to set mode to
+ * @param mode		mode to set to i-node
+ */
 void ext4_inode_set_mode(ext4_superblock_t *sb, ext4_inode_t *inode, uint32_t mode)
 {
@@ -72,4 +89,9 @@
 }
 
+/** Get ID of the i-node owner (user id).
+ *
+ * @param inode		i-node to load uid from
+ * @return		user ID of the i-node owner
+ */
 uint32_t ext4_inode_get_uid(ext4_inode_t *inode)
 {
@@ -77,4 +99,9 @@
 }
 
+/** Set ID of the i-node owner.
+ *
+ * @param inode		i-node to set uid to
+ * @param uid		ID of the i-node owner
+ */
 void ext4_inode_set_uid(ext4_inode_t *inode, uint32_t uid)
 {
@@ -82,4 +109,10 @@
 }
 
+/** Get real i-node size.
+ *
+ * @param sb		superblock
+ * @param inode		i-node to load size from
+ * @return		real size of i-node
+ */
 uint64_t ext4_inode_get_size(ext4_superblock_t *sb, ext4_inode_t *inode)
 {
@@ -93,7 +126,12 @@
 }
 
-void ext4_inode_set_size(ext4_inode_t *inode, uint64_t value) {
-	inode->size_lo = host2uint32_t_le((value << 32) >> 32);
-	inode->size_hi = host2uint32_t_le(value >> 32);
+/** Set real i-node size.
+ *
+ *  @param inode	inode to set size to
+ *  @param size		size of the i-node
+ */
+void ext4_inode_set_size(ext4_inode_t *inode, uint64_t size) {
+	inode->size_lo = host2uint32_t_le((size << 32) >> 32);
+	inode->size_hi = host2uint32_t_le(size >> 32);
 }
 
@@ -103,4 +141,7 @@
 }
 
+/** TODO comment
+ *
+ */
 void ext4_inode_set_access_time(ext4_inode_t *inode, uint32_t time)
 {
@@ -108,4 +149,7 @@
 }
 
+/** TODO comment
+ *
+ */
 uint32_t ext4_inode_get_change_inode_time(ext4_inode_t *inode)
 {
@@ -113,4 +157,7 @@
 }
 
+/** TODO comment
+ *
+ */
 void ext4_inode_set_change_inode_time(ext4_inode_t *inode, uint32_t time)
 {
@@ -118,4 +165,7 @@
 }
 
+/** TODO comment
+ *
+ */
 uint32_t ext4_inode_get_modification_time(ext4_inode_t *inode)
 {
@@ -123,4 +173,7 @@
 }
 
+/** TODO comment
+ *
+ */
 void ext4_inode_set_modification_time(ext4_inode_t *inode, uint32_t time)
 {
@@ -128,4 +181,7 @@
 }
 
+/** TODO comment
+ *
+ */
 uint32_t ext4_inode_get_deletion_time(ext4_inode_t *inode)
 {
@@ -133,4 +189,7 @@
 }
 
+/** TODO comment
+ *
+ */
 void ext4_inode_set_deletion_time(ext4_inode_t *inode, uint32_t time)
 {
@@ -138,4 +197,9 @@
 }
 
+/** Get ID of the i-node owner's group.
+ *
+ * @param inode         i-node to load gid from
+ * @return              group ID of the i-node owner
+ */
 uint32_t ext4_inode_get_gid(ext4_inode_t *inode)
 {
@@ -143,4 +207,9 @@
 }
 
+/** Set ID ot the i-node owner's group.
+ *
+ * @param inode		i-node to set gid to
+ * @param gid		group ID of the i-node owner
+ */
 void ext4_inode_set_gid(ext4_inode_t *inode, uint32_t gid)
 {
@@ -148,4 +217,9 @@
 }
 
+/** Get number of links to i-node.
+ *
+ * @param inode 	i-node to load number of links from
+ * @return		number of links to i-node
+ */
 uint16_t ext4_inode_get_links_count(ext4_inode_t *inode)
 {
@@ -153,4 +227,9 @@
 }
 
+/** Set number of links to i-node.
+ *
+ * @param inode 	i-node to set number of links to
+ * @param count		number of links to i-node
+ */
 void ext4_inode_set_links_count(ext4_inode_t *inode, uint16_t count)
 {
@@ -158,9 +237,12 @@
 }
 
+/** TODO comment
+ *
+ */
 uint64_t ext4_inode_get_blocks_count(ext4_superblock_t *sb, ext4_inode_t *inode)
 {
 	if (ext4_superblock_has_feature_read_only(sb, EXT4_FEATURE_RO_COMPAT_HUGE_FILE)) {
 
-		/* 48-bit field */
+		// 48-bit field
 		uint64_t count = ((uint64_t)uint16_t_le2host(inode->osd2.linux2.blocks_high)) << 32 |
 				uint32_t_le2host(inode->blocks_count_lo);
@@ -179,4 +261,8 @@
 }
 
+
+/** TODO comment
+ *
+ */
 int ext4_inode_set_blocks_count(ext4_superblock_t *sb, ext4_inode_t *inode,
 		uint64_t count)
@@ -216,12 +302,25 @@
 }
 
+/** Get flags (features) of i-node.
+ * 
+ * @param inode		i-node to get flags from
+ * @return		flags (bitmap)
+ */
 uint32_t ext4_inode_get_flags(ext4_inode_t *inode) {
 	return uint32_t_le2host(inode->flags);
 }
 
+/** Set flags (features) of i-node.
+ *
+ * @param inode		i-node to set flags to
+ * @param flags		flags to set to i-node
+ */
 void ext4_inode_set_flags(ext4_inode_t *inode, uint32_t flags) {
 	inode->flags = host2uint32_t_le(flags);
 }
 
+/** TODO comment
+ *
+ */
 uint32_t ext4_inode_get_generation(ext4_inode_t *inode)
 {
@@ -229,4 +328,7 @@
 }
 
+/** TODO comment
+ *
+ */
 void ext4_inode_set_generation(ext4_inode_t *inode, uint32_t generation)
 {
@@ -234,4 +336,7 @@
 }
 
+/** TODO comment
+ *
+ */
 uint64_t ext4_inode_get_file_acl(ext4_inode_t *inode, ext4_superblock_t *sb)
 {
@@ -244,4 +349,7 @@
 }
 
+/** TODO comment
+ *
+ */
 void ext4_inode_set_file_acl(ext4_inode_t *inode, ext4_superblock_t *sb,
 		uint64_t file_acl)
@@ -256,4 +364,10 @@
 /***********************************************************************/
 
+/** Get block address of specified direct block.
+ *
+ * @param inode		i-node to load block from
+ * @param idx		index of logical block
+ * @return		physical block address
+ */
 uint32_t ext4_inode_get_direct_block(ext4_inode_t *inode, uint32_t idx)
 {
@@ -262,4 +376,10 @@
 }
 
+/** Set block address of specified direct block.
+ *
+ * @param inode		i-node to set block address to
+ * @param idx		index of logical block
+ * @param fblock	physical block address
+ */
 void ext4_inode_set_direct_block(ext4_inode_t *inode, uint32_t idx, uint32_t fblock)
 {
@@ -268,4 +388,10 @@
 }
 
+/** Get block address of specified indirect block.
+ *
+ * @param inode		i-node to get block address from
+ * @param idx		index of indirect block 
+ * @return		physical block address
+ */
 uint32_t ext4_inode_get_indirect_block(ext4_inode_t *inode, uint32_t idx)
 {
@@ -273,4 +399,10 @@
 }
 
+/** Set block address of specified indirect block.
+ *
+ * @param inode		i-node to set block address to
+ * @param idx		index of indirect block
+ * @param fblock	physical block address
+ */
 void ext4_inode_set_indirect_block(ext4_inode_t *inode, uint32_t idx, uint32_t fblock)
 {
@@ -278,4 +410,11 @@
 }
 
+/** Check if i-node has specified type.
+ *
+ * @param sb		superblock
+ * @param inode		i-node to check type of
+ * @param type		type to check
+ * @return 		result of check operation
+ */
 bool ext4_inode_is_type(ext4_superblock_t *sb, ext4_inode_t *inode, uint32_t type)
 {
@@ -284,5 +423,9 @@
 }
 
-
+/** Get extent header from the root of the extent tree.
+ *
+ * @param inode		i-node to get extent header from
+ * @return		pointer to extent header of the root node
+ */
 ext4_extent_header_t * ext4_inode_get_extent_header(ext4_inode_t *inode)
 {
@@ -290,5 +433,10 @@
 }
 
-// Flags operations
+/** Check if i-node has specified flag.
+ *
+ * @param inode		i-node to check flags of
+ * @param flag		flag to check
+ * @return		result of check operation
+ */
 bool ext4_inode_has_flag(ext4_inode_t *inode, uint32_t flag)
 {
@@ -299,4 +447,9 @@
 }
 
+/** Remove specified flag from i-node.
+ *
+ * @param inode		i-node to clear flag on
+ * @param clear_flag	flag to be cleared
+ */
 void ext4_inode_clear_flag(ext4_inode_t *inode, uint32_t clear_flag)
 {
@@ -306,4 +459,9 @@
 }
 
+/** Set specified flag to i-node.
+ *
+ * @param inode		i-node to set flag on
+ * @param set_flag	falt to be set
+ */
 void ext4_inode_set_flag(ext4_inode_t *inode, uint32_t set_flag)
 {
@@ -313,4 +471,10 @@
 }
 
+/** Check if i-node can be truncated.
+ *
+ * @param sb		superblock
+ * @param inode		i-node to check
+ * @return 		result of the check operation
+ */
 bool ext4_inode_can_truncate(ext4_superblock_t *sb, ext4_inode_t *inode)
 {
