Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img

2012-08-02 Thread Paolo Bonzini
Il 02/08/2012 12:06, Miroslav Rezanina ha scritto: >>> > > +qemu_progress_print(((float) nb_sectors / >>> > > progress_base)*100, 100); >> > >> > qemu_progress_print(nb_sectors, over_sectors); >> > >> > >> > Paolo >> > > This won't work. qemu_progress_print takes either (current_pro

Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img

2012-08-02 Thread Miroslav Rezanina
- Original Message - > From: "Paolo Bonzini" > To: "Miroslav Rezanina" > Cc: qemu-devel@nongnu.org > Sent: Wednesday, August 1, 2012 12:22:50 PM > Subject: Re: [PATCH][RFC] Add compare subcommand for qemu-img > > > + goto out; > > + } > > +}

Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img

2012-08-01 Thread Miroslav Rezanina
- Original Message - > From: "Eric Blake" > To: "Miroslav Rezanina" > Cc: qemu-devel@nongnu.org, "Paolo Bonzini" > Sent: Wednesday, August 1, 2012 3:21:03 PM > Subject: Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img &

Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img

2012-08-01 Thread Paolo Bonzini
Il 01/08/2012 15:21, Eric Blake ha scritto: >> > +++ b/qemu-img.c >> > @@ -96,7 +96,9 @@ static void help(void) >> > " '-a' applies a snapshot (revert disk to saved state)\n" >> > " '-c' creates a snapshot\n" >> > " '-d' deletes a snapshot\n" >> > -

Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img

2012-08-01 Thread Eric Blake
On 08/01/2012 04:03 AM, Miroslav Rezanina wrote: > This patch adds compare subcommand that compares two images. Compare has > following criteria: > - only data part is compared > - unallocated sectors are not read > - in case of different image size, exceeding part of bigger disk has to be > zero

Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img

2012-08-01 Thread Stefan Hajnoczi
On Wed, Aug 1, 2012 at 11:03 AM, Miroslav Rezanina wrote: > This patch adds compare subcommand that compares two images. Compare has > following criteria: > - only data part is compared > - unallocated sectors are not read > - in case of different image size, exceeding part of bigger disk has to

Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img

2012-08-01 Thread Paolo Bonzini
Il 01/08/2012 12:44, Miroslav Rezanina ha scritto: >> >> Also, perhaps we can add a "strict" mode (-S) that would fail if the >> images are of different size, and if a sector is allocated in one but >> unallocated in the other? >> >> And a "silent" or "quiet" mode (-s or -q, your choice) that print

Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img

2012-08-01 Thread Miroslav Rezanina
- Original Message - > From: "Paolo Bonzini" > To: "Miroslav Rezanina" > Cc: qemu-devel@nongnu.org > Sent: Wednesday, August 1, 2012 12:22:50 PM > Subject: Re: [PATCH][RFC] Add compare subcommand for qemu-img > > Il 01/08/2012 12:03, Miroslav Rezanina ha scritto: > > This patch adds co

Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img

2012-08-01 Thread Paolo Bonzini
Il 01/08/2012 12:03, Miroslav Rezanina ha scritto: > This patch adds compare subcommand that compares two images. Compare has > following criteria: > - only data part is compared > - unallocated sectors are not read > - in case of different image size, exceeding part of bigger disk has to be > ze

[Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img

2012-08-01 Thread Miroslav Rezanina
This patch adds compare subcommand that compares two images. Compare has following criteria: - only data part is compared - unallocated sectors are not read - in case of different image size, exceeding part of bigger disk has to be zeroed/unallocated to compare rest - qemu-img returns: - 0 if