Re: [Qemu-block] [Qemu-devel] [PATCH] rbd: Detect rbd image resizes and propagate them

2017-09-15 Thread Eric Blake
On 09/15/2017 07:33 AM, Kevin Wolf wrote: > Am 13.09.2017 um 18:44 hat Adam Wolfe Gordon geschrieben: >> Register a watcher with rbd so that we get notified when an image is >> resized. Propagate resizes to parent block devices so that guest devices >> get resized without user intervention. >> >>

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/6] hw/ide: Convert DeviceClass init to realize

2017-09-15 Thread John Snow
On 09/15/2017 05:35 PM, John Snow wrote: > > > On 08/04/2017 06:26 AM, Mao Zhongyi wrote: >> Replace init with realize in IDEDeviceClass, which has errp >> as a parameter. So all the implementations now use error_setg >> instead of error_report for reporting error. >> >> Cc: John Snow

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/6] hw/ide: Convert DeviceClass init to realize

2017-09-15 Thread John Snow
On 09/15/2017 05:42 PM, Eric Blake wrote: > On 09/15/2017 04:35 PM, John Snow wrote: >> >> >> On 08/04/2017 06:26 AM, Mao Zhongyi wrote: >>> Replace init with realize in IDEDeviceClass, which has errp >>> as a parameter. So all the implementations now use error_setg >>> instead of error_report

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/6] hw/ide: Convert DeviceClass init to realize

2017-09-15 Thread Eric Blake
On 09/15/2017 04:35 PM, John Snow wrote: > > > On 08/04/2017 06:26 AM, Mao Zhongyi wrote: >> Replace init with realize in IDEDeviceClass, which has errp >> as a parameter. So all the implementations now use error_setg >> instead of error_report for reporting error. >> >> @@ -2398,7 +2399,7 @@

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/6] hw/ide: Convert DeviceClass init to realize

2017-09-15 Thread John Snow
On 08/04/2017 06:26 AM, Mao Zhongyi wrote: > Replace init with realize in IDEDeviceClass, which has errp > as a parameter. So all the implementations now use error_setg > instead of error_report for reporting error. > > Cc: John Snow > Cc: Markus Armbruster

Re: [Qemu-block] [Qemu-devel] [PATCH 7/6] qemu-iotests: Test change-backing-file command

2017-09-15 Thread Eric Blake
On 09/15/2017 12:02 PM, Kevin Wolf wrote: > This involves a temporary read-write reopen if the backing file link in > the middle of a backing file chain should be changed and is therefore a > good test for the latest bdrv_reopen() vs. op blockers fixes. > > Signed-off-by: Kevin Wolf

Re: [Qemu-block] [Qemu-devel] [PATCH 6/6] block: Fix permissions after bdrv_reopen()

2017-09-15 Thread Eric Blake
On 09/15/2017 05:10 AM, Kevin Wolf wrote: > If we switch between read-only and read-write, the permissions that > image format drivers need on bs->file change, too. Make sure to update > the permissions during bdrv_reopen(). > > Signed-off-by: Kevin Wolf > --- >

Re: [Qemu-block] [Qemu-devel] [PATCH 5/6] block: reopen: Queue children after their parents

2017-09-15 Thread Eric Blake
On 09/15/2017 05:10 AM, Kevin Wolf wrote: > We will calculate the required new permissions in the prepare stage of a > reopen. Required permissions of children can be influenced by the > changes made to their parents, but parents are independent from their > children. This means that permissions

Re: [Qemu-block] [Qemu-devel] [PATCH 4/6] block: Base permissions on rw state after reopen

2017-09-15 Thread Eric Blake
On 09/15/2017 05:10 AM, Kevin Wolf wrote: > When new permissions are calculated during bdrv_reopen(), they need to > be based on the state of the graph as it will be after the reopen has > completed, not on the current state of the involved nodes. > > This patch makes bdrv_is_writable()

Re: [Qemu-block] [Qemu-devel] [PATCH 3/6] block: Add reopen queue to bdrv_check_perm()

2017-09-15 Thread Eric Blake
On 09/15/2017 05:10 AM, Kevin Wolf wrote: > In the context of bdrv_reopen(), we'll have to look at the state of the > graph as it will be after the reopen. This interface addition is in > preparation for the change. > > Signed-off-by: Kevin Wolf > --- > block.c | 34

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: Print full path of bad output if mismatch

2017-09-15 Thread Eric Blake
On 09/15/2017 12:45 AM, Fam Zheng wrote: > So it is easier to copy paste the path. > > Signed-off-by: Fam Zheng > --- > tests/qemu-iotests/check | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check > index

Re: [Qemu-block] [Qemu-devel] [PATCH 2/6] block: Add reopen_queue to bdrv_child_perm()

2017-09-15 Thread Eric Blake
On 09/15/2017 05:10 AM, Kevin Wolf wrote: > In the context of bdrv_reopen(), we'll have to look at the state of the > graph as it will be after the reopen. This interface addition is in > preparation for the change. > > Signed-off-by: Kevin Wolf > --- >

Re: [Qemu-block] [Qemu-devel] [PATCH 1/6] qemu-io: Reset qemuio_blk permissions before each command

