Flavio Leitner <[EMAIL PROTECTED]> wrote:
> 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 <[EMAIL PROTECTED]>
>
> 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 "
Thanks for the patch!
Yep, lots of duplication. Good catch.
Can you provide a test case to trigger this bug?
_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel