Index: uspace/lib/ext4/libext4_directory_index.c
===================================================================
--- uspace/lib/ext4/libext4_directory_index.c	(revision f22d5ef0d580ce8083ee98c5938da438d37a3bdd)
+++ uspace/lib/ext4/libext4_directory_index.c	(revision db8fb43b94dbf89ff6492e08770a9570ad3f2d42)
@@ -43,4 +43,7 @@
 #include "libext4.h"
 
+/** Type entry to pass to sorting algorithm.
+ *
+ */
 typedef struct ext4_dx_sort_entry {
 	uint32_t hash;
@@ -50,4 +53,9 @@
 
 
+/** Get hash version used in directory index.
+ *
+ * @param root_info	pointer to root info structure of index
+ * @return 			hash algorithm version
+ */
 uint8_t ext4_directory_dx_root_info_get_hash_version(
 		ext4_directory_dx_root_info_t *root_info)
@@ -56,4 +64,9 @@
 }
 
+/** Set hash version, that will be used in directory index.
+ *
+ * @param root_info		pointer to root info structure of index
+ * @param version 	 	hash algorithm version
+ */
 void ext4_directory_dx_root_info_set_hash_version(
 		ext4_directory_dx_root_info_t *root_info, uint8_t version)
@@ -62,4 +75,9 @@
 }
 
+/** Get length of root_info structure in bytes.
+ *
+ * @param root_info	pointer to root info structure of index
+ * @return 			length of the structure
+ */
 uint8_t ext4_directory_dx_root_info_get_info_length(
 		ext4_directory_dx_root_info_t *root_info)
@@ -68,4 +86,9 @@
 }
 
+/** Set length of root_info structure in bytes.
+ *
+ * @param root_info		pointer to root info structure of index
+ * @param info_length	length of the structure
+ */
 void ext4_directory_dx_root_info_set_info_length(
 		ext4_directory_dx_root_info_t *root_info, uint8_t info_length)
@@ -74,4 +97,9 @@
 }
 
+/** Get number of indirect levels of HTree.
+ *
+ * @param root_info	pointer to root info structure of index
+ * @return 			height of HTree (actually only 0 or 1)
+ */
 uint8_t ext4_directory_dx_root_info_get_indirect_levels(
 		ext4_directory_dx_root_info_t *root_info)
@@ -80,4 +108,9 @@
 }
 
+/** Set number of indirect levels of HTree.
+ *
+ * @param root_info	pointer to root info structure of index
+ * @param levels	height of HTree (actually only 0 or 1)
+ */
 void ext4_directory_dx_root_info_set_indirect_levels(
 		ext4_directory_dx_root_info_t *root_info, uint8_t levels)
@@ -86,4 +119,9 @@
 }
 
+/** Get maximum number of index node entries.
+ *
+ * @param countlimit	pointer to counlimit structure
+ * @return			 	maximum of entries in node
+ */
 uint16_t ext4_directory_dx_countlimit_get_limit(
 		ext4_directory_dx_countlimit_t *countlimit)
@@ -92,4 +130,9 @@
 }
 
+/** Set maximum number of index node entries.
+ *
+ * @param countlimit	pointer to counlimit structure
+ * @param limit			maximum of entries in node
+ */
 void ext4_directory_dx_countlimit_set_limit(
 		ext4_directory_dx_countlimit_t *countlimit, uint16_t limit)
@@ -98,4 +141,9 @@
 }
 
+/** Get current number of index node entries.
+ *
+ * @param countlimit	pointer to counlimit structure
+ * @return			 	number of entries in node
+ */
 uint16_t ext4_directory_dx_countlimit_get_count(
 		ext4_directory_dx_countlimit_t *countlimit)
@@ -104,4 +152,9 @@
 }
 
+/** Set current number of index node entries.
+ *
+ * @param countlimit	pointer to counlimit structure
+ * @param count		 	number of entries in node
+ */
 void ext4_directory_dx_countlimit_set_count(
 		ext4_directory_dx_countlimit_t *countlimit, uint16_t count)
@@ -110,4 +163,9 @@
 }
 
+/** Get hash value of index entry.
+ *
+ * @param entry		pointer to index entry
+ * @return          hash value
+ */
 uint32_t ext4_directory_dx_entry_get_hash(ext4_directory_dx_entry_t *entry)
 {
@@ -115,4 +173,10 @@
 }
 
+
+/** Set hash value of index entry.
+ *
+ * @param entry		pointer to index entry
+ * @param hash		hash value
+ */
 void ext4_directory_dx_entry_set_hash(ext4_directory_dx_entry_t *entry,
 		uint32_t hash)
@@ -121,4 +185,9 @@
 }
 
+/** Get block address where child node is located.
+ *
+ * @param entry		pointer to index entry
+ * @return          block address of child node
+ */
 uint32_t ext4_directory_dx_entry_get_block(ext4_directory_dx_entry_t *entry)
 {
@@ -126,4 +195,9 @@
 }
 
+/** Set block address where child node is located.
+ *
+ * @param entry		pointer to index entry
+ * @param block		block address of child node
+ */
 void ext4_directory_dx_entry_set_block(ext4_directory_dx_entry_t *entry,
 		uint32_t block)
@@ -135,4 +209,7 @@
 /**************************************************************************/
 
+/** TODO comment all function
+ *
+ */
 int ext4_directory_dx_init(ext4_inode_ref_t *dir)
 {
@@ -158,4 +235,6 @@
 	ext4_directory_entry_ll_t *dot_dot = (ext4_directory_entry_ll_t *)&root->dots[1];
 
+
+	// TODO why the commented lines??
 	EXT4FS_DBG("dot len = \%u, dotdot len = \%u", ext4_directory_entry_ll_get_entry_length(dot), ext4_directory_entry_ll_get_entry_length(dot_dot));
 
