Re: [Qemu-block] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Jeff Cody
On Wed, Feb 24, 2016 at 08:28:20PM +0100, Peter Lieven wrote: > Am 24.02.2016 um 14:40 schrieb Jeff Cody: > > On Wed, Feb 24, 2016 at 02:07:18PM +0100, Kevin Wolf wrote: > >> Am 24.02.2016 um 13:44 hat Peter Lieven geschrieben: > >>> if the size is forced I would set the chs values to max. this

[Qemu-block] [PULL 15/23] virtio-blk: do not use vring in dataplane

2016-02-24 Thread Michael S. Tsirkin
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Fam Zheng Acked-by: Stefan Hajnoczi ---

[Qemu-block] [PULL 14/23] virtio-blk: fix "disabled data plane" mode

2016-02-24 Thread Michael S. Tsirkin
From: Paolo Bonzini In disabled mode, virtio-blk dataplane seems to be enabled, but flow actually goes through the normal virtio path. This patch simplifies a bit the handling of disabled mode. In disabled mode, virtio_blk_handle_output might be called even if s->dataplane

[Qemu-block] [PULL 11/23] vring: make vring_enable_notification return void

2016-02-24 Thread Michael S. Tsirkin
From: Paolo Bonzini Make the API more similar to the regular virtqueue API. This will help when modifying the code to not use vring.c anymore. Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[Qemu-block] [PULL 10/23] block-migration: acquire AioContext as necessary

