Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-29 Thread Kevin Wolf
Am 28.09.2015 um 23:57 hat Jeff Cody geschrieben: > On Sep 28, 2015 5:31 PM, "Kevin Wolf" wrote: > > > > (Responding from mobile phone again) > > > Am 28.09.2015 um 05:29 hat Jeff Cody geschrieben: > > > During mirror, if the target device does not have support zero > > >

Re: [Qemu-block] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-29 Thread Kevin Wolf
Am 28.09.2015 um 19:32 hat Max Reitz geschrieben: > On 28.09.2015 05:29, Jeff Cody wrote: > > During mirror, if the target device does not have support zero > > initialization, a mirror may result in a corrupt image. > > > > For instance, on mirror to a host device with format = raw, whatever > >

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-29 Thread Kevin Wolf
Am 28.09.2015 um 22:31 hat Eric Blake geschrieben: > On 09/28/2015 08:13 AM, Paolo Bonzini wrote: > > > > > > On 28/09/2015 05:29, Jeff Cody wrote: > >> This only occurs under two conditions: > >> > >> 1. 'mode' != "existing" > >> 2. bdrv_has_zero_init(target) == NULL > >> > > > > I'm

Re: [Qemu-block] [PATCH v5 02/38] block: Set BDRV_O_INCOMING in bdrv_fill_options()

2015-09-29 Thread Alberto Garcia
On Fri 18 Sep 2015 05:22:37 PM CEST, Max Reitz wrote: > This flag should not be set for the root BDS only, but for any BDS that > is being created while incoming migration is pending, so setting it is > moved from blockdev_init() to bdrv_fill_options(). > > Signed-off-by: Max Reitz

Re: [Qemu-block] [PATCH v5 03/38] blockdev: Allow creation of BDS trees without BB

2015-09-29 Thread Alberto Garcia
On Fri 18 Sep 2015 05:22:38 PM CEST, Max Reitz wrote: > If the "id" field is missing from the options given to blockdev-add, > just omit the BlockBackend and create the BlockDriverState tree alone. > > However, if "id" is missing, "node-name" must be specified; otherwise, > the

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-29 Thread Paolo Bonzini
On 29/09/2015 10:10, Kevin Wolf wrote: >> When mode == 'existing' for a shallow mirror (sync != 'full'), >> that is the caller stating that the guest-visible contents of the >> destination match the guest-visible contents of the backing >> image. The only sectors to be copied are those that

Re: [Qemu-block] [PATCH v5 17/38] block: Add BlockBackendRootState

2015-09-29 Thread Alberto Garcia
On Tue 22 Sep 2015 05:00:05 PM CEST, Max Reitz wrote: >> The correct way to solve this seems to be that each BB has its own >> I/O throttling filter. Actually, if we could lift the throttling code >> to BlockBackend, that might solve the problem. > > So yes, as long as we have throttling on the

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-29 Thread Paolo Bonzini
On 29/09/2015 11:35, Kevin Wolf wrote: > The caller could be copying the backing file in the background and it > may not yet be finished. Yes, and this is permitted (the destination file of mirroring is opened with BDRV_O_NO_BACKING). Some more assumptions arise when block-job-complete is

Re: [Qemu-block] [PATCH] block: disable I/O limits at the beginning of bdrv_close()

2015-09-29 Thread Kevin Wolf
Am 25.09.2015 um 15:41 hat Alberto Garcia geschrieben: > Disabling I/O limits from a BDS also drains all pending throttled > requests, so it should be done at the beginning of bdrv_close() with > the rest of the bdrv_drain() calls before the BlockDriver is closed. > > Signed-off-by: Alberto

Re: [Qemu-block] [PATCH 10/16] block/io: Make bdrv_requests_pending() public

