[Qemu-block] [PATCH v9 01/16] block: Add "file" output parameter to block status query functions

2016-01-25 Thread Fam Zheng
The added parameter can be used to return the BDS pointer which the valid offset is referring to. Its value should be ignored unless BDRV_BLOCK_OFFSET_VALID in ret is set. Until block drivers fill in the right value, let's clear it explicitly right before calling .bdrv_get_block_status. The

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: Limit supported formats for 118

2016-01-25 Thread Markus Armbruster
Max Reitz writes: > Image formats used in test 118 need to support image creation. > > Reported-by: Markus Armbruster > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/118 | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >

Re: [Qemu-block] [PATCH v2 08/13] block: Support meta dirty bitmap

2016-01-25 Thread Vladimir Sementsov-Ogievskiy
On 26.01.2016 09:25, Fam Zheng wrote: On Fri, 01/22 15:05, Vladimir Sementsov-Ogievskiy wrote: In my migration series I need iterators, get granularity, and something like hbitmap_count for meta bitmaps. You can add them here if you want, or I can add them in my series. Okay, I can add that.

[Qemu-block] [PATCH v9 03/16] qcow2: Assign bs->file->bs to file in qcow2_co_get_block_status

2016-01-25 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/qcow2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2.c b/block/qcow2.c index d4ea6b4..8babecd 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1349,6 +1349,7 @@ static

Re: [Qemu-block] [PATCH v8 11/15] vmdk: Return extent's file in bdrv_get_block_status

2016-01-25 Thread Fam Zheng
On Mon, 01/25 14:28, Kevin Wolf wrote: > Am 25.01.2016 um 03:44 hat Fam Zheng geschrieben: > > Signed-off-by: Fam Zheng > > Reviewed-by: Max Reitz > > --- > > block/vmdk.c | 10 ++ > > 1 file changed, 6 insertions(+), 4 deletions(-) > > > > diff

Re: [Qemu-block] [PATCH v8 15/15] iotests: Add "qemu-img map" test for VMDK extents

2016-01-25 Thread Fam Zheng
On Mon, 01/25 15:11, Max Reitz wrote: > On 25.01.2016 03:44, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > --- > > tests/qemu-iotests/059 | 10 ++ > > tests/qemu-iotests/059.out | 26 ++ > > 2 files changed, 36 insertions(+) > > > > diff

Re: [Qemu-block] [PATCH v8 04/15] raw: Assign bs to file in raw_co_get_block_status

2016-01-25 Thread Fam Zheng
On Mon, 01/25 14:17, Kevin Wolf wrote: > Am 25.01.2016 um 03:44 hat Fam Zheng geschrieben: > > diff --git a/block/raw_bsd.c b/block/raw_bsd.c > > index 9a8933b..fd355d5 100644 > > --- a/block/raw_bsd.c > > +++ b/block/raw_bsd.c > > @@ -119,6 +119,7 @@ static int64_t coroutine_fn > >

Re: [Qemu-block] RFC: Operation Blockers in QEMU Block Nodes

2016-01-25 Thread Alberto Garcia
Hi, I'm late to the party but I wanted to say that I generally like the idea of expressing the notion of op blockers in terms of the specific things that they allow and require in each one of the affected nodes. I don't know if all current operations can be expressed easily with these semantics,

Re: [Qemu-block] [PATCH v8 04/15] raw: Assign bs to file in raw_co_get_block_status

2016-01-25 Thread Kevin Wolf
Am 25.01.2016 um 03:44 hat Fam Zheng geschrieben: > Reviewed-by: Eric Blake > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Fam Zheng > --- > block/raw-posix.c | 1 + > block/raw_bsd.c | 1 + > 2 files changed, 2 insertions(+) > >

Re: [Qemu-block] [PATCH v8 00/15] qemu-img map: Allow driver to return file of the allocated block

2016-01-25 Thread Kevin Wolf
Am 25.01.2016 um 03:44 hat Fam Zheng geschrieben: > v8: Fix patch 15. [Max] > Add Max's rev-by in patch 1. > > v7: Rebase, update patch 1 for two new bdrv_get_block_status_above() callers > in > qemu-img.c. [Max] > Add Max's rev-by in patch 12. > > Original cover letter >

Re: [Qemu-block] [PATCH v8 01/15] block: Add "file" output parameter to block status query functions

2016-01-25 Thread Kevin Wolf
Am 25.01.2016 um 03:44 hat Fam Zheng geschrieben: > The added parameter can be used to return the BDS pointer which the > valid offset is referring to. Its value should be ignored unless > BDRV_BLOCK_OFFSET_VALID in ret is set. > > Until block drivers fill in the right value, let's clear it

Re: [Qemu-block] [PATCH v8 11/15] vmdk: Return extent's file in bdrv_get_block_status

