Index: uspace/lib/ext4/libext4_balloc.c
===================================================================
--- uspace/lib/ext4/libext4_balloc.c	(revision f22d5ef0d580ce8083ee98c5938da438d37a3bdd)
+++ uspace/lib/ext4/libext4_balloc.c	(revision 06d85e53f2ba96bd2ea9eae7bc274870ba1e1a85)
@@ -52,5 +52,5 @@
 	uint32_t first_block = ext4_superblock_get_first_data_block(sb);
 
-	// First block == 0 or 1
+	/* First block == 0 or 1 */
 	if (first_block == 0) {
 		return block_addr % blocks_per_group;
@@ -92,5 +92,5 @@
 	uint32_t first_block = ext4_superblock_get_first_data_block(sb);
 
-	// First block == 0 or 1
+	/* First block == 0 or 1 */
 	if (first_block == 0) {
 		return block_addr / blocks_per_group;
@@ -114,9 +114,9 @@
 	ext4_superblock_t *sb = fs->superblock;
 
-	// Compute indexes
+	/* Compute indexes */
 	uint32_t block_group = ext4_balloc_get_bgid_of_block(sb, block_addr);
 	uint32_t index_in_group = ext4_balloc_blockaddr2_index_in_group(sb, block_addr);
 
-	// Load block group reference
+	/* Load block group reference */
 	ext4_block_group_ref_t *bg_ref;
 	rc = ext4_filesystem_get_block_group_ref(fs, block_group, &bg_ref);
@@ -126,5 +126,5 @@
 	}
 
-	// Load block with bitmap
+	/* Load block with bitmap */
 	uint32_t bitmap_block_addr = ext4_block_group_get_block_bitmap(
 			bg_ref->block_group, sb);
@@ -136,13 +136,13 @@
 	}
 
-	// Modify bitmap
+	/* Modify bitmap */
 	ext4_bitmap_free_bit(bitmap_block->data, index_in_group);
 	bitmap_block->dirty = true;
 
 
-	// Release block with bitmap
+	/* Release block with bitmap */
 	rc = block_put(bitmap_block);
 	if (rc != EOK) {
-		// Error in saving bitmap
+		/* Error in saving bitmap */
 		ext4_filesystem_put_block_group_ref(bg_ref);
 		EXT4FS_DBG("error in saving bitmap \%d", rc);
@@ -152,10 +152,10 @@
 	uint32_t block_size = ext4_superblock_get_block_size(sb);
 
-	// Update superblock free blocks count
+	/* Update superblock free blocks count */
 	uint32_t sb_free_blocks = ext4_superblock_get_free_blocks_count(sb);
 	sb_free_blocks++;
 	ext4_superblock_set_free_blocks_count(sb, sb_free_blocks);
 
-	// Update inode blocks count
+	/* Update inode blocks count */
 	uint64_t ino_blocks = ext4_inode_get_blocks_count(sb, inode_ref->inode);
 	ino_blocks -= block_size / EXT4_INODE_BLOCK_SIZE;
@@ -163,5 +163,5 @@
 	inode_ref->dirty = true;
 
-	// Update block group free blocks count
+	/* Update block group free blocks count */
 	uint32_t free_blocks = ext4_block_group_get_free_blocks_count(
 			bg_ref->block_group, sb);
@@ -171,5 +171,5 @@
 	bg_ref->dirty = true;
 
-	// Release block group reference
+	/* Release block group reference */
 	rc = ext4_filesystem_put_block_group_ref(bg_ref);
 	if (rc != EOK) {
@@ -196,5 +196,5 @@
 	ext4_superblock_t *sb = fs->superblock;
 
-	// Compute indexes
+	/* Compute indexes */
 	uint32_t block_group_first =
 			ext4_balloc_get_bgid_of_block(sb, first);
@@ -204,5 +204,5 @@
 	assert(block_group_first == block_group_last);
 
-	// Load block group reference
+	/* Load block group reference */
 	ext4_block_group_ref_t *bg_ref;
 	rc = ext4_filesystem_get_block_group_ref(fs, block_group_first, &bg_ref);
@@ -216,5 +216,5 @@
 
 
-	// Load block with bitmap
+	/* Load block with bitmap */
 	uint32_t bitmap_block_addr = ext4_block_group_get_block_bitmap(
 			bg_ref->block_group, sb);
@@ -227,12 +227,12 @@
 	}
 
-	// Modify bitmap
+	/* Modify bitmap */
 	ext4_bitmap_free_bits(bitmap_block->data, index_in_group_first, count);
 	bitmap_block->dirty = true;
 
-	// Release block with bitmap
+	/* Release block with bitmap */
 	rc = block_put(bitmap_block);
 	if (rc != EOK) {
-		// Error in saving bitmap
+		/* Error in saving bitmap */
 		ext4_filesystem_put_block_group_ref(bg_ref);
 		EXT4FS_DBG("error in saving bitmap \%d", rc);
@@ -242,10 +242,10 @@
 	uint32_t block_size = ext4_superblock_get_block_size(sb);
 
-	// Update superblock free blocks count
+	/* Update superblock free blocks count */
 	uint32_t sb_free_blocks = ext4_superblock_get_free_blocks_count(sb);
 	sb_free_blocks += count;
 	ext4_superblock_set_free_blocks_count(sb, sb_free_blocks);
 
-	// Update inode blocks count
+	/* Update inode blocks count */
 	uint64_t ino_blocks = ext4_inode_get_blocks_count(sb, inode_ref->inode);
 	ino_blocks -= count * (block_size / EXT4_INODE_BLOCK_SIZE);
@@ -253,5 +253,5 @@
 	inode_ref->dirty = true;
 
-	// Update block group free blocks count
+	/* Update block group free blocks count */
 	uint32_t free_blocks = ext4_block_group_get_free_blocks_count(
 			bg_ref->block_group, sb);
@@ -261,5 +261,5 @@
 	bg_ref->dirty = true;
 
-	// Release block group reference
+	/* Release block group reference */
 	rc = ext4_filesystem_put_block_group_ref(bg_ref);
 	if (rc != EOK) {
@@ -292,5 +292,5 @@
 		inode_table_bytes = inodes_per_group * inode_table_item_size;
 	} else {
-		// last block group could be smaller
+		/* last block group could be smaller */
 		uint32_t inodes_count_total = ext4_superblock_get_inodes_count(sb);
 		inode_table_bytes =
@@ -328,5 +328,5 @@
 	}
 
-	// If inode has some blocks, get last block address + 1
+	/* If inode has some blocks, get last block address + 1 */
 	if (inode_block_count > 0) {
 
@@ -341,13 +341,13 @@
 		}
 
-		// if goal == 0, sparse file -> continue
-	}
-
-	// Identify block group of inode
+		/* if goal == 0, sparse file -> continue */
+	}
+
+	/* Identify block group of inode */
 	uint32_t inodes_per_group = ext4_superblock_get_inodes_per_group(sb);
 	uint32_t block_group = (inode_ref->index - 1) / inodes_per_group;
 	block_size = ext4_superblock_get_block_size(sb);
 
-	// Load block group reference
+	/* Load block group reference */
 	ext4_block_group_ref_t *bg_ref;
 	rc = ext4_filesystem_get_block_group_ref(inode_ref->fs, block_group, &bg_ref);
@@ -356,5 +356,5 @@
 	}
 
