diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2009-01-05 21:36:19 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-01-05 21:36:19 -0500 |
commit | 920313a726e04fef0f2c0bcb04ad8229c0e700d8 (patch) | |
tree | 7e7644a2fd48586ec2f455e56525565174798e4a /fs/ext4/ext4.h | |
parent | e21675d4b63975d09eb75c443c48ebe663d23e18 (diff) |
ext4: Use EXT4_GROUP_INFO_NEED_INIT_BIT during resize
The new groups added during resize are flagged as
need_init group. Make sure we properly initialize these
groups. When we have block size < page size and we are adding
new groups the page may still be marked uptodate even though
we haven't initialized the group. While forcing the init
of buddy cache we need to make sure other groups part of the
same page of buddy cache is not using the cache.
group_info->alloc_sem is added to ensure the same.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
cc: stable@kernel.org
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 8021bf558d1e..8152b5603f0a 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -1060,12 +1060,13 @@ extern int __init init_ext4_mballoc(void); | |||
1060 | extern void exit_ext4_mballoc(void); | 1060 | extern void exit_ext4_mballoc(void); |
1061 | extern void ext4_mb_free_blocks(handle_t *, struct inode *, | 1061 | extern void ext4_mb_free_blocks(handle_t *, struct inode *, |
1062 | unsigned long, unsigned long, int, unsigned long *); | 1062 | unsigned long, unsigned long, int, unsigned long *); |
1063 | extern int ext4_mb_add_more_groupinfo(struct super_block *sb, | 1063 | extern int ext4_mb_add_groupinfo(struct super_block *sb, |
1064 | ext4_group_t i, struct ext4_group_desc *desc); | 1064 | ext4_group_t i, struct ext4_group_desc *desc); |
1065 | extern void ext4_mb_update_group_info(struct ext4_group_info *grp, | 1065 | extern void ext4_mb_update_group_info(struct ext4_group_info *grp, |
1066 | ext4_grpblk_t add); | 1066 | ext4_grpblk_t add); |
1067 | 1067 | extern int ext4_mb_get_buddy_cache_lock(struct super_block *, ext4_group_t); | |
1068 | 1068 | extern void ext4_mb_put_buddy_cache_lock(struct super_block *, | |
1069 | ext4_group_t, int); | ||
1069 | /* inode.c */ | 1070 | /* inode.c */ |
1070 | int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode, | 1071 | int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode, |
1071 | struct buffer_head *bh, ext4_fsblk_t blocknr); | 1072 | struct buffer_head *bh, ext4_fsblk_t blocknr); |