[parted-devel] [PATCH] Fix block state checking for realocated blocks
Flavio Leitner
flavio.leitner at gmail.com
Tue Jun 12 17:54:26 UTC 2007
Hi there,
A busy block should be realocated and it's correct in
ext2_block_relocator_mark(), but not in ext2_metadata_push().
Signed-off-by: Flavio Leitner <flavio.leitner at gmail.com>
diff --git a/libparted/fs/ext2/ext2_meta.c b/libparted/fs/ext2/ext2_meta.c
index d48097c..dd871c8 100644
--- a/libparted/fs/ext2/ext2_meta.c
+++ b/libparted/fs/ext2/ext2_meta.c
@@ -65,7 +65,7 @@ int ext2_metadata_push(struct ext2_fs *fs, blk_t newsize)
if (fs->opt_debug)
{
for (j=0;j<diff;j++)
- if (ext2_get_block_state(fs, fromblock+j))
+ if (!ext2_get_block_state(fs, fromblock+j))
{
fprintf(stderr,
"error: block relocator "
--
1.5.0.6
--
Flávio
More information about the parted-devel
mailing list