-	// Compute indexes
+	/* Compute indexes */
 	uint32_t block_group_count = ext4_superblock_get_block_group_count(sb);
 	uint32_t inode_table_first_block = ext4_block_group_get_inode_table_first_block(
@@ -363,9 +363,9 @@
 	uint32_t inode_table_bytes;
 
-	// Check for last block group
+	/* Check for last block group */
 	if (block_group < block_group_count - 1) {
 		inode_table_bytes = inodes_per_group * inode_table_item_size;
 	} else {
-		// last block group could be smaller
+		/* last block group could be smaller */
 		uint32_t inodes_count_total = ext4_superblock_get_inodes_count(sb);
 		inode_table_bytes =
@@ -403,9 +403,9 @@
 	uint32_t rel_block_idx = 0;
 
-	// Find GOAL
+	/* Find GOAL */
 	uint32_t goal = ext4_balloc_find_goal(inode_ref);
 	if (goal == 0) {
-		// no goal found => partition is full
-		EXT4FS_DBG("ERRORR (goal == 0)");
+		/* no goal found => partition is full */
+		EXT4FS_DBG("ERROR (goal == 0)");
 		return ENOSPC;
 	}
@@ -413,10 +413,10 @@
 	ext4_superblock_t *sb = inode_ref->fs->superblock;
 
-	// Load block group number for goal and relative index
+	/* Load block group number for goal and relative index */
 	uint32_t block_group = ext4_balloc_get_bgid_of_block(sb, goal);
 	uint32_t index_in_group = ext4_balloc_blockaddr2_index_in_group(sb, goal);
 
 
-	// Load block group reference
+	/* Load block group reference */
 	ext4_block_group_ref_t *bg_ref;
 	rc = ext4_filesystem_get_block_group_ref(inode_ref->fs, block_group, &bg_ref);
@@ -426,5 +426,5 @@
 	}
 
-	// Compute indexes
+	/* Compute indexes */
 	uint32_t first_in_group =
 			ext4_balloc_get_first_data_block_in_group(sb,
@@ -438,5 +438,5 @@
 	}
 
-	// Load block with bitmap
+	/* Load block with bitmap */
 	bitmap_block_addr = ext4_block_group_get_block_bitmap(bg_ref->block_group,
 			sb);
@@ -449,5 +449,5 @@
 	}
 
-	// Check if goal is free
+	/* Check if goal is free */
 	if (ext4_bitmap_is_free_bit(bitmap_block->data, index_in_group)) {
 		ext4_bitmap_set_bit(bitmap_block->data, index_in_group);
@@ -472,5 +472,5 @@
 	}
 
-	// Try to find free block near to goal
+	/* Try to find free block near to goal */
 	for (uint32_t tmp_idx = index_in_group + 1; tmp_idx < end_idx; ++tmp_idx) {
 		if (ext4_bitmap_is_free_bit(bitmap_block->data, tmp_idx)) {
@@ -492,5 +492,5 @@
 	}
 
-	// Find free BYTE in bitmap
+	/* Find free BYTE in bitmap */
 	rc = ext4_bitmap_find_free_byte_and_set_bit(bitmap_block->data, index_in_group, &rel_block_idx, blocks_in_group);
 	if (rc == EOK) {
@@ -508,5 +508,5 @@
 	}
 
-	// Find free bit in bitmap
+	/* Find free bit in bitmap */
 	rc = ext4_bitmap_find_free_bit_and_set(bitmap_block->data, index_in_group, &rel_block_idx, blocks_in_group);
 	if (rc == EOK) {
@@ -524,9 +524,9 @@
 	}
 
-	// No free block found yet
+	/* No free block found yet */
 	block_put(bitmap_block);
 	ext4_filesystem_put_block_group_ref(bg_ref);
 
-	// Try other block groups
+	/* Try other block groups */
 	uint32_t block_group_count = ext4_superblock_get_block_group_count(sb);
 
@@ -541,5 +541,5 @@
 		}
 
-		// Load block with bitmap
+		/* Load block with bitmap */
 		bitmap_block_addr = ext4_block_group_get_block_bitmap(
 				bg_ref->block_group, sb);
@@ -552,5 +552,5 @@
 		}
 
-		// Compute indexes
+		/* Compute indexes */
 		first_in_group = ext4_balloc_get_first_data_block_in_group(
 				sb, bg_ref->block_group, bgid);
@@ -566,5 +566,5 @@
 		}
 
-		// Try to find free byte in bitmap
+		/* Try to find free byte in bitmap */
 		rc = ext4_bitmap_find_free_byte_and_set_bit(bitmap_block->data, index_in_group, &rel_block_idx, blocks_in_group);
 		if (rc == EOK) {
@@ -582,5 +582,5 @@
 		}
 
