diff options
author | Theodore Ts'o <tytso@mit.edu> | 2012-09-05 01:31:50 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-09-05 01:31:50 -0400 |
commit | 28623c2f5b0dca3c3ea34fd6108940661352e276 (patch) | |
tree | ec5bf1df32709f0ebf359ce05b16f8ef608d2e9e /fs/ext4/ext4.h | |
parent | 117fff10d7f140e12dd43df20d3f9fda80577460 (diff) | |
download | lwn-28623c2f5b0dca3c3ea34fd6108940661352e276.tar.gz lwn-28623c2f5b0dca3c3ea34fd6108940661352e276.zip |
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.h | 3 |
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 { spinlock_t s_md_lock; unsigned short *s_mb_offsets; unsigned int *s_mb_maxs; + unsigned int s_group_info_size; /* tunables */ unsigned long s_stripe; @@ -1971,6 +1972,8 @@ extern void ext4_exit_mballoc(void); extern void ext4_free_blocks(handle_t *handle, struct inode *inode, struct buffer_head *bh, ext4_fsblk_t block, unsigned long count, int flags); +extern int ext4_mb_alloc_groupinfo(struct super_block *sb, + ext4_group_t ngroups); extern int ext4_mb_add_groupinfo(struct super_block *sb, ext4_group_t i, struct ext4_group_desc *desc); extern int ext4_group_add_blocks(handle_t *handle, struct super_block *sb, |