Re: [Qemu-block] [Qemu-devel] [Patch v12 00/10] Block replication for continuous checkpoints

2015-12-01 Thread Wen Congyang
On 12/02/2015 09:00 AM, Wen Congyang wrote: > On 12/01/2015 06:40 PM, Dr. David Alan Gilbert wrote: >> * Wen Congyang (we...@cn.fujitsu.com) wrote: >>> Block replication is a very important feature which is used for >>> continuous checkpoints(for example: COLO). >>> >>> You can get the detailed inf

[Qemu-block] [Patch v12 resend 10/10] Add a new API to start/stop replication, do checkpoint to all BDSes

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 83 +++ include/block/block.h | 4 +++ 2 files changed, 87 insertions(+) diff --git a/block.c b/block.c index 213bee8..09ee7f1 100644 ---

[Qemu-block] [Patch v12 resend 09/10] support replication driver in blockdev-add

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Eric Blake --- qapi/block-core.json | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 2c6bd3f..acc9f8d 100644

[Qemu-block] [Patch v12 resend 08/10] Implement new driver for block replication

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/Makefile.objs | 1 + block/replication.c | 549 2 files changed, 550 insertions(+) create mode 100644 block/replication.c diff --git a/block/Makefil

[Qemu-block] [Patch v12 resend 06/10] Add new block driver interfaces to control block replication

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Luiz Capitulino Cc: Michael Roth Reviewed-by: Paolo Bonzini --- block.c | 43 +++ include/block/block.h | 5 + include/block/block_int.h | 14

[Qemu-block] [Patch v12 resend 05/10] docs: block replication's description

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- docs/block-replication.txt | 227 + 1 file changed, 227 insertions(+) create mode 100644 docs/block-replication.txt diff --git a/docs/block-replication.txt b/docs/bl

[Qemu-block] [Patch v12 resend 07/10] quorum: implement block driver interfaces for block replication

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Alberto Garcia --- block/quorum.c | 78 ++ 1 file changed, 78 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index b7df14b..6fa54f3

[Qemu-block] [Patch v12 resend 03/10] Backup: clear all bitmap when doing block checkpoint

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Jeff Cody --- block/backup.c | 14 ++ blockjob.c | 11 +++ include/block/blockjob.h | 12 3 files changed, 37 insertions(+) diff --git a/block/

[Qemu-block] [Patch v12 resend 04/10] Allow creating backup jobs when opening BDS

2015-12-01 Thread Wen Congyang
When opening BDS, we need to create backup jobs for image-fleecing. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody --- block/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[Qemu-block] [Patch v12 resend 02/10] Store parent BDS in BdrvChild

2015-12-01 Thread Wen Congyang
We need to access the parent BDS to get the root BDS. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 1 + include/block/block_int.h | 1 + 2 files changed, 2 insertions(+) diff --git a/block.c b/block.c index eaf479a..0a0468f 10

[Qemu-block] [Patch v12 resend 01/10] unblock backup operations in backing file

2015-12-01 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block.c b/block.c index bfc2be8..eaf479a 100644 --- a/block.c +++ b/block.c @@ -1275,6 +1275,24 @@ void bdrv_set_backing_hd(BlockDr

[Qemu-block] [Patch v12 resend 00/10] Block replication for continuous checkpoints

2015-12-01 Thread Wen Congyang
Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). You can get the detailed information about block replication from here: http://wiki.qemu.org/Features/BlockReplication Usage: Please refer to docs/block-replication.txt This patch series is

[Qemu-block] [PATCH v14 02/15] qobject: Rename qtype_code to QType

2015-12-01 Thread Eric Blake
The name QType matches our CODING_STYLE conventions for type names in CamelCase. It also matches the fact that we are already naming all the enum members with a prefix of QTYPE, not QTYPE_CODE. And doing the rename will also make it easier for the next patch to use QAPI for providing the enum, wh

Re: [Qemu-block] [Qemu-devel] [Patch v12 00/10] Block replication for continuous checkpoints

2015-12-01 Thread Wen Congyang
On 12/01/2015 07:58 PM, Hailiang Zhang wrote: > On 2015/12/1 18:40, Dr. David Alan Gilbert wrote: >> * Wen Congyang (we...@cn.fujitsu.com) wrote: >>> Block replication is a very important feature which is used for >>> continuous checkpoints(for example: COLO). >>> >>> You can get the detailed infor