-		// Try to find free bit in bitmap
+		/* Try to find free bit in bitmap */
 		rc = ext4_bitmap_find_free_bit_and_set(bitmap_block->data, index_in_group, &rel_block_idx, blocks_in_group);
 		if (rc == EOK) {
@@ -601,5 +601,5 @@
 		ext4_filesystem_put_block_group_ref(bg_ref);
 
-		// Goto next group
+		/* Goto next group */
 		bgid = (bgid + 1) % block_group_count;
 		count--;
@@ -609,14 +609,14 @@
 
 success:
-	; 	// Empty command - because of syntax
+	; 	/* Empty command - because of syntax */
 	
 	uint32_t block_size = ext4_superblock_get_block_size(sb);
 
-	// Update superblock free blocks count
+	/* Update superblock free blocks count */
 	uint32_t sb_free_blocks = ext4_superblock_get_free_blocks_count(sb);
 	sb_free_blocks--;
 	ext4_superblock_set_free_blocks_count(sb, sb_free_blocks);
 
-	// Update inode blocks (different block size!) count
+	/* Update inode blocks (different block size!) count */
 	uint64_t ino_blocks = ext4_inode_get_blocks_count(sb, inode_ref->inode);
 	ino_blocks += block_size / EXT4_INODE_BLOCK_SIZE;
@@ -624,5 +624,5 @@
 	inode_ref->dirty = true;
 
-	// Update block group free blocks count
+	/* Update block group free blocks count */
 	uint32_t bg_free_blocks = ext4_block_group_get_free_blocks_count(
 			bg_ref->block_group, sb);
@@ -652,9 +652,9 @@
 	ext4_superblock_t *sb = fs->superblock;
 
-	// Compute indexes
+	/* Compute indexes */
 	uint32_t block_group = ext4_balloc_get_bgid_of_block(sb, fblock);
 	uint32_t index_in_group = ext4_balloc_blockaddr2_index_in_group(sb, fblock);
 
-	// Load block group reference
+	/* Load block group reference */
 	ext4_block_group_ref_t *bg_ref;
 	rc = ext4_filesystem_get_block_group_ref(fs, block_group, &bg_ref);
@@ -664,5 +664,5 @@
 	}
 
-	// Load block with bitmap
+	/* Load block with bitmap */
 	uint32_t bitmap_block_addr = ext4_block_group_get_block_bitmap(
 			bg_ref->block_group, sb);
@@ -674,8 +674,8 @@
 	}
 
-	// Check if block is free
+	/* Check if block is free */
 	*free = ext4_bitmap_is_free_bit(bitmap_block->data, index_in_group);
 
-	// Allocate block if possible
+	/* Allocate block if possible */
 	if (*free) {
 		ext4_bitmap_set_bit(bitmap_block->data, index_in_group);
@@ -683,8 +683,8 @@
 	}
 
-	// Release block with bitmap
+	/* Release block with bitmap */
 	rc = block_put(bitmap_block);
 	if (rc != EOK) {
-		// Error in saving bitmap
+		/* Error in saving bitmap */
 		ext4_filesystem_put_block_group_ref(bg_ref);
 		EXT4FS_DBG("error in saving bitmap \%d", rc);
@@ -692,5 +692,5 @@
 	}
 
-	// If block is not free, return
+	/* If block is not free, return */
 	if (!(*free)) {
 		goto terminate;
@@ -699,10 +699,10 @@
 	uint32_t block_size = ext4_superblock_get_block_size(sb);
 
-	// Update superblock free blocks count
+	/* Update superblock free blocks count */
 	uint32_t sb_free_blocks = ext4_superblock_get_free_blocks_count(sb);
 	sb_free_blocks--;
 	ext4_superblock_set_free_blocks_count(sb, sb_free_blocks);
 
-	// Update inode blocks count
+	/* Update inode blocks count */
 	uint64_t ino_blocks = ext4_inode_get_blocks_count(sb, inode_ref->inode);
 	ino_blocks += block_size / EXT4_INODE_BLOCK_SIZE;
@@ -710,5 +710,5 @@
 	inode_ref->dirty = true;
 
-	// Update block group free blocks count
+	/* Update block group free blocks count */
 	uint32_t free_blocks = ext4_block_group_get_free_blocks_count(
 			bg_ref->block_group, sb);
