ext4: rename ext4_free_blocks_after_init() to ext4_free_clusters_after_init()
authorTheodore Ts'o <tytso@mit.edu>
Fri, 9 Sep 2011 23:12:51 +0000 (19:12 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 9 Sep 2011 23:12:51 +0000 (19:12 -0400)
This function really returns the number of clusters after initializing
an uninitalized block bitmap has been initialized.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/balloc.c
fs/ext4/ext4.h
fs/ext4/ialloc.c
fs/ext4/mballoc.c

index 4f303809e076b08e3e9bedfb841b70bacf84680e..3d07c35c70892318bb7409b4853c0ffeabc664ee 100644 (file)
@@ -213,9 +213,9 @@ void ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
 /* Return the number of free blocks in a block group.  It is used when
  * the block bitmap is uninitialized, so we can't just count the bits
  * in the bitmap. */
-unsigned ext4_free_blocks_after_init(struct super_block *sb,
-                                    ext4_group_t block_group,
-                                    struct ext4_group_desc *gdp)
+unsigned ext4_free_clusters_after_init(struct super_block *sb,
+                                      ext4_group_t block_group,
+                                      struct ext4_group_desc *gdp)
 {
        return num_clusters_in_group(sb, block_group) - 
                ext4_num_overhead_clusters(sb, block_group, gdp);
index f6963cd7f709bd29145d1c37547350f58e782ea8..1473c06e4c94f23a9e7b61488bb9e313ecbc64f5 100644 (file)
@@ -1787,9 +1787,9 @@ extern void ext4_init_block_bitmap(struct super_block *sb,
                                   struct buffer_head *bh,
                                   ext4_group_t group,
                                   struct ext4_group_desc *desc);
-extern unsigned ext4_free_blocks_after_init(struct super_block *sb,
-                                           ext4_group_t block_group,
-                                           struct ext4_group_desc *gdp);
+extern unsigned ext4_free_clusters_after_init(struct super_block *sb,
+                                             ext4_group_t block_group,
+                                             struct ext4_group_desc *gdp);
 extern unsigned ext4_num_base_meta_clusters(struct super_block *sb,
                                            ext4_group_t block_group);
 extern unsigned ext4_num_overhead_clusters(struct super_block *sb,
index 71a9c8f3dece6442dc8374e72f176112462c53e5..d50a7d5e4726833e1b00e2cc524dce568ad3a387 100644 (file)
@@ -961,7 +961,7 @@ got:
                if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
                        gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
                        ext4_free_group_clusters_set(sb, gdp,
-                               ext4_free_blocks_after_init(sb, group, gdp));
+                               ext4_free_clusters_after_init(sb, group, gdp));
                        gdp->bg_checksum = ext4_group_desc_csum(sbi, group,
                                                                gdp);
                }
index 76db2f12107fd85754a4bcaafc684a3d8aab4cb4..90a3ed7c565c2b1c7db61e0adc9a6812c67ee42a 100644 (file)
@@ -2253,7 +2253,7 @@ int ext4_mb_add_groupinfo(struct super_block *sb, ext4_group_t group,
         */
        if (desc->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
                meta_group_info[i]->bb_free =
-                       ext4_free_blocks_after_init(sb, group, desc);
+                       ext4_free_clusters_after_init(sb, group, desc);
        } else {
                meta_group_info[i]->bb_free =
                        ext4_free_group_clusters(sb, desc);
@@ -2840,7 +2840,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
        if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
                gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
                ext4_free_group_clusters_set(sb, gdp,
-                                            ext4_free_blocks_after_init(sb,
+                                            ext4_free_clusters_after_init(sb,
                                                ac->ac_b_ex.fe_group, gdp));
        }
        len = ext4_free_group_clusters(sb, gdp) - ac->ac_b_ex.fe_len;