aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2012-09-05 01:31:50 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-09-05 01:31:50 -0400
commit28623c2f5b0dca3c3ea34fd6108940661352e276 (patch)
treeec5bf1df32709f0ebf359ce05b16f8ef608d2e9e /fs/ext4/ext4.h
parent117fff10d7f140e12dd43df20d3f9fda80577460 (diff)
ext4: grow the s_group_info array as needed
Previously we allocated the s_group_info array with enough space for any future possible growth of the file system via online resize. This is unfortunate because it wastes memory, and it doesn't work for the meta_bg scheme, since there is no limit based on the number of reserved gdt blocks. So add the code to grow the s_group_info array as needed. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 464cff711ed6..8b6902c4d7be 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1233,6 +1233,7 @@ struct ext4_sb_info {
1233 spinlock_t s_md_lock; 1233 spinlock_t s_md_lock;
1234 unsigned short *s_mb_offsets; 1234 unsigned short *s_mb_offsets;
1235 unsigned int *s_mb_maxs; 1235 unsigned int *s_mb_maxs;
1236 unsigned int s_group_info_size;
1236 1237
1237 /* tunables */ 1238 /* tunables */
1238 unsigned long s_stripe; 1239 unsigned long s_stripe;
@@ -1971,6 +1972,8 @@ extern void ext4_exit_mballoc(void);
1971extern void ext4_free_blocks(handle_t *handle, struct inode *inode, 1972extern void ext4_free_blocks(handle_t *handle, struct inode *inode,
1972 struct buffer_head *bh, ext4_fsblk_t block, 1973 struct buffer_head *bh, ext4_fsblk_t block,
1973 unsigned long count, int flags); 1974 unsigned long count, int flags);
1975extern int ext4_mb_alloc_groupinfo(struct super_block *sb,
1976 ext4_group_t ngroups);
1974extern int ext4_mb_add_groupinfo(struct super_block *sb, 1977extern int ext4_mb_add_groupinfo(struct super_block *sb,
1975 ext4_group_t i, struct ext4_group_desc *desc); 1978 ext4_group_t i, struct ext4_group_desc *desc);
1976extern int ext4_group_add_blocks(handle_t *handle, struct super_block *sb, 1979extern int ext4_group_add_blocks(handle_t *handle, struct super_block *sb,