Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-27 Thread Luiz Capitulino
On Mon, 27 Feb 2012 13:49:17 +0100 Paolo Bonzini wrote: > On 02/27/2012 01:12 PM, Luiz Capitulino wrote: > > > If I didn't make any mistake in the code I'm just enforcing that when > > > you specify "incremental" you also need a new image. > > > There are still other valid cases where they are op

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-27 Thread Paolo Bonzini
On 02/27/2012 01:12 PM, Luiz Capitulino wrote: > > If I didn't make any mistake in the code I'm just enforcing that when > > you specify "incremental" you also need a new image. > > There are still other valid cases where they are optional. > > Which operation will be performed if 'incremental' is

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-27 Thread Luiz Capitulino
On Mon, 27 Feb 2012 06:29:39 -0500 (EST) Federico Simoncelli wrote: > - Original Message - > > From: "Luiz Capitulino" > > To: "Federico Simoncelli" > > Cc: qemu-devel@nongnu.org, mtosa...@redhat.com, pbonz...@redhat.com, > > kw...@redhat.com, arm...@redhat.com > > Sent: Friday, Februa

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-27 Thread Federico Simoncelli
- Original Message - > From: "Luiz Capitulino" > To: "Federico Simoncelli" > Cc: qemu-devel@nongnu.org, mtosa...@redhat.com, pbonz...@redhat.com, > kw...@redhat.com, arm...@redhat.com > Sent: Friday, February 24, 2012 8:01:43 PM > Subject: Re: [PATCH 2/2 v2] Add the blockdev-reopen and b

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Paolo Bonzini
On 02/24/2012 11:30 PM, Eric Blake wrote: > On 02/24/2012 12:01 PM, Luiz Capitulino wrote: >> On Fri, 24 Feb 2012 16:49:04 + >> Federico Simoncelli wrote: >> >>> Signed-off-by: Federico Simoncelli >> >> How does this relate to migrate -b? Should it be deprecated? >> >> Btw, would be nice to h

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Eric Blake
On 02/24/2012 01:26 PM, Luiz Capitulino wrote: > On Fri, 24 Feb 2012 12:40:17 -0700 > Eric Blake wrote: > >> On 02/24/2012 12:01 PM, Luiz Capitulino wrote: >> +BlockDriver *drv; +int i, j, escape; +char new_filename[2048], *filename; >>> >>> I'd use PATH_MAX for new_fil

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Eric Blake
On 02/24/2012 12:01 PM, Luiz Capitulino wrote: > On Fri, 24 Feb 2012 16:49:04 + > Federico Simoncelli wrote: > >> Signed-off-by: Federico Simoncelli > > How does this relate to migrate -b? Should it be deprecated? > > Btw, would be nice to have a 0/2 intro email describing the feature and

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Paolo Bonzini
On 02/24/2012 09:36 PM, Luiz Capitulino wrote: > > > IMO, you could require the filename arguments to be escaped already. > > > > The monitor command was introduced exactly to avoid having to worry > > about details such as escaping. JSON is already supposed to take care > > of those. > > Then t

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Luiz Capitulino
On Fri, 24 Feb 2012 21:32:30 +0100 Paolo Bonzini wrote: > On 02/24/2012 08:01 PM, Luiz Capitulino wrote: > > IMO, you could require the filename arguments to be escaped already. > > The monitor command was introduced exactly to avoid having to worry > about details such as escaping. JSON is alr

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Paolo Bonzini
On 02/24/2012 08:01 PM, Luiz Capitulino wrote: > IMO, you could require the filename arguments to be escaped already. The monitor command was introduced exactly to avoid having to worry about details such as escaping. JSON is already supposed to take care of those. That said, I think Eric is rig

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Luiz Capitulino
On Fri, 24 Feb 2012 12:40:17 -0700 Eric Blake wrote: > On 02/24/2012 12:01 PM, Luiz Capitulino wrote: > > >> +BlockDriver *drv; > >> +int i, j, escape; > >> +char new_filename[2048], *filename; > > > > I'd use PATH_MAX for new_filename's size. > > PATH_MAX need not be defined (and

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Eric Blake
On 02/24/2012 12:01 PM, Luiz Capitulino wrote: >> +BlockDriver *drv; >> +int i, j, escape; >> +char new_filename[2048], *filename; > > I'd use PATH_MAX for new_filename's size. PATH_MAX need not be defined (and on Hurd, it intentionally is not defined); or might be so huge as to be u

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Eric Blake
On 02/24/2012 11:57 AM, Paolo Bonzini wrote: > On 02/24/2012 06:46 PM, Eric Blake wrote: >> I think you need to be more explicit that @new-image-file MUST have >> identical contents as the current image file, for this to be useful, and >> that qemu does not validate whether the new image met those

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Luiz Capitulino
On Fri, 24 Feb 2012 16:49:04 + Federico Simoncelli wrote: > Signed-off-by: Federico Simoncelli How does this relate to migrate -b? Should it be deprecated? Btw, would be nice to have a 0/2 intro email describing the feature and changelog info. > --- > blockdev.c | 107 >

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Paolo Bonzini
On 02/24/2012 06:46 PM, Eric Blake wrote: > I think you need to be more explicit that @new-image-file MUST have > identical contents as the current image file, for this to be useful, and > that qemu does not validate whether the new image met those conditions. > Possible ways to achieve this: Not

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Eric Blake
On 02/24/2012 09:49 AM, Federico Simoncelli wrote: > Signed-off-by: Federico Simoncelli Pretty sparse on the commit message. > +++ b/hmp-commands.hx > @@ -886,6 +886,44 @@ Snapshot device, using snapshot file as target if > provided > ETEXI > > { > +.name = "drive_reopen",

[Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands

2012-02-24 Thread Federico Simoncelli
Signed-off-by: Federico Simoncelli --- blockdev.c | 107 -- hmp-commands.hx | 38 +++ hmp.c| 24 hmp.h|2 + qapi-schema.json | 54 +++ 5 files changed