2017-09-15 Thread Eric Blake
On 09/15/2017 05:10 AM, Kevin Wolf wrote: > qemu-io provides a 'reopen' command that allows switching from writable > to read-only access. We need to make sure that we don't try to keep > write permissions to a BlockBackend that becomes read-only, otherwise > things are going to fail. > >

[Qemu-block] [PATCH 7/6] qemu-iotests: Test change-backing-file command

2017-09-15 Thread Kevin Wolf
This involves a temporary read-write reopen if the backing file link in the middle of a backing file chain should be changed and is therefore a good test for the latest bdrv_reopen() vs. op blockers fixes. Signed-off-by: Kevin Wolf --- I actually managed to find a simple case

Re: [Qemu-block] [PATCH] rbd: Detect rbd image resizes and propagate them

2017-09-15 Thread Kevin Wolf
Am 13.09.2017 um 18:44 hat Adam Wolfe Gordon geschrieben: > Register a watcher with rbd so that we get notified when an image is > resized. Propagate resizes to parent block devices so that guest devices > get resized without user intervention. > > Signed-off-by: Adam Wolfe Gordon

Re: [Qemu-block] [PATCH] iotests: Print full path of bad output if mismatch

2017-09-15 Thread Fam Zheng
On Fri, 09/15 14:16, Kevin Wolf wrote: > Am 15.09.2017 um 07:45 hat Fam Zheng geschrieben: > > So it is easier to copy paste the path. > > > > Signed-off-by: Fam Zheng > > I don't think I ever tried to do anything with the diff that would have > required the full path, but if

Re: [Qemu-block] [PATCH] iotests: Print full path of bad output if mismatch

2017-09-15 Thread Kevin Wolf
Am 15.09.2017 um 07:45 hat Fam Zheng geschrieben: > So it is easier to copy paste the path. > > Signed-off-by: Fam Zheng I don't think I ever tried to do anything with the diff that would have required the full path, but if you say so... :-) Thanks, applied to the block

Re: [Qemu-block] [PATCH v2 0/3] iotests: cure s390x failures by switching to ccw/aliases

2017-09-15 Thread Kevin Wolf
Am 13.09.2017 um 11:10 hat Cornelia Huck geschrieben: > Recent changes in s390x made pci support dependant on the zpci cpu > feature, which is not provided on all models (and not on by default). > This means we cannot instatiate pci devices on a standard qemu > invocation for s390x. Moreover, the

[Qemu-block] [PATCH 6/6] block: Fix permissions after bdrv_reopen()

2017-09-15 Thread Kevin Wolf
If we switch between read-only and read-write, the permissions that image format drivers need on bs->file change, too. Make sure to update the permissions during bdrv_reopen(). Signed-off-by: Kevin Wolf --- include/block/block.h | 1 + block.c | 64

[Qemu-block] [PATCH 0/6] block: Fix permissions after ro/rw reopen

2017-09-15 Thread Kevin Wolf
bdrv_reopen() can switch nodes between read-only and read-write modes. This has implications for the required permissions on their child nodes. For example, a qcow2 node requests write permissions on bs->file only if it is writable itself. This means that during bdrv_reopen(), the permissions

[Qemu-block] [PATCH 2/6] block: Add reopen_queue to bdrv_child_perm()

2017-09-15 Thread Kevin Wolf
In the context of bdrv_reopen(), we'll have to look at the state of the graph as it will be after the reopen. This interface addition is in preparation for the change. Signed-off-by: Kevin Wolf --- include/block/block_int.h | 7 +++ block.c | 19

[Qemu-block] [PATCH 3/6] block: Add reopen queue to bdrv_check_perm()

2017-09-15 Thread Kevin Wolf
In the context of bdrv_reopen(), we'll have to look at the state of the graph as it will be after the reopen. This interface addition is in preparation for the change. Signed-off-by: Kevin Wolf --- block.c | 34 +++--- 1 file changed, 19

[Qemu-block] [PATCH 5/6] block: reopen: Queue children after their parents

2017-09-15 Thread Kevin Wolf
We will calculate the required new permissions in the prepare stage of a reopen. Required permissions of children can be influenced by the changes made to their parents, but parents are independent from their children. This means that permissions need to be calculated top-down. In order to achieve

[Qemu-block] [PATCH 4/6] block: Base permissions on rw state after reopen

2017-09-15 Thread Kevin Wolf
When new permissions are calculated during bdrv_reopen(), they need to be based on the state of the graph as it will be after the reopen has completed, not on the current state of the involved nodes. This patch makes bdrv_is_writable() optionally accept a BlockReopenQueue from which the new flags

Re: [Qemu-block] [PATCH v7 0/4] Add shrink image for qcow2

2017-09-15 Thread Pavel Butsykin
On 17.08.2017 12:15, Pavel Butsykin wrote: This patch add shrinking of the image file for qcow2. As a result, this allows us to reduce the virtual image size and free up space on the disk without copying the image. Image can be fragmented and shrink is done by punching holes in the image file.

Re: [Qemu-block] [PATCH v2 0/3] iotests: cure s390x failures by switching to ccw/aliases

2017-09-15 Thread QingFeng Hao
Reviewed-by: QingFeng Hao for the series of patches. Thanks 在 2017/9/13 17:10, Cornelia Huck 写道: Recent changes in s390x made pci support dependant on the zpci cpu feature, which is not provided on all models (and not on by default). This means we cannot instatiate