diff options
author | Josef Bacik <jbacik@redhat.com> | 2008-06-07 00:05:52 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-06-07 00:05:52 +0200 |
commit | 944600930a37aa725ba6f93c3244e2d77a1e3581 (patch) | |
tree | 2582e2b72196d82ae8fef3b88cb7cc834a2198d0 /fs/ext4 | |
parent | ext4: Fix uninit block group initialization with FLEX_BG (diff) | |
download | linux-944600930a37aa725ba6f93c3244e2d77a1e3581.tar.xz linux-944600930a37aa725ba6f93c3244e2d77a1e3581.zip |
ext4: fix online resize bug
There is a bug when we are trying to verify that the reserve inode's
double indirect blocks point back to the primary gdt blocks. The fix is
obvious, we need to mod the gdb count by the addr's per block. This was
verified using the same testcase as with the ext3 equivalent of this
patch.
Signed-off-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/resize.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 9f086a6a472b..9ecb92f68543 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -563,7 +563,8 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, } blk = EXT4_SB(sb)->s_sbh->b_blocknr + 1 + EXT4_SB(sb)->s_gdb_count; - data = (__le32 *)dind->b_data + EXT4_SB(sb)->s_gdb_count; + data = (__le32 *)dind->b_data + (EXT4_SB(sb)->s_gdb_count % + EXT4_ADDR_PER_BLOCK(sb)); end = (__le32 *)dind->b_data + EXT4_ADDR_PER_BLOCK(sb); /* Get each reserved primary GDT block and verify it holds backups */ |