2016-01-25 Thread Kevin Wolf
Am 25.01.2016 um 03:44 hat Fam Zheng geschrieben: > Signed-off-by: Fam Zheng > Reviewed-by: Max Reitz > --- > block/vmdk.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/block/vmdk.c b/block/vmdk.c > index

Re: [Qemu-block] [Qemu-devel] [PATCH 8/8] iotests: Add test for a nonexistent NBD export

2016-01-25 Thread Eric Blake
On 01/25/2016 11:41 AM, Max Reitz wrote: > Trying to connect to a nonexistent NBD export should not crash the > server. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/143 | 73 > ++ > tests/qemu-iotests/143.out | 7

Re: [Qemu-block] COLO: how to flip a secondary to a primary?

2016-01-25 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > On 01/23/2016 03:35 AM, Dr. David Alan Gilbert wrote: > > Hi, > > I've been looking at what's needed to add a new secondary after > > a primary failed; from the block side it doesn't look as hard > > as I'd expected, perhaps you can tell me if I'm

Re: [Qemu-block] [Qemu-devel] [PATCH 1/8] nbd: client_close on error in nbd_co_client_start

2016-01-25 Thread Eric Blake
On 01/25/2016 11:41 AM, Max Reitz wrote: > Use client_close() if an error in nbd_co_client_start() occurs instead > of manually inlining parts of it. This fixes an assertion error on the > server side if nbd_negotiate() fails. > > Signed-off-by: Max Reitz > --- > nbd/server.c

Re: [Qemu-block] [Qemu-devel] [PATCH 4/8] iotests: Move _filter_nbd into common.filter

2016-01-25 Thread Eric Blake
On 01/25/2016 11:41 AM, Max Reitz wrote: > _filter_nbd can be useful for other NBD tests, too, therefore it should > reside in common.filter. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/083 | 12 > tests/qemu-iotests/common.filter | 12

[Qemu-block] [PATCH 5/8] iotests: Make _filter_nbd drop log lines

2016-01-25 Thread Max Reitz
The NBD log lines ("/your/source/dir/nbd.c:function():line: error") should not be converted to empty lines but removed altogether. Signed-off-by: Max Reitz --- tests/qemu-iotests/083.out | 10 -- tests/qemu-iotests/common.filter | 2 +- 2 files changed, 1

[Qemu-block] [PATCH 4/8] iotests: Move _filter_nbd into common.filter

2016-01-25 Thread Max Reitz
_filter_nbd can be useful for other NBD tests, too, therefore it should reside in common.filter. Signed-off-by: Max Reitz --- tests/qemu-iotests/083 | 12 tests/qemu-iotests/common.filter | 12 2 files changed, 12 insertions(+), 12

[Qemu-block] [PATCH 6/8] iotests: Make _filter_nbd support more URL types

2016-01-25 Thread Max Reitz
This function should support URLs of the "nbd://" format (without swallowing the export name), and for "nbd:///" URLs it should replace "?socket=$TEST_DIR" by "?socket=TEST_DIR" because putting the Unix socket files into the test directory makes sense. Signed-off-by: Max Reitz

[Qemu-block] [PATCH 8/8] iotests: Add test for a nonexistent NBD export

2016-01-25 Thread Max Reitz
Trying to connect to a nonexistent NBD export should not crash the server. Signed-off-by: Max Reitz --- tests/qemu-iotests/143 | 73 ++ tests/qemu-iotests/143.out | 7 + tests/qemu-iotests/group | 1 + 3 files changed,

[Qemu-block] [PATCH 0/8] nbd: Fix failed assertion on negotiation error

2016-01-25 Thread Max Reitz
An error during negotiation, e.g. by the client trying to open an export that does not exist, should not lead to a crash of the server process. The middle six patches of this series are taken from my series "block: Rework bdrv_close_all()", so here is a git-backport-diff against v7 of that

[Qemu-block] [PATCH 3/8] iotests: Change coding style of _filter_nbd in 083

2016-01-25 Thread Max Reitz
In order to be able to move _filter_nbd to common.filter in the next patch, its coding style needs to be adapted to that of common.filter. That means, we have to convert tabs to four spaces, adjust the alignment of the last line (done with spaces already, assuming one tab equals eight spaces), fix

[Qemu-block] [PATCH 1/8] nbd: client_close on error in nbd_co_client_start

2016-01-25 Thread Max Reitz
Use client_close() if an error in nbd_co_client_start() occurs instead of manually inlining parts of it. This fixes an assertion error on the server side if nbd_negotiate() fails. Signed-off-by: Max Reitz --- nbd/server.c | 3 +-- 1 file changed, 1 insertion(+), 2

[Qemu-block] [PATCH 2/8] iotests: Rename filter_nbd to _filter_nbd in 083