Re: [Qemu-block] [Patch v12 00/10] Block replication for continuous checkpoints

2015-12-01 Thread Wen Congyang
On 12/01/2015 06:40 PM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujitsu.com) wrote: >> Block replication is a very important feature which is used for >> continuous checkpoints(for example: COLO). >> >> You can get the detailed information about block replication from here: >> http

[Qemu-block] [PATCH for-2.6 1/3] iotests: 124: Split into two test classes

2015-12-01 Thread John Snow
Split it into an abstract test class and an implementation class. The split is primarily to facilitate more flexible setUp variations for other kinds of tests without having to rewrite or shuffle around all of these helpers. See the following two patches for more of the "why." Signed-off-by: Joh

[Qemu-block] [PATCH for-2.6 0/3] iotests: 124: Don't reopen qcow2 file

2015-12-01 Thread John Snow
Kevin caught me being Naughty, and because I don't want Santa to be mad at me, I have corrected my ways. Split iotest 124 into two classes so that the iotest that requires a blkdebug filter from the get-go can forego the standard setUp routine and just do it correct the first time. Does this warr

[Qemu-block] [PATCH for-2.6 2/3] iotests: 124: move incremental failure test

2015-12-01 Thread John Snow
Code motion only, in preparation for adjusting the setUp procedure for this test. Signed-off-by: John Snow --- tests/qemu-iotests/124 | 117 + 1 file changed, 60 insertions(+), 57 deletions(-) diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotes

[Qemu-block] [PATCH for-2.6 3/3] iotests: 124: don't reopen qcow2

2015-12-01 Thread John Snow
Don't create two interfaces to the same drive in the recently moved failure test. Signed-off-by: John Snow --- tests/qemu-iotests/124 | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index 2a0119d..7d

Re: [Qemu-block] [PATCH v2 7/8] block: Move some bdrv_*_all() functions to BB

2015-12-01 Thread Kevin Wolf
Am 10.11.2015 um 04:27 hat Max Reitz geschrieben: > Move bdrv_drain_all(), bdrv_commit_all(), bdrv_flush_all() and > bdrv_invalidate_cache_all() to BB. > > The only operation left is bdrv_close_all(), which cannot be moved to > the BB because it should not only close all BBs, but also all > monito

Re: [Qemu-block] [PATCH 7/8] block: Make bdrv_open() return a BDS

