Re: [Qemu-devel] [PATCH v2 1/2] qapi: Introduce blockdev-group-snapshot-sync command

2012-02-27 Thread Stefan Hajnoczi
On Sun, Feb 26, 2012 at 7:31 PM, Jeff Cody jc...@redhat.com wrote: Do you have automated tests for this feature? +/* + * Add new bs contents at the top of an image chain while the chain is live, + * while keeping required fields on the top layer. Please also document the swap behavior. It's

Re: [Qemu-devel] [PATCH v2 1/2] qapi: Introduce blockdev-group-snapshot-sync command

2012-02-27 Thread Jeff Cody
On 02/27/2012 06:13 AM, Stefan Hajnoczi wrote: On Sun, Feb 26, 2012 at 7:31 PM, Jeff Cody jc...@redhat.com wrote: Do you have automated tests for this feature? No, not yet. The testing has been manual. +/* + * Add new bs contents at the top of an image chain while the chain is live, +

Re: [Qemu-devel] [PATCH v2 1/2] qapi: Introduce blockdev-group-snapshot-sync command

2012-02-27 Thread Stefan Hajnoczi
On Mon, Feb 27, 2012 at 2:26 PM, Jeff Cody jc...@redhat.com wrote: On 02/27/2012 06:13 AM, Stefan Hajnoczi wrote: On Sun, Feb 26, 2012 at 7:31 PM, Jeff Cody jc...@redhat.com wrote: Do you have automated tests for this feature? No, not yet.  The testing has been manual. For image streaming

Re: [Qemu-devel] [PATCH v2 1/2] qapi: Introduce blockdev-group-snapshot-sync command

2012-02-27 Thread Jeff Cody
On 02/27/2012 09:40 AM, Stefan Hajnoczi wrote: On Mon, Feb 27, 2012 at 2:26 PM, Jeff Cody jc...@redhat.com wrote: On 02/27/2012 06:13 AM, Stefan Hajnoczi wrote: On Sun, Feb 26, 2012 at 7:31 PM, Jeff Cody jc...@redhat.com wrote: Do you have automated tests for this feature? No, not yet.

Re: [Qemu-devel] [PATCH v2 1/2] qapi: Introduce blockdev-group-snapshot-sync command

2012-02-27 Thread Stefan Hajnoczi
On Mon, Feb 27, 2012 at 3:23 PM, Jeff Cody jc...@redhat.com wrote: On 02/27/2012 09:40 AM, Stefan Hajnoczi wrote: On Mon, Feb 27, 2012 at 2:26 PM, Jeff Cody jc...@redhat.com wrote: On 02/27/2012 06:13 AM, Stefan Hajnoczi wrote: On Sun, Feb 26, 2012 at 7:31 PM, Jeff Cody jc...@redhat.com wrote:

Re: [Qemu-devel] [PATCH v2 1/2] qapi: Introduce blockdev-group-snapshot-sync command

2012-02-27 Thread Kevin Wolf
Am 26.02.2012 20:31, schrieb Jeff Cody: This is a QAPI/QMP only command to take a snapshot of a group of devices. This is similar to the blockdev-snapshot-sync command, except blockdev-group-snapshot-sync accepts a list devices, filenames, and formats. It is attempted to keep the snapshot

Re: [Qemu-devel] [PATCH v2 1/2] qapi: Introduce blockdev-group-snapshot-sync command

2012-02-27 Thread Paolo Bonzini
On 02/27/2012 04:46 PM, Kevin Wolf wrote: +/* + * Now we will drain, flush, pivot everything - we are committed at this + * point. + */ +bdrv_drain_all(); I would feel more comfortable if we could do the bdrv_drain_all() at the very beginning of the function.

Re: [Qemu-devel] [PATCH v2 1/2] qapi: Introduce blockdev-group-snapshot-sync command

2012-02-27 Thread Jeff Cody
On 02/27/2012 10:46 AM, Kevin Wolf wrote: Am 26.02.2012 20:31, schrieb Jeff Cody: This is a QAPI/QMP only command to take a snapshot of a group of devices. This is similar to the blockdev-snapshot-sync command, except blockdev-group-snapshot-sync accepts a list devices, filenames, and

Re: [Qemu-devel] [PATCH v2 1/2] qapi: Introduce blockdev-group-snapshot-sync command

2012-02-27 Thread Kevin Wolf
Am 27.02.2012 18:02, schrieb Jeff Cody: + +/* keep the same entry in bdrv_states */ +pstrcpy(tmp.device_name, sizeof(tmp.device_name), bs_top-device_name); +tmp.list = bs_top-list; + +/* swap contents of the fixed new bs and the current top */ +*bs_new = *bs_top; +

Re: [Qemu-devel] [PATCH v2 1/2] qapi: Introduce blockdev-group-snapshot-sync command

2012-02-27 Thread Jeff Cody
On 02/27/2012 12:22 PM, Kevin Wolf wrote: Am 27.02.2012 18:02, schrieb Jeff Cody: + +/* keep the same entry in bdrv_states */ +pstrcpy(tmp.device_name, sizeof(tmp.device_name), bs_top-device_name); +tmp.list = bs_top-list; + +/* swap contents of the fixed new bs and the

[Qemu-devel] [PATCH v2 1/2] qapi: Introduce blockdev-group-snapshot-sync command

2012-02-26 Thread Jeff Cody
This is a QAPI/QMP only command to take a snapshot of a group of devices. This is similar to the blockdev-snapshot-sync command, except blockdev-group-snapshot-sync accepts a list devices, filenames, and formats. It is attempted to keep the snapshot of the group atomic; if the creation or open of