Skip to content

Commit

Permalink
ext4: fix on-line resizing regression
Browse files Browse the repository at this point in the history
https://bugzilla.kernel.org/show_bug.cgi?id=25352

This regression was caused by commit a31437b: "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>
  • Loading branch information
Theodore Ts'o committed Dec 23, 2010
1 parent b0c3844 commit 8a7411a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/ext4/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ static int setup_new_group_blocks(struct super_block *sb,
GFP_NOFS);
if (err)
goto exit_bh;
for (i = 0, bit = gdblocks + 1; i < reserved_gdb; i++, bit++)
ext4_set_bit(bit, bh->b_data);

ext4_debug("mark block bitmap %#04llx (+%llu)\n", input->block_bitmap,
input->block_bitmap - start);
Expand All @@ -247,6 +249,9 @@ static int setup_new_group_blocks(struct super_block *sb,
err = sb_issue_zeroout(sb, block, sbi->s_itb_per_group, GFP_NOFS);
if (err)
goto exit_bh;
for (i = 0, bit = input->inode_table - start;
i < sbi->s_itb_per_group; i++, bit++)
ext4_set_bit(bit, bh->b_data);

if ((err = extend_or_restart_transaction(handle, 2, bh)))
goto exit_bh;
Expand Down

0 comments on commit 8a7411a

Please sign in to comment.