2015-12-01 Thread Alberto Garcia
On Tue 10 Nov 2015 04:44:22 AM CET, Max Reitz wrote: > @@ -1398,32 +1397,21 @@ static int bdrv_open_inherit(BlockDriverState **pbs, > const char *filename, > bool options_non_empty = options ? qdict_size(options) : false; > QDECREF(options); > > -if (*pbs) { > -

Re: [Qemu-block] [PATCH 3/8] block: Let bdrv_open_inherit() return the snapshot

2015-12-01 Thread Alberto Garcia
On Tue 10 Nov 2015 04:44:18 AM CET, Max Reitz wrote: > -int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags, Error **errp) > +static BlockDriverState *bdrv_append_temp_snapshot(BlockDriverState *bs, > + int flags, Error **errp) > { >

Re: [Qemu-block] [PATCH] qcow2: Fix potential qemu-img check crash on 32 bit hosts

2015-12-01 Thread Michael S. Tsirkin
On Tue, Dec 01, 2015 at 03:23:45PM +0100, Kevin Wolf wrote: > This crash was caught with qemu-iotests test case 138. > > Commit b6d36de already fixed a few 32 bit truncation bugs that could > cause qemu-img check to allocate too little memory and consequently > it would segfault. On 32 bit hosts,

[Qemu-block] [PATCH] qcow2: Fix potential qemu-img check crash on 32 bit hosts

2015-12-01 Thread Kevin Wolf
This crash was caught with qemu-iotests test case 138. Commit b6d36de already fixed a few 32 bit truncation bugs that could cause qemu-img check to allocate too little memory and consequently it would segfault. On 32 bit hosts, there is one more place that needs to be fixed because size_t was invo

Re: [Qemu-block] [PATCH v7 14/24] nbd: Switch from close to eject notifier

2015-12-01 Thread Kevin Wolf
Am 30.11.2015 um 18:22 hat Max Reitz geschrieben: > On 30.11.2015 16:36, Kevin Wolf wrote: > > Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: > >> The NBD code uses the BDS close notifier to determine when a medium is > >> ejected. However, now it should use the BB's BDS removal notifier for > >

Re: [Qemu-block] [Qemu-devel] [Patch v12 00/10] Block replication for continuous checkpoints

2015-12-01 Thread Hailiang Zhang
On 2015/12/1 18:40, Dr. David Alan Gilbert wrote: * Wen Congyang (we...@cn.fujitsu.com) wrote: Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). You can get the detailed information about block replication from here: http://wiki.qemu.org/

Re: [Qemu-block] [PATCH 8/8] block: Assert !bs->refcnt in bdrv_close()

2015-12-01 Thread Alberto Garcia
On Tue 10 Nov 2015 04:44:23 AM CET, Max Reitz wrote: > The only caller of bdrv_close() left is bdrv_delete(). We may as well > assert that, in a way (there are some things in bdrv_close() that make > more sense under that assumption, such as the call to > bdrv_release_all_dirty_bitmaps() which in t

Re: [Qemu-block] [PATCH 6/8] block: Drop bdrv_new_root()

2015-12-01 Thread Alberto Garcia
On Tue 10 Nov 2015 04:44:21 AM CET, Max Reitz wrote: > It is unused now, so we may just as well drop it. > > Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Berto

Re: [Qemu-block] [PATCH 5/8] block: Drop blk_new_with_bs()

2015-12-01 Thread Alberto Garcia
On Tue 10 Nov 2015 04:44:20 AM CET, Max Reitz wrote: > Its only caller is blk_new_open(), so we can just inline it there. Since > bdrv_new_root() is only a wrapper around bdrv_new(), we can just use > bdrv_new() instead. > > Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Berto

Re: [Qemu-block] [PATCH 1/3] block: Don't wait serialising for non-COR read requests

2015-12-01 Thread Kevin Wolf
Am 01.12.2015 um 11:26 hat Fam Zheng geschrieben: > On Tue, 12/01 10:54, Kevin Wolf wrote: > > Am 01.12.2015 um 10:36 hat Fam Zheng geschrieben: > > > The assertion problem was noticed in 06c3916b35a, but it wasn't > > > completely fixed, because even though the req is not marked as > > > serialisi

Re: [Qemu-block] [Patch v12 00/10] Block replication for continuous checkpoints

2015-12-01 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > Block replication is a very important feature which is used for > continuous checkpoints(for example: COLO). > > You can get the detailed information about block replication from here: > http://wiki.qemu.org/Features/BlockReplication > > Usage: > Ple

Re: [Qemu-block] [PATCH 4/8] block: Drop BB name from bad option error

2015-12-01 Thread Alberto Garcia
On Tue 10 Nov 2015 04:44:19 AM CET, Max Reitz wrote: > The information which BB is concerned does not seem useful enough to > justify its existence in most other place (which may be related to qemu > printing the -drive parameter in question anyway, and for blockdev-add > the attribution is natural

Re: [Qemu-block] [PATCH 2/8] block: Drop useless bdrv_new() calls

2015-12-01 Thread Alberto Garcia
On Tue 10 Nov 2015 04:44:17 AM CET, Max Reitz wrote: > bdrv_append_temp_snapshot() uses bdrv_new() to create an empty BDS > before invoking bdrv_open() on that BDS. This is probably a relict from > when it used to do some modifications on that empty BDS, but now that is > unnecessary, so we can jus

Re: [Qemu-block] [QEMU 2.1.2] block in bdrv_drain_all()

2015-12-01 Thread Fam Zheng
On Tue, 12/01 17:53, Qian Peng wrote: > Hi, > > > I am using qemu 2.1.2 and some VMs hang while playing videos. Does the problem reproduce with current head? Fam > > > QEMU parameters and stack information is as follows: > /usr/bin/qemu-system-x86_64 > -name S398_ABC-047 > -S -machine pc

Re: [Qemu-block] [PATCH 1/3] block: Don't wait serialising for non-COR read requests

2015-12-01 Thread Fam Zheng
On Tue, 12/01 10:54, Kevin Wolf wrote: > Am 01.12.2015 um 10:36 hat Fam Zheng geschrieben: > > The assertion problem was noticed in 06c3916b35a, but it wasn't > > completely fixed, because even though the req is not marked as > > serialising, it still gets serialised by wait_serialising_requests >

Re: [Qemu-block] [PATCH 1/8] qapi: Drop QERR_UNKNOWN_BLOCK_FORMAT_FEATURE

2015-12-01 Thread Alberto Garcia
On Tue 10 Nov 2015 04:44:16 AM CET, Max Reitz wrote: > Just specifying a custom string is simpler in basically all places that > used it, and in addition, specifying the BB or node name is something we > generally do not do in other error messages when opening a BDS, so we > should not do it here.

Re: [Qemu-block] [PATCH 1/3] block: Don't wait serialising for non-COR read requests

2015-12-01 Thread Kevin Wolf
Am 01.12.2015 um 10:36 hat Fam Zheng geschrieben: > The assertion problem was noticed in 06c3916b35a, but it wasn't > completely fixed, because even though the req is not marked as > serialising, it still gets serialised by wait_serialising_requests > against other serialising requests, which could

[Qemu-block] [QEMU 2.1.2] block in bdrv_drain_all()

2015-12-01 Thread Qian Peng
Hi, I am using qemu 2.1.2 and some VMs hang while playing videos. QEMU parameters and stack information is as follows: /usr/bin/qemu-system-x86_64 -name S398_ABC-047 -S -machine pc-i440fx-2.1,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 2f9fa97a

[Qemu-block] [PATCH 3/3] iotests: Add regresion test case for write notifier assertion failure

2015-12-01 Thread Fam Zheng
The idea is to let the top level bs have a big request alignment with blkdebug, so that the aio_write request issued from monitor will be serialised. This tests that QEMU doesn't crash upon the read request from the backup job's write notifier, which is a very special case of "reentrant" request.

[Qemu-block] [PATCH 1/3] block: Don't wait serialising for non-COR read requests

2015-12-01 Thread Fam Zheng
The assertion problem was noticed in 06c3916b35a, but it wasn't completely fixed, because even though the req is not marked as serialising, it still gets serialised by wait_serialising_requests against other serialising requests, which could lead to the same assertion failure. Fix it by even more

[Qemu-block] [PATCH 2/3] iotests: Add "add_drive_raw" method

2015-12-01 Thread Fam Zheng
This offers full manual control over the "-drive" options. Signed-off-by: Fam Zheng --- tests/qemu-iotests/iotests.py | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index ff5905f..e02245e 100644 --- a/tests/qemu-iotests/iote

[Qemu-block] [PATCH 0/3] block: Fix assertion failure with before write notifier again

2015-12-01 Thread Fam Zheng
This is basically a supplementary fix of 06c3916b. On 512 disks, the crash only happens when copy-on-read is enabled, which is covered by the previou fix. But on 4k disks the write request that triggers the notifier itself may be serialised, in which case the read req from backup_do_cow will stil

Re: [Qemu-block] [Qemu-devel] [PATCH v6 20/21] iotests: add incremental backup failure recovery test

2015-12-01 Thread Kevin Wolf
Am 30.11.2015 um 18:17 hat John Snow geschrieben: > On 11/27/2015 12:14 PM, Kevin Wolf wrote: > > Am 18.04.2015 um 01:50 hat John Snow geschrieben: > >> Test the failure case for incremental backups. > >> > >> Signed-off-by: John Snow > >> Reviewed-by: Max Reitz > >> --- > >> tests/qemu-iotests/

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

2015-12-01 Thread Stefan Hajnoczi
On Thu, Nov 26, 2015 at 01:05:20PM +0800, Fam Zheng wrote: > v3: Add Eric's rev-by in patches 6, 7, 13, 14. > 12: New, split out from the previous 13. > 12->13: Refactor "entry_mergable" from imp_map(). > Don't mess the merge conditions. [Paolo] > Address Eric's comments: >

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

2015-12-01 Thread Stefan Hajnoczi
On Mon, Nov 30, 2015 at 05:09:49PM +0800, Fam Zheng wrote: > On Mon, 11/30 16:38, Stefan Hajnoczi wrote: > > On Thu, Nov 26, 2015 at 01:05:21PM +0800, Fam Zheng wrote: > > > @@ -1535,13 +1541,14 @@ static int64_t coroutine_fn > > > bdrv_co_get_block_status(BlockDriverState *bs, > > > } >