提交 cff1dfd7 编写于 作者: T Theodore Ts'o

ext4: rename ext4_free_blocks_after_init() to ext4_free_clusters_after_init()

This function really returns the number of clusters after initializing
an uninitalized block bitmap has been initialized.
Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
上级 5dee5437
...@@ -213,9 +213,9 @@ void ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, ...@@ -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 /* 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 * the block bitmap is uninitialized, so we can't just count the bits
* in the bitmap. */ * in the bitmap. */
unsigned ext4_free_blocks_after_init(struct super_block *sb, unsigned ext4_free_clusters_after_init(struct super_block *sb,
ext4_group_t block_group, ext4_group_t block_group,
struct ext4_group_desc *gdp) struct ext4_group_desc *gdp)
{ {
return num_clusters_in_group(sb, block_group) - return num_clusters_in_group(sb, block_group) -
ext4_num_overhead_clusters(sb, block_group, gdp); ext4_num_overhead_clusters(sb, block_group, gdp);
......
...@@ -1787,9 +1787,9 @@ extern void ext4_init_block_bitmap(struct super_block *sb, ...@@ -1787,9 +1787,9 @@ extern void ext4_init_block_bitmap(struct super_block *sb,
struct buffer_head *bh, struct buffer_head *bh,
ext4_group_t group, ext4_group_t group,
struct ext4_group_desc *desc); struct ext4_group_desc *desc);
extern unsigned ext4_free_blocks_after_init(struct super_block *sb, extern unsigned ext4_free_clusters_after_init(struct super_block *sb,
ext4_group_t block_group, ext4_group_t block_group,
struct ext4_group_desc *gdp); struct ext4_group_desc *gdp);
extern unsigned ext4_num_base_meta_clusters(struct super_block *sb, extern unsigned ext4_num_base_meta_clusters(struct super_block *sb,
ext4_group_t block_group); ext4_group_t block_group);
extern unsigned ext4_num_overhead_clusters(struct super_block *sb, extern unsigned ext4_num_overhead_clusters(struct super_block *sb,
......
...@@ -961,7 +961,7 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode, ...@@ -961,7 +961,7 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode,
if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) { if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
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_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->bg_checksum = ext4_group_desc_csum(sbi, group,
gdp); gdp);
} }
......
...@@ -2253,7 +2253,7 @@ int ext4_mb_add_groupinfo(struct super_block *sb, ext4_group_t group, ...@@ -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)) { if (desc->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
meta_group_info[i]->bb_free = meta_group_info[i]->bb_free =
ext4_free_blocks_after_init(sb, group, desc); ext4_free_clusters_after_init(sb, group, desc);
} else { } else {
meta_group_info[i]->bb_free = meta_group_info[i]->bb_free =
ext4_free_group_clusters(sb, desc); ext4_free_group_clusters(sb, desc);
...@@ -2840,7 +2840,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, ...@@ -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)) { if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
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_group_clusters_set(sb, gdp,
ext4_free_blocks_after_init(sb, ext4_free_clusters_after_init(sb,
ac->ac_b_ex.fe_group, gdp)); ac->ac_b_ex.fe_group, gdp));
} }
len = ext4_free_group_clusters(sb, gdp) - ac->ac_b_ex.fe_len; len = ext4_free_group_clusters(sb, gdp) - ac->ac_b_ex.fe_len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册