2016-01-25 Thread Max Reitz
In the patch after the next, this function is moved to common.filter. Therefore, its name should be preceded by an underscore to signify its global availability. To keep the code motion patch clean, we cannot rename it in the same patch, so we need to choose some order of renaming vs. motion. It

Re: [Qemu-block] [RFC PATCH 4/4] tsan: various fixes for make check

2016-01-25 Thread Paolo Bonzini
On 25/01/2016 17:49, Alex Bennée wrote: > After building with the ThreadSanitizer I ran make check and started > going through the failures reported. Most are failures to use atomic > primitives to access variables previously atomically set. While this > likely will work on x86 it could cause

Re: [Qemu-block] [Qemu-devel] [PATCH 1/8] nbd: client_close on error in nbd_co_client_start

2016-01-25 Thread Daniel P. Berrange
On Mon, Jan 25, 2016 at 07:41:08PM +0100, Max Reitz wrote: > Use client_close() if an error in nbd_co_client_start() occurs instead > of manually inlining parts of it. This fixes an assertion error on the > server side if nbd_negotiate() fails. > > Signed-off-by: Max Reitz >

Re: [Qemu-block] [Qemu-devel] [Questions] Several questions about incremental backup

2016-01-25 Thread John Snow
On 01/25/2016 02:35 AM, Rudy Zhang wrote: > I am reading and testing the function: incremental backup in qemu-2.5. > But I have serveral questions about it. > 1. If I want to start image backup, at first I need to start full mode backup >and then, add a bitmap to trace io, next start

Re: [Qemu-block] COLO: how to flip a secondary to a primary?

2016-01-25 Thread Li Zhijian
On 01/26/2016 04:20 AM, Dr. David Alan Gilbert wrote: * Li Zhijian (lizhij...@cn.fujitsu.com) wrote: On 01/25/2016 09:32 AM, Wen Congyang wrote: f) I've not thought about the colo-proxy that much yet - I guess that existing connections need to keep their sequence number offset

Re: [Qemu-block] COLO: how to flip a secondary to a primary?

2016-01-25 Thread Wen Congyang
On 01/26/2016 02:59 AM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujitsu.com) wrote: >> On 01/23/2016 03:35 AM, Dr. David Alan Gilbert wrote: >>> Hi, >>> I've been looking at what's needed to add a new secondary after >>> a primary failed; from the block side it doesn't look as

Re: [Qemu-block] [PATCH v3 2/4] blockdev: Fix 'change' for slot devices

2016-01-25 Thread Alberto Garcia
On Fri 22 Jan 2016 11:50:48 PM CET, Max Reitz wrote: > 'change' and related operations did not work when used on guest devices > featuring removable media but no actual tray, because > blk_dev_is_tray_open() always returned false for them and the >

Re: [Qemu-block] [PATCH] vmdk: Fix converting to streamOptimized

2016-01-25 Thread Kevin Wolf
Am 25.01.2016 um 03:26 hat Fam Zheng geschrieben: > Commit d62d9dc4b8 lifted streamOptimized images's version to 3, but we > now refuse to open version 3 images read-write. We need to make > streamOptimized an exception to allow converting to it. This fixes the > accidentally broken iotests case

Re: [Qemu-block] [PATCH v3 0/4] blockdev: Fix 'change' for slot devices

2016-01-25 Thread Kevin Wolf
Am 22.01.2016 um 23:50 hat Max Reitz geschrieben: > The series "BlockBackend and media" intended all block devices with > removable media to implement a tray model; if the devices does not have > a tray, it should emulate one. > > While this may make sense from a technical perspective

Re: [Qemu-block] [PATCH v13 00/10] Block replication for continuous checkpoints

2016-01-25 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > On 01/22/2016 11:14 PM, Dr. David Alan Gilbert wrote: > > Hi, > > I can trigger a segfault if I wire in the block replication together with > > a quorum instance; it only triggers with both of them present but, > > it looks like the problem is a

Re: [Qemu-block] [PATCH v13 00/10] Block replication for continuous checkpoints

2016-01-25 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > On 01/22/2016 11:14 PM, Dr. David Alan Gilbert wrote: > > Hi, > > I can trigger a segfault if I wire in the block replication together with > > a quorum instance; it only triggers with both of them present but, > > it looks like the problem is a

Re: [Qemu-block] [PATCH] vmdk: Fix converting to streamOptimized

2016-01-25 Thread Fam Zheng
On Mon, 01/25 12:16, Kevin Wolf wrote: > Am 25.01.2016 um 03:26 hat Fam Zheng geschrieben: > > Commit d62d9dc4b8 lifted streamOptimized images's version to 3, but we > > now refuse to open version 3 images read-write. We need to make > > streamOptimized an exception to allow converting to it.