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 v2 14/13] block: More operations for meta dirty bitmap

2016-01-25 Thread Fam Zheng
Callers can create an iterator of meta bitmap with bdrv_dirty_meta_iter_new(), then use the bdrv_dirty_iter_* operations on it. Meta iterators are also counted by bitmap->active_iterators. Also add a couple of functions to retrieve granularity and count. Signed-off-by: Fam Zheng --- Vladimir,

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(-) > > diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotest

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

2016-01-25 Thread Fam Zheng
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. I have one more question on the

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

2016-01-25 Thread Fam Zheng
On Fri, 01/22 14:34, Vladimir Sementsov-Ogievskiy wrote: > >+void bdrv_create_meta_dirty_bitmap(BdrvDirtyBitmap *bitmap, > >+ int granularity) > >+{ > >+assert(!bitmap->meta); > >+bitmap->meta = hbitmap_create_meta(bitmap->bitmap, > >+

Re: [Qemu-block] [PATCH v2 09/13] block: Add two dirty bitmap getters

2016-01-25 Thread Fam Zheng
On Fri, 01/22 14:45, Vladimir Sementsov-Ogievskiy wrote: > On 20.01.2016 09:11, Fam Zheng wrote: > >For dirty bitmap users to get the size and the name of a > >BdrvDirtyBitmap. > > > >Signed-off-by: Fam Zheng > >Reviewed-by: John Snow > >--- > > block/dirty-bitmap.c | 10 ++ > >

[Qemu-block] [PATCH v9 13/16] block: Use returned *file in bdrv_co_get_block_status

2016-01-25 Thread Fam Zheng
Now that all drivers return the right "file" pointer, we can use it. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- block/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/io.c index ea040be..343ff1f 100644 --- a/block/io.c +++ b/block/io.c @@

[Qemu-block] [PATCH v9 07/16] qed: Assign bs->file->bs to file in bdrv_qed_co_get_block_status

2016-01-25 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/qed.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/qed.c b/block/qed.c index 8f6f841..404be1e 100644 --- a/block/qed.c +++ b/block/qed.c @@ -693,6 +693,7 @@ typedef struct { uint64_t pos

[Qemu-block] [PATCH v9 09/16] vdi: Assign bs->file->bs to file in vdi_co_get_block_status

2016-01-25 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/vdi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/vdi.c b/block/vdi.c index 294c438..b403243 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -551,6 +551,7 @@ static int64_t coroutine_fn vdi_co_get_block_status(BlockDriv

[Qemu-block] [PATCH v9 08/16] sheepdog: Assign bs to file in sd_co_get_block_status

2016-01-25 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/sheepdog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/sheepdog.c b/block/sheepdog.c index 2ea05a6..a0098c1 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2739,6 +2739,9 @@ sd_co_get_block_status(BlockDriv

[Qemu-block] [PATCH v9 16/16] iotests: Add "qemu-img map" test for VMDK extents

2016-01-25 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/059 | 10 ++ tests/qemu-iotests/059.out | 25 + 2 files changed, 35 insertions(+) diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059 index 0ded0c3..0332bbb 100755 --- a/tests/qemu-iotests/059 +++ b/test

[Qemu-block] [PATCH v9 14/16] qemu-img: In "map", use the returned "file" from bdrv_get_block_status

2016-01-25 Thread Fam Zheng
Now all drivers should return a correct "file", we can make use of it, even with the recursion into backing chain above. Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b

[Qemu-block] [PATCH v9 05/16] iscsi: Assign bs to file in iscsi_co_get_block_status

2016-01-25 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/iscsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index e182557..9fe76f4 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -625,6 +625,9 @@ out: if (iTask.task

[Qemu-block] [PATCH v9 15/16] qemu-img: Make MapEntry a QAPI struct

2016-01-25 Thread Fam Zheng
The "flags" bit mask is expanded to two booleans, "data" and "zero"; "bs" is replaced with "filename" string. Refactor the merge conditions in img_map() into entry_mergeable(). Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- qapi/block-core.json | 27

[Qemu-block] [PATCH v9 12/16] vmdk: Return extent's file in bdrv_get_block_status

2016-01-25 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/vmdk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 61ed207..f8f7fcf 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1287,12 +1287,12 @@ static int64_t coroutine_fn vmdk_co_get_block_status(BlockDriv

[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 int64_t coroutine_fn qcow2_co_get_block_st

[Qemu-block] [PATCH v9 11/16] vmdk: Fix calculation of block status's offset

2016-01-25 Thread Fam Zheng
"offset" is the offset of cluster and sector_num doesn't necessarily refer to the start of it, it should add index_in_cluster. Signed-off-by: Fam Zheng --- block/vmdk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index e1d3e27..61ed207 10

[Qemu-block] [PATCH v9 02/16] qcow: Assign bs->file->bs to file in qcow_co_get_block_status

2016-01-25 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/qcow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow.c b/block/qcow.c index 4202797..251910c 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -510,6 +510,7 @@ static int64_t coroutine_fn qco

[Qemu-block] [PATCH v9 10/16] vpc: Assign bs->file->bs to file in vpc_co_get_block_status

2016-01-25 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/vpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/vpc.c b/block/vpc.c index a070307..f504536 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -589,6 +589,7 @@ static int64_t coroutine_fn vpc_co_get_block_status(BlockDr

[Qemu-block] [PATCH v9 04/16] raw: Assign bs to file in raw_co_get_block_status

2016-01-25 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/raw-posix.c | 1 + block/raw_bsd.c | 1 + 2 files changed, 2 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index 3ef9b25..8866121 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -1861,6 +1861,7 @@ static int64_t coroutine_fn raw_

[Qemu-block] [PATCH v9 06/16] parallels: Assign bs->file->bs to file in parallels_co_get_block_status

2016-01-25 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c index e2de308..645521d 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -274,6 +274,7 @@ static

[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 "bs->

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

2016-01-25 Thread Fam Zheng
v9: 01: Add comment for the new parameter, and remove the superfluous reset of 'file'. [Kevin] 04: bs => bs->file->bs. [Kevin] 11: Split the bugfix. [Kevin] 15: Don't corrupt 059.out. [Max] v8: Fix patch 15. [Max] Add Max's rev-by in patch 1. v7: Rebase, update patch 1 for tw

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 --git a/tests/qemu

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 --git a/block/vmdk.c b/block/vmdk.c > > i

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 > > raw_co_get_blo

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

2016-01-25 Thread Fam Zheng
On Tue, 01/26 11:27, Fam Zheng wrote: > On Mon, 01/25 14:04, Kevin Wolf wrote: > > Am 25.01.2016 um 03:44 hat Fam Zheng geschrieben: > > > diff --git a/block/vvfat.c b/block/vvfat.c > > > index 2ea5a4a..b8d29e1 100644 > > > --- a/block/vvfat.c > > > +++ b/block/vvfat.c > > > @@ -2884,7 +2884,7 @@ s

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

2016-01-25 Thread Fam Zheng
On Mon, 01/25 14:04, Kevin Wolf wrote: > 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 dri

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. This

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

2016-01-25 Thread Rudy Zhang
On 16/1/26 上午3:19, John Snow wrote: > > > 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 the

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 bu

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 ha

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

2016-01-25 Thread John Snow
On 01/20/2016 01:11 AM, Fam Zheng wrote: > The added group of operations enables tracking of the changed bits in > the dirty bitmap. > > Signed-off-by: Fam Zheng Reviewed-by: John Snow > --- > block/dirty-bitmap.c | 51 > > include/block

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 > --- > nbd/server.c |

Re: [Qemu-block] [Qemu-devel] [PATCH v2 06/13] HBitmap: Introduce "meta" bitmap to track bit changes

2016-01-25 Thread John Snow
On 01/20/2016 01:11 AM, Fam Zheng wrote: > Upon each bit toggle, the corresponding bit in the meta bitmap will be > set. > > Signed-off-by: Fam Zheng Reviewed-by: John Snow > --- > include/qemu/hbitmap.h | 17 + > util/hbitmap.c | 66 > ++

Re: [Qemu-block] [Qemu-devel] [PATCH v2 02/13] typedefs: Add BdrvDirtyBitmap

2016-01-25 Thread John Snow
On 01/20/2016 01:11 AM, Fam Zheng wrote: > Following patches to refactor and move block dirty bitmap code could use > this. > > Signed-off-by: Fam Zheng > --- > include/block/block.h | 3 +-- > include/qemu/typedefs.h | 1 + > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git

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 + > tests/qemu-io

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

2016-01-25 Thread Eric Blake
On 01/25/2016 11:41 AM, Max Reitz wrote: > The NBD log lines ("/your/source/dir/nbd.c:function():line: error") This line doesn't match the pre- or post-patch sed pattern. Something that would match would be "/your/source/dir/nbd/file.c:function():line: error". Maybe you should tweak the commit m

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 > 2 files c

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

2016-01-25 Thread Eric Blake
On 01/25/2016 11:41 AM, Max Reitz wrote: > 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 alr

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 | 3 +-- > 1 file c

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

2016-01-25 Thread Dr. David Alan Gilbert
* 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 but > > Strictly speaking, after failover, we

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 incremen

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 mi

[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, 81 insertions(+) cre

[Qemu-block] [PATCH 7/8] iotests: Make redirecting qemu's stderr optional

2016-01-25 Thread Max Reitz
Redirecting qemu's stderr to stdout makes working with the stderr output difficult due to the other file descriptor magic performed in _launch_qemu ("ambiguous redirect"). Add an option which specifies whether stderr should be redirected to stdout or not (allowing for other modes to be added in th

[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 Reviewed-by: John S

[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 deletions(-) diff --git a/t

[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 insertion(+), 11 deletion

[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 deletions(-) diff --git a/nbd/

[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 i

[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 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 series:

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 pro

Re: [Qemu-block] [Qemu-devel] [PATCH v5 10/12] fdc: rework pick_geometry

2016-01-25 Thread Eric Blake
On 01/22/2016 01:59 PM, John Snow wrote: > > > On 01/22/2016 03:51 PM, John Snow wrote: >> This one is the crazy one. >> >> fd_revalidate currently uses pick_geometry to tell if the diskette >> geometry has changed upon an eject/insert event, but it won't allow us >> to insert a 1.44MB diskette i

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

2016-01-25 Thread Alex Bennée
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 problems on other architectures. - async: use atomi

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

2016-01-25 Thread Max Reitz
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(-) diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118 index 114d0e2..beb69d0 100755

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

2016-01-25 Thread Max Reitz
On 25.01.2016 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 --git a/tests/qemu-iotests

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

2016-01-25 Thread Max Reitz
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 --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059 > index 0ded0c3.

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 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 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 e1d3e27..f8f7fcf 100644 > --- a/block/vmdk.c > +++ b

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(+) > > diff --git a/block/raw-posix.c b/block/raw-posix.c > index 3e

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 explic

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 disa

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 disa

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 (blockdev-*-

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 0

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 > blockdev-{insert,remove}-medium commands required