aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2012-09-05 01:29:50 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-09-05 01:29:50 -0400
commit117fff10d7f140e12dd43df20d3f9fda80577460 (patch)
tree0236d1dfb77e794b1628b723f21b3c83383e0475 /fs/ext4/ext4.h
parent2ebd1704ded88a8ae29b5f3998b13959c715c4be (diff)
ext4: grow the s_flex_groups array as needed when resizing
Previously, we allocated the s_flex_groups array to the maximum size that the file system could be resized. There was two problems with this approach. First, it wasted memory in the common case where the file system was not resized. Secondly, once we start allowing online resizing using the meta_bg scheme, there is no maximum size that the file system can be resized. So instead, we need to grow the s_flex_groups at inline resize time. 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 0df5ee102b61..464cff711ed6 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1276,6 +1276,7 @@ struct ext4_sb_info {
1276 1276
1277 unsigned int s_log_groups_per_flex; 1277 unsigned int s_log_groups_per_flex;
1278 struct flex_groups *s_flex_groups; 1278 struct flex_groups *s_flex_groups;
1279 ext4_group_t s_flex_groups_allocated;
1279 1280
1280 /* workqueue for dio unwritten */ 1281 /* workqueue for dio unwritten */
1281 struct workqueue_struct *dio_unwritten_wq; 1282 struct workqueue_struct *dio_unwritten_wq;
@@ -2055,6 +2056,8 @@ extern void ext4_superblock_csum_set(struct super_block *sb,
2055extern void *ext4_kvmalloc(size_t size, gfp_t flags); 2056extern void *ext4_kvmalloc(size_t size, gfp_t flags);
2056extern void *ext4_kvzalloc(size_t size, gfp_t flags); 2057extern void *ext4_kvzalloc(size_t size, gfp_t flags);
2057extern void ext4_kvfree(void *ptr); 2058extern void ext4_kvfree(void *ptr);
2059extern int ext4_alloc_flex_bg_array(struct super_block *sb,
2060 ext4_group_t ngroup);
2058extern __printf(4, 5) 2061extern __printf(4, 5)
2059void __ext4_error(struct super_block *, const char *, unsigned int, 2062void __ext4_error(struct super_block *, const char *, unsigned int,
2060 const char *, ...); 2063 const char *, ...);