* [PATCH 2/2] EXT4: fix online resize bug
@ 2008-05-29 18:19 Josef Bacik
2008-06-05 1:53 ` Theodore Tso
0 siblings, 1 reply; 2+ messages in thread
From: Josef Bacik @ 2008-05-29 18:19 UTC (permalink / raw)
To: linux-ext4; +Cc: akpm
Hello,
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. Thank you,
Signed-off-by: Josef Bacik <jbacik@redhat.com>
Index: linux-2.6/fs/ext4/resize.c
===================================================================
--- linux-2.6.orig/fs/ext4/resize.c
+++ linux-2.6/fs/ext4/resize.c
@@ -563,7 +563,8 @@ static int reserve_backup_gdb(handle_t *
}
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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] EXT4: fix online resize bug
2008-05-29 18:19 [PATCH 2/2] EXT4: fix online resize bug Josef Bacik
@ 2008-06-05 1:53 ` Theodore Tso
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Tso @ 2008-06-05 1:53 UTC (permalink / raw)
To: Josef Bacik; +Cc: linux-ext4, akpm
On Thu, May 29, 2008 at 02:19:41PM -0400, Josef Bacik wrote:
> Hello,
>
> 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. Thank you,
>
> Signed-off-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-05 1:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-29 18:19 [PATCH 2/2] EXT4: fix online resize bug Josef Bacik
2008-06-05 1:53 ` Theodore Tso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.