Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361597
b: refs/heads/master
c: 90ba983
h: refs/heads/master
i:
  361595: 43666f5
v: v3
  • Loading branch information
Theodore Ts'o committed Mar 12, 2013
1 parent cd61dfe commit 3af2816
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad56edad089b56300fd13bb9eeb7d0424d978239
refs/heads/master: 90ba983f6889e65a3b506b30dc606aa9d1d46cd2
6 changes: 3 additions & 3 deletions trunk/fs/ext4/ext4.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ struct ext4_group_desc
*/

struct flex_groups {
atomic_t free_inodes;
atomic_t free_clusters;
atomic_t used_dirs;
atomic64_t free_clusters;
atomic_t free_inodes;
atomic_t used_dirs;
};

#define EXT4_BG_INODE_UNINIT 0x0001 /* Inode table/bitmap not in use */
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/ext4/ialloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
}

struct orlov_stats {
__u64 free_clusters;
__u32 free_inodes;
__u32 free_clusters;
__u32 used_dirs;
};

Expand All @@ -342,7 +342,7 @@ static void get_orlov_stats(struct super_block *sb, ext4_group_t g,

if (flex_size > 1) {
stats->free_inodes = atomic_read(&flex_group[g].free_inodes);
stats->free_clusters = atomic_read(&flex_group[g].free_clusters);
stats->free_clusters = atomic64_read(&flex_group[g].free_clusters);
stats->used_dirs = atomic_read(&flex_group[g].used_dirs);
return;
}
Expand Down
12 changes: 6 additions & 6 deletions trunk/fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2804,8 +2804,8 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
if (sbi->s_log_groups_per_flex) {
ext4_group_t flex_group = ext4_flex_group(sbi,
ac->ac_b_ex.fe_group);
atomic_sub(ac->ac_b_ex.fe_len,
&sbi->s_flex_groups[flex_group].free_clusters);
atomic64_sub(ac->ac_b_ex.fe_len,
&sbi->s_flex_groups[flex_group].free_clusters);
}

err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh);
Expand Down Expand Up @@ -4661,8 +4661,8 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,

if (sbi->s_log_groups_per_flex) {
ext4_group_t flex_group = ext4_flex_group(sbi, block_group);
atomic_add(count_clusters,
&sbi->s_flex_groups[flex_group].free_clusters);
atomic64_add(count_clusters,
&sbi->s_flex_groups[flex_group].free_clusters);
}

ext4_mb_unload_buddy(&e4b);
Expand Down Expand Up @@ -4804,8 +4804,8 @@ int ext4_group_add_blocks(handle_t *handle, struct super_block *sb,

if (sbi->s_log_groups_per_flex) {
ext4_group_t flex_group = ext4_flex_group(sbi, block_group);
atomic_add(EXT4_NUM_B2C(sbi, blocks_freed),
&sbi->s_flex_groups[flex_group].free_clusters);
atomic64_add(EXT4_NUM_B2C(sbi, blocks_freed),
&sbi->s_flex_groups[flex_group].free_clusters);
}

ext4_mb_unload_buddy(&e4b);
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/ext4/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -1360,8 +1360,8 @@ static void ext4_update_super(struct super_block *sb,
sbi->s_log_groups_per_flex) {
ext4_group_t flex_group;
flex_group = ext4_flex_group(sbi, group_data[0].group);
atomic_add(EXT4_NUM_B2C(sbi, free_blocks),
&sbi->s_flex_groups[flex_group].free_clusters);
atomic64_add(EXT4_NUM_B2C(sbi, free_blocks),
&sbi->s_flex_groups[flex_group].free_clusters);
atomic_add(EXT4_INODES_PER_GROUP(sb) * flex_gd->count,
&sbi->s_flex_groups[flex_group].free_inodes);
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1923,8 +1923,8 @@ static int ext4_fill_flex_info(struct super_block *sb)
flex_group = ext4_flex_group(sbi, i);
atomic_add(ext4_free_inodes_count(sb, gdp),
&sbi->s_flex_groups[flex_group].free_inodes);
atomic_add(ext4_free_group_clusters(sb, gdp),
&sbi->s_flex_groups[flex_group].free_clusters);
atomic64_add(ext4_free_group_clusters(sb, gdp),
&sbi->s_flex_groups[flex_group].free_clusters);
atomic_add(ext4_used_dirs_count(sb, gdp),
&sbi->s_flex_groups[flex_group].used_dirs);
}
Expand Down

0 comments on commit 3af2816

Please sign in to comment.