2016-02-24 Thread Michael S. Tsirkin
From: Paolo Bonzini This is needed because dataplane will run during block migration as well. The block device migration code is quite liberal in taking the iothread mutex. For simplicity, keep it the same way, even though one could actually choose between the BQL (for

Re: [Qemu-block] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Peter Lieven
Am 24.02.2016 um 14:07 schrieb Kevin Wolf: > Am 24.02.2016 um 13:44 hat Peter Lieven geschrieben: >> if the size is forced I would set the chs values to max. this way no >> new creator String is needed and it is even backwards compatible. this >> is what disk2vhd does. > Does disk2vhd do it this

Re: [Qemu-block] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Peter Lieven
Am 24.02.2016 um 14:40 schrieb Jeff Cody: > On Wed, Feb 24, 2016 at 02:07:18PM +0100, Kevin Wolf wrote: >> Am 24.02.2016 um 13:44 hat Peter Lieven geschrieben: >>> if the size is forced I would set the chs values to max. this way no >>> new creator String is needed and it is even backwards

Re: [Qemu-block] [PATCH 1/2] hmp: 'drive_add -n' for creating a node without BB

2016-02-24 Thread Kevin Wolf
Am 24.02.2016 um 18:50 hat Max Reitz geschrieben: > On 23.02.2016 18:16, Kevin Wolf wrote: > > This patch adds an option to the drive_add HMP command to create only a > > BlockDriverState without a BlockBackend on top. > > > > The motivation for this is that libvirt needs to specify options to a

Re: [Qemu-block] [PATCH 2/2] hmp: Extend drive_del to delete nodes without BB

2016-02-24 Thread Kevin Wolf
Am 24.02.2016 um 18:54 hat Max Reitz geschrieben: > On 23.02.2016 18:16, Kevin Wolf wrote: > > Now that we can use drive_add to create new nodes without a BB, we also > > want to be able to delete such nodes again. > > > > Signed-off-by: Kevin Wolf > > --- > > blockdev.c | 9

Re: [Qemu-block] [PATCH 2/2] hmp: Extend drive_del to delete nodes without BB

2016-02-24 Thread Max Reitz
On 23.02.2016 18:16, Kevin Wolf wrote: > Now that we can use drive_add to create new nodes without a BB, we also > want to be able to delete such nodes again. > > Signed-off-by: Kevin Wolf > --- > blockdev.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git

Re: [Qemu-block] [PATCH 1/2] hmp: 'drive_add -n' for creating a node without BB

2016-02-24 Thread Max Reitz
On 23.02.2016 18:16, Kevin Wolf wrote: > This patch adds an option to the drive_add HMP command to create only a > BlockDriverState without a BlockBackend on top. > > The motivation for this is that libvirt needs to specify options to a > migration target (specifically, detect-zeroes).

Re: [Qemu-block] [Qemu-devel] [PATCH v3 2/3] block/backup: avoid copying less than full target clusters

2016-02-24 Thread Eric Blake
On 02/23/2016 05:52 PM, John Snow wrote: > "Couldn't determine the cluster size of the target image, which has no > backing file" is more correct. The problem is not why we couldn't > determine it, but instead that we were unable to AND there is no backing > file, so our inability to determine it

[Qemu-block] [PATCH v2 4/4] block/vpc: add tests for image creation force_size parameter

2016-02-24 Thread Jeff Cody
Signed-off-by: Jeff Cody --- tests/qemu-iotests/146 | 52 ++ tests/qemu-iotests/146.out | 32 2 files changed, 84 insertions(+) diff --git a/tests/qemu-iotests/146 b/tests/qemu-iotests/146 index

[Qemu-block] [PATCH v2 0/4] VHD/VPC format compatibility

2016-02-24 Thread Jeff Cody
Changes from v2: Patches 2,4: Just use qemu-io instead of a qemu instance (thanks Kevin, Max) Patch 3: Use "qem2" for the creator app field, when forcing the size (thanks Kevin) This is a long-standing issue that has come up many times, and has had several different patches posted to fix it.

[Qemu-block] [PATCH v2 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images

2016-02-24 Thread Jeff Cody
This tests auto-detection, and overrides, of VHD image sizes created by Virtual PC and Hyper-V. This adds two sample images: hyperv2012r2-dynamic.vhd.bz2 - dynamic VHD image created with Hyper-V virtualpc-dynamic.vhd.bz2- dynamic VHD image created with Virtual PC Signed-off-by: Jeff Cody

[Qemu-block] [PATCH v2 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Jeff Cody
When QEMU creates a VHD image, it goes by the original spec, calculating the current_size based on the nearest CHS geometry (with an exception for disks > 127GB). Apparently, Azure will only allow images that are sized to the nearest MB, and the current_size as calculated from CHS cannot

[Qemu-block] [PATCH v2 1/4] block/vpc: choose size calculation method based on creator_app field

2016-02-24 Thread Jeff Cody
The VHD file format is used by both Virtual PC, and Hyper-V. However, how the virtual disk size is calculated varies between the two. Virtual PC uses the CHS drive parameters to determine the drive size. Hyper-V, on the other hand, uses the current_size field in the footer when determining image

Re: [Qemu-block] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images

2016-02-24 Thread Max Reitz
On 24.02.2016 16:40, Jeff Cody wrote: > On Wed, Feb 24, 2016 at 11:23:29AM +0100, Kevin Wolf wrote: >> Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: >>> This tests auto-detection, and overrides, of VHD image sizes created >>> by Virtual PC and Hyper-V. >>> >>> This adds two sample images: >>>

Re: [Qemu-block] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images

2016-02-24 Thread Jeff Cody
On Wed, Feb 24, 2016 at 04:44:21PM +0100, Max Reitz wrote: > On 24.02.2016 16:40, Jeff Cody wrote: > > On Wed, Feb 24, 2016 at 11:23:29AM +0100, Kevin Wolf wrote: > >> Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: > >>> This tests auto-detection, and overrides, of VHD image sizes created > >>>

Re: [Qemu-block] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images

2016-02-24 Thread Max Reitz
On 24.02.2016 16:40, Jeff Cody wrote: > On Wed, Feb 24, 2016 at 11:23:29AM +0100, Kevin Wolf wrote: >> Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: >>> This tests auto-detection, and overrides, of VHD image sizes created >>> by Virtual PC and Hyper-V. >>> >>> This adds two sample images: >>>

Re: [Qemu-block] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images

2016-02-24 Thread Jeff Cody
On Wed, Feb 24, 2016 at 11:23:29AM +0100, Kevin Wolf wrote: > Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: > > This tests auto-detection, and overrides, of VHD image sizes created > > by Virtual PC and Hyper-V. > > > > This adds two sample images: > > > > hyperv2012r2-dynamic.vhd.bz2 -

Re: [Qemu-block] [Qemu-devel] [PATCH v3 07/14] blockdev: Add list of monitor-owned BlockBackends

2016-02-24 Thread Max Reitz
On 24.02.2016 10:28, Markus Armbruster wrote: > Max Reitz writes: > >> On 23.02.2016 10:48, Markus Armbruster wrote: [...] >>> Can you explain the *actual* difference between blk_backends and >>> monitor_block_backends? "Actual" in the sense of difference in contents >>>

Re: [Qemu-block] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Jeff Cody
On Wed, Feb 24, 2016 at 02:07:18PM +0100, Kevin Wolf wrote: > Am 24.02.2016 um 13:44 hat Peter Lieven geschrieben: > > if the size is forced I would set the chs values to max. this way no > > new creator String is needed and it is even backwards compatible. this > > is what disk2vhd does. > >

Re: [Qemu-block] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Peter Lieven
if the size is forced I would set the chs values to max. this way no new creator String is needed and it is even backwards compatible. this is what disk2vhd does. Peter > Am 24.02.2016 um 13:24 schrieb Jeff Cody : > >> On Wed, Feb 24, 2016 at 11:19:37AM +0100, Kevin Wolf

Re: [Qemu-block] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Jeff Cody
On Wed, Feb 24, 2016 at 11:19:37AM +0100, Kevin Wolf wrote: > Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: > > When QEMU creates a VHD image, it goes by the original spec, > > calculating the current_size based on the nearest CHS geometry (with an > > exception for disks > 127GB). > > > >

Re: [Qemu-block] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images

2016-02-24 Thread Jeff Cody
On Wed, Feb 24, 2016 at 11:23:29AM +0100, Kevin Wolf wrote: > Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: > > This tests auto-detection, and overrides, of VHD image sizes created > > by Virtual PC and Hyper-V. > > > > This adds two sample images: > > > > hyperv2012r2-dynamic.vhd.bz2 -

Re: [Qemu-block] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images

2016-02-24 Thread Kevin Wolf
Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: > This tests auto-detection, and overrides, of VHD image sizes created > by Virtual PC and Hyper-V. > > This adds two sample images: > > hyperv2012r2-dynamic.vhd.bz2 - dynamic VHD image created with Hyper-V > virtualpc-dynamic.vhd.bz2-

Re: [Qemu-block] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Kevin Wolf
Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: > When QEMU creates a VHD image, it goes by the original spec, > calculating the current_size based on the nearest CHS geometry (with an > exception for disks > 127GB). > > Apparently, Azure will only allow images that are sized to the nearest >

Re: [Qemu-block] [Qemu-devel] [PATCH v3 07/14] blockdev: Add list of monitor-owned BlockBackends

2016-02-24 Thread Kevin Wolf
Am 24.02.2016 um 10:28 hat Markus Armbruster geschrieben: > Max Reitz writes: > > > On 23.02.2016 10:48, Markus Armbruster wrote: > >> Max Reitz writes: > >> > >>> On 22.02.2016 09:24, Markus Armbruster wrote: > Max Reitz writes: >

Re: [Qemu-block] [Qemu-devel] [PATCH v3 07/14] blockdev: Add list of monitor-owned BlockBackends

2016-02-24 Thread Markus Armbruster
Max Reitz writes: > On 23.02.2016 10:48, Markus Armbruster wrote: >> Max Reitz writes: >> >>> On 22.02.2016 09:24, Markus Armbruster wrote: Max Reitz writes: > On 17.02.2016 17:20, Kevin Wolf wrote: >> Am 17.02.2016 um