* [PATCH] libext2: advance group in ext2fs_open2 during swapping
@ 2011-11-08 22:26 Eric Sandeen
2011-11-10 12:02 ` Ted Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2011-11-08 22:26 UTC (permalink / raw)
To: ext4 development
Without this change, we go back to getting group descriptor
"0" each time we go around the "for i" loop. It must properly
advance through the filesystem.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
(I couldn't decipher the removed comment; maybe it was typed when
you thought you would do:
gdp = ext2fs_group_desc(fs, dest, j);
which would also work ... ? It'd be clever, but I think my change
is more explicitly obvious. Either way works.
We still have failing tests but at least nothing hangs now:
Tests failed: f_mmp f_mmp_garbage m_mmp t_mmp_1on t_mmp_2off
diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c
index 0cefe3f..40a52c5 100644
--- a/lib/ext2fs/openfs.c
+++ b/lib/ext2fs/openfs.c
@@ -356,8 +356,8 @@ errcode_t ext2fs_open2(const char *name, const char *io_options,
goto cleanup;
#ifdef WORDS_BIGENDIAN
for (j=0; j < groups_per_block; j++) {
- /* The below happens to work... be careful. */
- gdp = ext2fs_group_desc(fs, fs->group_desc, j);
+ gdp = ext2fs_group_desc(fs, fs->group_desc,
+ i * groups_per_block + j);
ext2fs_swap_group_desc2(fs, gdp);
}
#endif
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libext2: advance group in ext2fs_open2 during swapping
2011-11-08 22:26 [PATCH] libext2: advance group in ext2fs_open2 during swapping Eric Sandeen
@ 2011-11-10 12:02 ` Ted Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Ted Ts'o @ 2011-11-10 12:02 UTC (permalink / raw)
To: Eric Sandeen; +Cc: ext4 development
On Tue, Nov 08, 2011 at 04:26:35PM -0600, Eric Sandeen wrote:
> Without this change, we go back to getting group descriptor
> "0" each time we go around the "for i" loop. It must properly
> advance through the filesystem.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-10 12:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-08 22:26 [PATCH] libext2: advance group in ext2fs_open2 during swapping Eric Sandeen
2011-11-10 12:02 ` Ted Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).