2015-09-29 Thread Kevin Wolf
Am 23.09.2015 um 17:40 hat Max Reitz geschrieben: > On 17.09.2015 15:48, Kevin Wolf wrote: > > Signed-off-by: Kevin Wolf > > --- > > block/io.c| 2 +- > > include/block/block_int.h | 1 + > > 2 files changed, 2 insertions(+), 1 deletion(-) > > Reviewed-by: Max

Re: [Qemu-block] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-29 Thread Kevin Wolf
Am 23.09.2015 um 18:36 hat Max Reitz geschrieben: > On 17.09.2015 15:48, Kevin Wolf wrote: > > Remember all parent nodes and just change the pointers there instead of > > swapping the contents of the BlockDriverState. > > > > Handling of snapshot=on must be moved further down in bdrv_open() > >

Re: [Qemu-block] [PATCH v5 17/38] block: Add BlockBackendRootState

2015-09-29 Thread Eric Blake
On 09/29/2015 05:17 AM, Alberto Garcia wrote: > On Tue 22 Sep 2015 05:00:05 PM CEST, Max Reitz wrote: > >>> The correct way to solve this seems to be that each BB has its own >>> I/O throttling filter. Actually, if we could lift the throttling code >>> to BlockBackend, that might solve the

Re: [Qemu-block] [PATCH v5 17/38] block: Add BlockBackendRootState

2015-09-29 Thread Kevin Wolf
Am 29.09.2015 um 14:30 hat Eric Blake geschrieben: > On 09/29/2015 05:17 AM, Alberto Garcia wrote: > > On Tue 22 Sep 2015 05:00:05 PM CEST, Max Reitz wrote: > > > >>> The correct way to solve this seems to be that each BB has its own > >>> I/O throttling filter. Actually, if we could lift the

Re: [Qemu-block] [PATCH 09/16] block: Split bdrv_move_feature_fields()

2015-09-29 Thread Kevin Wolf
Am 23.09.2015 um 18:36 hat Max Reitz geschrieben: > On 17.09.2015 15:48, Kevin Wolf wrote: > > After bdrv_swap(), some fields must be moved back to their original BDS > > to compensate for the effects that a swap of the contents of the objects > > has while keeping the old addresses. Other fields

Re: [Qemu-block] [PATCH 12/16] block: Introduce parents list

2015-09-29 Thread Kevin Wolf
Am 28.09.2015 um 15:09 hat Alberto Garcia geschrieben: > On Thu 17 Sep 2015 03:48:16 PM CEST, Kevin Wolf wrote: > > > @@ -1090,6 +1090,7 @@ static BdrvChild *bdrv_attach_child(BlockDriverState > > *parent_bs, > > }; > > > > QLIST_INSERT_HEAD(_bs->children, child, next); > > +

Re: [Qemu-block] [PATCH v5 07/38] block: Make bdrv_is_inserted() recursive

2015-09-29 Thread Alberto Garcia
On Fri 18 Sep 2015 05:22:42 PM CEST, Max Reitz wrote: > If bdrv_is_inserted() is called on the top level BDS, it should make > sure all nodes in the BDS tree are actually inserted. > > Signed-off-by: Max Reitz > --- > block.c | 12 +--- > 1 file changed, 9

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-29 Thread Kevin Wolf
Am 29.09.2015 um 10:42 hat Paolo Bonzini geschrieben: > > > On 29/09/2015 10:10, Kevin Wolf wrote: > >> When mode == 'existing' for a shallow mirror (sync != 'full'), > >> that is the caller stating that the guest-visible contents of the > >> destination match the guest-visible contents of the

Re: [Qemu-block] [PATCH v5 08/38] block/raw_bsd: Drop raw_is_inserted()

2015-09-29 Thread Alberto Garcia
On Fri 18 Sep 2015 05:22:43 PM CEST, Max Reitz wrote: > With the new automatically-recursive implementation of > bdrv_is_inserted() checking by default whether all the children of a BDS > are inserted, we can drop raw's own implementation. > > Signed-off-by: Max Reitz