diff options
author | Theodore Ts'o <tytso@mit.edu> | 2010-12-20 22:30:36 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2010-12-23 15:00:54 -0500 |
commit | 8a7411a24350bac141271755c66f40c56b0535ae (patch) | |
tree | ed77dcde1fe4122f291c6fda3def7e776fa8bdf8 /fs | |
parent | b0c3844d8af6b9f3f18f31e1b0502fbefa2166be (diff) |
ext4: fix on-line resizing regression
https://bugzilla.kernel.org/show_bug.cgi?id=25352
This regression was caused by commit a31437b85: "ext4: use
sb_issue_zeroout in setup_new_group_blocks", by accidentally dropping
the code which reserved the block group descriptor and inode table
blocks.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/resize.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index dc963929de6..981c8477ada 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -232,6 +232,8 @@ static int setup_new_group_blocks(struct super_block *sb, | |||
232 | GFP_NOFS); | 232 | GFP_NOFS); |
233 | if (err) | 233 | if (err) |
234 | goto exit_bh; | 234 | goto exit_bh; |
235 | for (i = 0, bit = gdblocks + 1; i < reserved_gdb; i++, bit++) | ||
236 | ext4_set_bit(bit, bh->b_data); | ||
235 | 237 | ||
236 | ext4_debug("mark block bitmap %#04llx (+%llu)\n", input->block_bitmap, | 238 | ext4_debug("mark block bitmap %#04llx (+%llu)\n", input->block_bitmap, |
237 | input->block_bitmap - start); | 239 | input->block_bitmap - start); |
@@ -247,6 +249,9 @@ static int setup_new_group_blocks(struct super_block *sb, | |||
247 | err = sb_issue_zeroout(sb, block, sbi->s_itb_per_group, GFP_NOFS); | 249 | err = sb_issue_zeroout(sb, block, sbi->s_itb_per_group, GFP_NOFS); |
248 | if (err) | 250 | if (err) |
249 | goto exit_bh; | 251 | goto exit_bh; |
252 | for (i = 0, bit = input->inode_table - start; | ||
253 | i < sbi->s_itb_per_group; i++, bit++) | ||
254 | ext4_set_bit(bit, bh->b_data); | ||
250 | 255 | ||
251 | if ((err = extend_or_restart_transaction(handle, 2, bh))) | 256 | if ((err = extend_or_restart_transaction(handle, 2, bh))) |
252 | goto exit_bh; | 257 | goto exit_bh; |