[Qemu-devel] [PATCH 2/3] qmp: Make Quorum error events more palatable.

2014-02-21 Thread Benoît Canet
Insert quorum QMP events documentation alphabetically. Also change the "ret" errno value by "error" being an strerror() in the QUORUM_REPORT_BAD qmp event. Signed-off-by: Benoit Canet --- block/quorum.c | 5 ++-- docs/qmp/qmp-events.txt| 72 +++--

Re: [Qemu-devel] [PATCH V19 06/12] quorum: Add quorum mechanism.

2014-02-21 Thread Benoît Canet
The Friday 21 Feb 2014 à 15:09:42 (-0700), Eric Blake wrote : > On 02/21/2014 02:21 PM, Benoît Canet wrote: > > From: Benoît Canet > > > > This patchset enables the core of the quorum mechanism. > > The num_children reads are compared to get the majority version and

Re: [Qemu-devel] [PATCH V19 00/12] Quorum block filter

2014-02-21 Thread Benoît Canet
The Friday 21 Feb 2014 à 15:49:15 (-0700), Eric Blake wrote : > On 02/21/2014 02:21 PM, Benoît Canet wrote: > > Hi this is the latest version of the quorum block filter. > > > > This version fix the qmp events and a small rebase conflict. > > > > tested: > &g

Re: [Qemu-devel] [PATCH V19 06/12] quorum: Add quorum mechanism.

2014-02-21 Thread Benoît Canet
The Friday 21 Feb 2014 à 15:44:06 (-0700), Eric Blake wrote : > On 02/21/2014 03:38 PM, Kevin Wolf wrote: > +- "ret": The IO return code. > >>> > >>> What values is this likely to contain? Is it a finite set, in which > >>> case it would be nice to have a QAPI enum that describes the

[Qemu-devel] [PATCH V19 02/12] quorum: Create BDRVQuorumState and BlkDriver and do init.

2014-02-21 Thread Benoît Canet
From: Benoît Canet Create the structure holding the quorum settings and write the minimal block driver instanciation boilerplate. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/block

[Qemu-devel] [PATCH V19 08/12] quorum: Add quorum_invalidate_cache().

2014-02-21 Thread Benoît Canet
From: Benoît Canet We really want that live migration works with quorum so implement quorum_invalidate_cache(). Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index c6ea862

[Qemu-devel] [PATCH V19 11/12] quorum: Add quorum_open() and quorum_close().

2014-02-21 Thread Benoît Canet
From: Benoît Canet Example of command line: -drive if=virtio,driver=quorum,\ children.0.file.filename=1.raw,\ children.0.node-name=1.raw,\ children.0.driver=raw,\ children.1.file.filename=2.raw,\ children.1.node-name=2.raw,\ children.1.driver=raw,\ children.2.file.filename=3.raw,\ children.2

[Qemu-devel] [PATCH V19 00/12] Quorum block filter

2014-02-21 Thread Benoît Canet
quorum QMP by reference ok quorum QMP by reference and snapshot transaction ok quorum QMP at once ok quorum QMP at once and snapshot transaction ok Benoît Canet (12): quorum: Create quorum.c, add QuorumChildRequest and QuorumAIOCB. quorum: Create BDRVQuorumState and BlkDriver and do init

[Qemu-devel] [PATCH V19 12/12] quorum: Add unit test.

2014-02-21 Thread Benoît Canet
Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- tests/qemu-iotests/081 | 95 ++ tests/qemu-iotests/081.out | 34 + tests/qemu-iotests/group | 1 + 3 files changed, 130 insertions(+) create mode 100755 tests/qemu-iotests/0

[Qemu-devel] [PATCH V19 04/12] blkverify: Extract qemu_iovec_clone() and qemu_iovec_compare() from blkverify.

2014-02-21 Thread Benoît Canet
From: Benoît Canet qemu_iovec_compare() will be used to compare IOs vectors in quorum blkverify mode. The patch extracts these functions in order to factorize the code. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/blkverify.c | 108

[Qemu-devel] [PATCH V19 09/12] quorum: Add quorum_co_flush().

2014-02-21 Thread Benoît Canet
From: Benoît Canet Makes a vote to select error if any. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 28 1 file changed, 28 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 38bc217..840afda 100644 --- a/block/quorum.c

[Qemu-devel] [PATCH V19 07/12] quorum: Add quorum_getlength().

2014-02-21 Thread Benoît Canet
From: Benoît Canet Check that every bs file returns the same length. Otherwise, return -EIO to disable the quorum and avoid length discrepancy. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 26 ++ 1 file changed, 26 insertions(+) diff --git

Re: [Qemu-devel] [PATCH v2 2/2] iotests: Mixed quorum child device specifications

2014-02-21 Thread Benoît Canet
The Friday 21 Feb 2014 à 22:30:38 (+0100), Max Reitz wrote : > Add a test case to test 081 for mixing full option dicts and reference > strings of specifying the quorum child block devices through QMP. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/081 | 51 > ++

[Qemu-devel] [PATCH V19 05/12] quorum: Add quorum_aio_readv.

2014-02-21 Thread Benoît Canet
From: Benoît Canet Add code to do num_children reads in parallel and cleanup the structures afterwards. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/block

[Qemu-devel] [PATCH V19 06/12] quorum: Add quorum mechanism.

2014-02-21 Thread Benoît Canet
From: Benoît Canet This patchset enables the core of the quorum mechanism. The num_children reads are compared to get the majority version and if this version exists more than threshold times the guest won't see the error at all. If a block is corrupted or if an error occurs during an IO

[Qemu-devel] [PATCH V19 03/12] quorum: Add quorum_aio_writev and its dependencies.

2014-02-21 Thread Benoît Canet
From: Benoît Canet Writes are mirrored num_children times on num_children devices. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 103 + 1 file changed, 103 insertions(+) diff --git a/block/quorum.c b/block

[Qemu-devel] [PATCH V19 10/12] quorum: Implement recursive .bdrv_recurse_is_first_non_filter in quorum.

2014-02-21 Thread Benoît Canet
From: Benoît Canet This is used to activate quorum snapshot. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 840afda..1b2b56f 100644 --- a/block/quorum.c +++ b

[Qemu-devel] [PATCH V19 01/12] quorum: Create quorum.c, add QuorumChildRequest and QuorumAIOCB.

2014-02-21 Thread Benoît Canet
From: Benoît Canet Quorum is a block filter mirroring writes to num_children children. For reads quorum reads each children and does a vote. If more than vote_threshold versions are identical the quorum is reached and this winning version is returned to the guest. So quorum prevents bit

Re: [Qemu-devel] [PATCH 2/2] iotests: Mixed quorum child device specifications

2014-02-21 Thread Benoît Canet
The Friday 21 Feb 2014 à 20:44:08 (+0100), Max Reitz wrote : > Add a test case to test 081 for mixing full option dicts and reference > strings of specifying the quorum child block devices through QMP. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/081 | 52 > ++

Re: [Qemu-devel] [PATCH 1/2] quorum: Simplify quorum_open()

2014-02-21 Thread Benoît Canet
The Friday 21 Feb 2014 à 20:44:07 (+0100), Max Reitz wrote : > Although it may not look like it, this patch simplifies quorum_open(). > qdict_array_split() is now able to return QLists with different objects > than only QDicts, therefore it will now do all the work and > quorum_open() does not have

Re: [Qemu-devel] [PATCH v14 01/14] block: Add BlockOpType enum

2014-02-19 Thread Benoît Canet
The Wednesday 19 Feb 2014 à 21:42:18 (+0800), Fam Zheng wrote : > This adds the enum of all the operations that can be taken on a block > device. > > Signed-off-by: Fam Zheng > --- > include/block/block.h | 19 +++ > 1 file changed, 19 insertions(+) > > diff --git a/include/bloc

Re: [Qemu-devel] [PATCH v14 02/14] block: Introduce op_blockers to BlockDriverState

2014-02-19 Thread Benoît Canet
The Wednesday 19 Feb 2014 à 21:42:19 (+0800), Fam Zheng wrote : > BlockDriverState.op_blockers is an array of lists with BLOCK_OP_TYPE_MAX > elements. Each list is a list of blockers of an operation type > (BlockOpType), that marks this BDS as currently blocked for a certain > type of operation wit

Re: [Qemu-devel] [PATCH v14 08/14] block: Support dropping active in bdrv_drop_intermediate

2014-02-19 Thread Benoît Canet
The Wednesday 19 Feb 2014 à 21:42:25 (+0800), Fam Zheng wrote : > Dropping intermediate could be useful both for commit and stream, and > BDS refcnt plus bdrv_swap could do most of the job nicely. It also needs > to work with op blockers. > > Signed-off-by: Fam Zheng > --- > block.c| 146

Re: [Qemu-devel] [PATCH v14 06/14] block: Add backing_blocker in BlockDriverState

2014-02-19 Thread Benoît Canet
The Wednesday 19 Feb 2014 à 21:42:23 (+0800), Fam Zheng wrote : > This makes use of op_blocker and blocks all the operations except for > commit target, on each BlockDriverState->backing_hd. > > The asserts for op_blocker in bdrv_swap are removed because with this > change, the target of block com

Re: [Qemu-devel] [PATCH v14 03/14] block: Replace in_use with operation blocker

2014-02-19 Thread Benoît Canet
The Wednesday 19 Feb 2014 à 21:42:20 (+0800), Fam Zheng wrote : > This drops BlockDriverState.in_use with op_blockers: > > - Call bdrv_op_block_all in place of bdrv_set_in_use(bs, 1). > - Call bdrv_op_unblock_all in place of bdrv_set_in_use(bs, 0). > - Check bdrv_op_is_blocked() in place of

Re: [Qemu-devel] [PATCH v14 04/14] block: Move op_blocker check from block_job_create to its caller

2014-02-19 Thread Benoît Canet
The Wednesday 19 Feb 2014 à 21:42:21 (+0800), Fam Zheng wrote : > It makes no sense to check for "any" blocker on bs, we are here only > because of the mechanical conversion from in_use to op_blockers. Remove > it now, and let the callers check specific operation types. Backup and > mirror already

Re: [Qemu-devel] [PATCH v14 05/14] block: Add bdrv_set_backing_hd()

2014-02-19 Thread Benoît Canet
The Wednesday 19 Feb 2014 à 21:42:22 (+0800), Fam Zheng wrote : > This is the common but non-trivial steps to assign or change the > backing_hd of BDS. > > Signed-off-by: Fam Zheng > --- > block.c | 34 +++--- > include/block/block.h | 1 + > 2 files ch

Re: [Qemu-devel] [PATCH V18 11/12] quorum: Add quorum_open() and quorum_close().

2014-02-18 Thread Benoît Canet
The Tuesday 18 Feb 2014 à 17:37:08 (+), Leandro Dorileo wrote : > On Tue, Feb 18, 2014 at 01:11:26PM +0100, Beno??t Canet wrote: > > From: Beno??t Canet > > > > Example of command line: > > > > -drive if=virtio,driver=quorum,\ > > children.0.file.filename=1.raw,\ > > children.0.node-name=1.r

Re: [Qemu-devel] [PATCH v3 3/8] block: Make bdrv_file_open() static

2014-02-18 Thread Benoît Canet
The Saturday 15 Feb 2014 à 04:30:19 (+0100), Max Reitz wrote : > Add the bdrv_open() option BDRV_O_PROTOCOL which results in passing the > call to bdrv_file_open(). Additionally, make bdrv_file_open() static and > therefore bdrv_open() the only way to call it. > > Consequently, all existing calls

Re: [Qemu-devel] [PATCH v3 7/8] block: Reuse success path from bdrv_open()

2014-02-18 Thread Benoît Canet
The Saturday 15 Feb 2014 à 04:30:23 (+0100), Max Reitz wrote : > The fail and success paths of bdrv_file_open() may be further shortened > by reusing code already existent in bdrv_open(). This includes > bdrv_file_open() not taking the reference to options which allows the > removal of QDECREF(opti

[Qemu-devel] [PATCH V18 07/12] quorum: Add quorum_getlength().

2014-02-18 Thread Benoît Canet
From: Benoît Canet Check that every bs file returns the same length. Otherwise, return -EIO to disable the quorum and avoid length discrepancy. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 26 ++ 1 file changed, 26 insertions(+) diff --git

[Qemu-devel] [PATCH V18 05/12] quorum: Add quorum_aio_readv.

2014-02-18 Thread Benoît Canet
From: Benoît Canet Add code to do num_children reads in parallel and cleanup the structures afterwards. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/block

Re: [Qemu-devel] [PATCH V17 11/12] quorum: Add quorum_open() and quorum_close().

2014-02-18 Thread Benoît Canet
The Tuesday 18 Feb 2014 à 12:06:57 (+0800), Fam Zheng wrote : > On Thu, 02/13 10:09, Benoît Canet wrote: > > The Wednesday 12 Feb 2014 à 23:06:38 (+0100), Benoît Canet wrote : > > > +static void quorum_close(BlockDriverState *bs) > > > +{ > > > +BDRVQuorumS

[Qemu-devel] [PATCH V18 12/12] quorum: Add unit test.

2014-02-18 Thread Benoît Canet
Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- tests/qemu-iotests/081 | 95 ++ tests/qemu-iotests/081.out | 34 + tests/qemu-iotests/group | 1 + 3 files changed, 130 insertions(+) create mode 100755 tests/qemu-iotests/0

[Qemu-devel] [PATCH V18 06/12] quorum: Add quorum mechanism.

2014-02-18 Thread Benoît Canet
From: Benoît Canet This patchset enables the core of the quorum mechanism. The num_children reads are compared to get the majority version and if this version exists more than threshold times the guest won't see the error at all. If a block is corrupted or if an error occurs during an IO

[Qemu-devel] [PATCH V18 04/12] blkverify: Extract qemu_iovec_clone() and qemu_iovec_compare() from blkverify.

2014-02-18 Thread Benoît Canet
From: Benoît Canet qemu_iovec_compare() will be used to compare IOs vectors in quorum blkverify mode. The patch extracts these functions in order to factorize the code. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/blkverify.c | 108

[Qemu-devel] [PATCH V18 00/12] Quorum block filter

2014-02-18 Thread Benoît Canet
[Benoît] tested: Ran qemu-iotest including 081 ok quorum command line ok quorum command line snapshot transaction ok quorum QMP by reference ok quorum QMP by reference and snapshot transaction ok quorum QMP at once ok quorum QMP at once and snapshot transaction ok Benoît Canet (12): quorum

[Qemu-devel] [PATCH V18 11/12] quorum: Add quorum_open() and quorum_close().

2014-02-18 Thread Benoît Canet
From: Benoît Canet Example of command line: -drive if=virtio,driver=quorum,\ children.0.file.filename=1.raw,\ children.0.node-name=1.raw,\ children.0.driver=raw,\ children.1.file.filename=2.raw,\ children.1.node-name=2.raw,\ children.1.driver=raw,\ children.2.file.filename=3.raw,\ children.2

[Qemu-devel] [PATCH V18 10/12] quorum: Implement recursive .bdrv_recurse_is_first_non_filter in quorum.

2014-02-18 Thread Benoît Canet
From: Benoît Canet This is used to activate quorum snapshot. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 1007dfc..40832c0 100644 --- a/block/quorum.c +++ b

[Qemu-devel] [PATCH V18 09/12] quorum: Add quorum_co_flush().

2014-02-18 Thread Benoît Canet
From: Benoît Canet Makes a vote to select error if any. Signed-off-by: Benoit Canet --- block/quorum.c | 28 1 file changed, 28 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index d924055..1007dfc 100644 --- a/block/quorum.c +++ b/block/quorum.c

[Qemu-devel] [PATCH V18 03/12] quorum: Add quorum_aio_writev and its dependencies.

2014-02-18 Thread Benoît Canet
From: Benoît Canet Writes are mirrored num_children times on num_children devices. Signed-off-by: Benoit Canet --- block/quorum.c | 103 + 1 file changed, 103 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 375ffd5

[Qemu-devel] [PATCH V18 01/12] quorum: Create quorum.c, add QuorumChildRequest and QuorumAIOCB.

2014-02-18 Thread Benoît Canet
From: Benoît Canet Quorum is a block filter mirroring writes to num_children children. For reads quorum reads each children and does a vote. If more than vote_threshold versions are identical the quorum is reached and this winning version is returned to the guest. So quorum prevents bit

[Qemu-devel] [PATCH V18 08/12] quorum: Add quorum_invalidate_cache().

2014-02-18 Thread Benoît Canet
From: Benoît Canet We really want that live migration works with quorum so implement quorum_invalidate_cache(). Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 131ffbf

[Qemu-devel] [PATCH V18 02/12] quorum: Create BDRVQuorumState and BlkDriver and do init.

2014-02-18 Thread Benoît Canet
From: Benoît Canet Create the structure holding the quorum settings and write the minimal block driver instanciation boilerplate. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/block

Re: [Qemu-devel] [PATCH v13 10/14] qmp: Add command 'blockdev-backup'

2014-02-17 Thread Benoît Canet
The Monday 17 Feb 2014 à 21:32:51 (+0800), Fam Zheng wrote : > On Thu, 02/13 14:48, Benoît Canet wrote: > > The Wednesday 29 Jan 2014 à 13:07:37 (+0800), Fam Zheng wrote : > > > Similar to drive-backup, but this command uses a device id as target > > > instead of cre

Re: [Qemu-devel] [PATCH v3 0/8] block: Integrate bdrv_file_open() into bdrv_open()

2014-02-17 Thread Benoît Canet
The Monday 17 Feb 2014 à 13:42:43 (+0100), Kevin Wolf wrote : > Am 15.02.2014 um 04:30 hat Max Reitz geschrieben: > > bdrv_file_open() is now nearly a subset of bdrv_open(), except for the > > fact that bdrv_file_open() is for protocols and bdrv_open() for block > > drivers. It is possible to use b

Re: [Qemu-devel] [PATCH v2] discard rbd error output when not relevant in qemu-iotests

2014-02-16 Thread Benoît Canet
The Thursday 09 Jan 2014 à 09:45:14 (+0800), Stefan Hajnoczi wrote : > On Wed, Jan 08, 2014 at 09:05:38PM +0100, Loic Dachary wrote: > > Suppress rbd progress messages with --no-progress so they are not > > confused with an error output when comparing test results ( progress is > > displayed on std

[Qemu-devel] [PATCH] Fix: remove bogus QDECREF()

2014-02-13 Thread Benoît Canet
quorum ok tested command line quorum + snapshot transaction ok tested quorum open by reference ok tested quorum open by reference + snapshot transaction ok tested quorum open at once ok tested quorum open at once + snapshot transaction ok Benoît Canet (1): blockdev: Fix wrong usage of QDECREF

[Qemu-devel] [PATCH] blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close.

2014-02-13 Thread Benoît Canet
As bdrv_open() documentation states: "The reference to the QDict belongs to the block layer * after the call (even on failure), so if the caller intends to reuse the * dictionary, it needs to use QINCREF() before calling bdrv_open." the optional options dict will not be reused after bdrv_open()

Re: [Qemu-devel] [PATCH v13 10/14] qmp: Add command 'blockdev-backup'

2014-02-13 Thread Benoît Canet
The Wednesday 29 Jan 2014 à 13:07:37 (+0800), Fam Zheng wrote : > Similar to drive-backup, but this command uses a device id as target > instead of creating/opening an image file. > > Also add blocker on target bs, since the target is also a named device > now. > > Add check and report error for

Re: [Qemu-devel] [PATCH v13 07/14] block: Parse "backing" option to reference existing BDS

2014-02-13 Thread Benoît Canet
The Wednesday 29 Jan 2014 à 13:07:34 (+0800), Fam Zheng wrote : > Now it's safe to allow reference for backing_hd in the interface. > > Signed-off-by: Fam Zheng > --- > block.c | 26 -- > 1 file changed, 24 insertions(+), 2 deletions(-) > > diff --git a/block.c b/block.c

Re: [Qemu-devel] [PATCH v13 05/14] block: Add bdrv_set_backing_hd()

2014-02-13 Thread Benoît Canet
The Wednesday 29 Jan 2014 à 13:07:32 (+0800), Fam Zheng wrote : > This is the common but non-trivial steps to assign or change the > backing_hd of BDS. > > Signed-off-by: Fam Zheng > --- > block.c | 34 +- > include/block/block.h | 1 + > 2 files ch

Re: [Qemu-devel] [PATCH v13 02/14] block: Introduce op_blockers to BlockDriverState

2014-02-13 Thread Benoît Canet
The Wednesday 29 Jan 2014 à 13:07:29 (+0800), Fam Zheng wrote : > BlockDriverState.op_blockers is an array of lists with BLOCK_OP_TYPE_MAX > elements. Each list is a list of blockers of an operation type > (BlockOpType), that marks this BDS as currently blocked for a certain > type of operation wit

Re: [Qemu-devel] [PATCH v13 03/14] block: Replace in_use with operation blocker

2014-02-13 Thread Benoît Canet
The Wednesday 29 Jan 2014 à 13:07:30 (+0800), Fam Zheng wrote : > This drops BlockDriverState.in_use with op_blockers: > > - Call bdrv_op_block_all in place of bdrv_set_in_use(bs, 1). > - Call bdrv_op_unblock_all in place of bdrv_set_in_use(bs, 0). > - Check bdrv_op_is_blocked() in place of

Re: [Qemu-devel] [PATCH v13 02/14] block: Introduce op_blockers to BlockDriverState

2014-02-13 Thread Benoît Canet
The Wednesday 29 Jan 2014 à 13:07:29 (+0800), Fam Zheng wrote : > BlockDriverState.op_blockers is an array of lists with BLOCK_OP_TYPE_MAX > elements. Each list is a list of blockers of an operation type > (BlockOpType), that marks this BDS as currently blocked for a certain > type of operation wit

Re: [Qemu-devel] [PATCH V17 11/12] quorum: Add quorum_open() and quorum_close().

2014-02-13 Thread Benoît Canet
The Wednesday 12 Feb 2014 à 23:06:38 (+0100), Benoît Canet wrote : > From: Benoît Canet > > Example of command line: > -drive if=virtio,file.driver=quorum,\ > file.children.0.file.filename=1.raw,\ > file.children.0.node-name=1.raw,\ > file.children.0.driver=raw,\ > file.

Re: [Qemu-devel] [FIX V2] block: Fix device snapshots broken by the block filter snapshots patchset.

2014-02-13 Thread Benoît Canet
The Thursday 13 Feb 2014 à 09:33:52 (+0100), Kevin Wolf wrote : > Am 13.02.2014 um 02:51 hat Benoît Canet geschrieben: > > Signed-off-by: Benoit Canet > > --- > > block.c | 6 +- > > 1 file changed, 1 insertion(+), 5 deletions(-) > > Should be [PATCH v3]

[Qemu-devel] [FIX V2] block: Fix device snapshots broken by the block filter snapshots patchset.

2014-02-12 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/block.c b/block.c index 70d7f35..d9553ba 100644 --- a/block.c +++ b/block.c @@ -5419,11 +5419,7 @@ bool bdrv_is_first_non_filter(BlockDriverState *candidate) QTAILQ_FOREACH(bs, &

[Qemu-devel] [FIX V2] repair snapshots

2014-02-12 Thread Benoît Canet
uorum file instianciated via blockdev without references ok A comment update for quorum will be needed to avoid user to use the wrong command line. Benoît Canet (1): block: Fix device snapshots broken by the block filter snapshots patchset. block.c | 6 +- 1 file changed, 1 insertion(+), 5

Re: [Qemu-devel] [FIX V2] block: Fix device snapshots broken by the block filter snapshots patchset.

2014-02-12 Thread Benoît Canet
The Wednesday 12 Feb 2014 à 22:43:15 (+0100), Benoît Canet wrote : > The Wednesday 12 Feb 2014 à 20:49:18 (+0100), Benoît Canet wrote : > > The Tuesday 11 Feb 2014 à 16:12:17 (+0800), Fam Zheng wrote : > > > On Mon, 02/10 22:49, Benoît Canet wrote: > > > > Take into

Re: [Qemu-devel] Guest IOMMU and Cisco usnic

2014-02-12 Thread Benoît Canet
The Wednesday 12 Feb 2014 à 12:34:25 (-0700), Alex Williamson wrote : > On Wed, 2014-02-12 at 19:10 +0100, Benoît Canet wrote: > > Hi Alex, > > > > After the IRC conversation we had a few days ago I understood that guest > > IOMMU > > was not implemented. >

Re: [Qemu-devel] Guest IOMMU and Cisco usnic

2014-02-12 Thread Benoît Canet
The Wednesday 12 Feb 2014 à 12:34:25 (-0700), Alex Williamson wrote : > On Wed, 2014-02-12 at 19:10 +0100, Benoît Canet wrote: > > Hi Alex, > > > > After the IRC conversation we had a few days ago I understood that guest > > IOMMU > > was not implemented. >

[Qemu-devel] [PATCH V17 00/12] quorum block filter

2014-02-12 Thread Benoît Canet
des [Benoît] fill authorization table [Benoît] extract quorum_has_too_much_io_failed [Benoît] call this function when not reading [Benoît] report error on io failure [Benoît] !! need Eric review don't flush on exit [Kevin] Benoît Canet (12): quorum: Create quorum.c, add

[Qemu-devel] [PATCH V17 09/12] quorum: Add quorum_co_flush().

2014-02-12 Thread Benoît Canet
From: Benoît Canet Makes a vote to select error if any. Signed-off-by: Benoit Canet --- block/quorum.c | 28 1 file changed, 28 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 5f8f626..818c72c 100644 --- a/block/quorum.c +++ b/block/quorum.c

[Qemu-devel] [PATCH V17 11/12] quorum: Add quorum_open() and quorum_close().

2014-02-12 Thread Benoît Canet
From: Benoît Canet Example of command line: -drive if=virtio,file.driver=quorum,\ file.children.0.file.filename=1.raw,\ file.children.0.node-name=1.raw,\ file.children.0.driver=raw,\ file.children.1.file.filename=2.raw,\ file.children.1.node-name=2.raw,\ file.children.1.driver=raw

[Qemu-devel] [PATCH V17 12/12] quorum: Add unit test.

2014-02-12 Thread Benoît Canet
Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- tests/qemu-iotests/081 | 95 ++ tests/qemu-iotests/081.out | 34 + tests/qemu-iotests/group | 1 + 3 files changed, 130 insertions(+) create mode 100755 tests/qemu-iotests/0

[Qemu-devel] [PATCH V17 10/12] quorum: Implement recursive .bdrv_recurse_is_first_non_filter in quorum.

2014-02-12 Thread Benoît Canet
From: Benoît Canet This is used to activate quorum snapshot. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 818c72c..8e033ef 100644 --- a/block/quorum.c +++ b

[Qemu-devel] [PATCH V17 05/12] quorum: Add quorum_aio_readv.

2014-02-12 Thread Benoît Canet
From: Benoît Canet Add code to do num_children reads in parallel and cleanup the structures afterward. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/block

[Qemu-devel] [PATCH V17 04/12] blkverify: Extract qemu_iovec_clone() and qemu_iovec_compare() from blkverify.

2014-02-12 Thread Benoît Canet
From: Benoît Canet qemu_iovec_compare() will be used to compare IOs vectors in quorum blkverify mode. The patch extract these functions in order to factorize the code. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/blkverify.c | 108

[Qemu-devel] [PATCH V17 01/12] quorum: Create quorum.c, add QuorumChildRequest and QuorumAIOCB.

2014-02-12 Thread Benoît Canet
From: Benoît Canet Quorum is a block filter mirroring writes to num_children children. For reads quorum reads each children and does a vote. If more than vote_threshold versions are identicals the quorum is reached and this winning version is returned to the guest. So quorum prevents bit

[Qemu-devel] [PATCH V17 08/12] quorum: Add quorum_invalidate_cache().

2014-02-12 Thread Benoît Canet
From: Benoît Canet We really want that live migration works with quorum so implement quorum_invalidate_cache(). Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 2e54921

[Qemu-devel] [PATCH V17 03/12] quorum: Add quorum_aio_writev and its dependencies.

2014-02-12 Thread Benoît Canet
From: Benoît Canet Writes are mirrored num_children times on num_children devices. Signed-off-by: Benoit Canet --- block/quorum.c | 103 + 1 file changed, 103 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 36c5bb8

[Qemu-devel] [PATCH V17 07/12] quorum: Add quorum_getlength().

2014-02-12 Thread Benoît Canet
From: Benoît Canet Check that every bs file returns the same length. Otherwise, return -EIO to disable the quorum and avoid length discrepancy. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 26 ++ 1 file changed, 26 insertions(+) diff --git

[Qemu-devel] [PATCH V17 06/12] quorum: Add quorum mechanism.

2014-02-12 Thread Benoît Canet
From: Benoît Canet This patchset enable the core of the quorum mechanism. The num_children reads are compared to get the majority version and if this version exist more than threshold time the guest won't see the error at all. QMP events are used to report individual driver errors or

[Qemu-devel] [PATCH V17 02/12] quorum: Create BDRVQuorumState and BlkDriver and do init.

2014-02-12 Thread Benoît Canet
From: Benoît Canet Create the structure holding the quorum settings and write the minimal block driver instanciation boilerplate. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/block

Re: [Qemu-devel] [FIX V2] block: Fix device snapshots broken by the block filter snapshots patchset.

2014-02-12 Thread Benoît Canet
The Wednesday 12 Feb 2014 à 20:49:18 (+0100), Benoît Canet wrote : > The Tuesday 11 Feb 2014 à 16:12:17 (+0800), Fam Zheng wrote : > > On Mon, 02/10 22:49, Benoît Canet wrote: > > > Take into account the fact that a block filter like quorum will be in > > > bs->fi

Re: [Qemu-devel] [FIX V2] block: Fix device snapshots broken by the block filter snapshots patchset.

2014-02-12 Thread Benoît Canet
The Tuesday 11 Feb 2014 à 16:12:17 (+0800), Fam Zheng wrote : > On Mon, 02/10 22:49, Benoît Canet wrote: > > Take into account the fact that a block filter like quorum will be in > > bs->file > > while a regular block driver device is really on the top level. > > &

[Qemu-devel] Guest IOMMU and Cisco usnic

2014-02-12 Thread Benoît Canet
Hi Alex, After the IRC conversation we had a few days ago I understood that guest IOMMU was not implemented. I have a real use case for it: Cisco usnic allow to write MPI applications while driving the network card in userspace in order to optimize the latency. It's made for compute clusters.

[Qemu-devel] Open by references and close on exit

2014-02-12 Thread Benoît Canet
Hi Max, I have a crash when quorum open it's files by references and close them on exit: It seems that bdrv_close_all tries to close them a second time because they are still registered in bdrv_states. Do you think you have the same problem with blkverify ? Should bdrv_open remove the bs from b

[Qemu-devel] [PATCH 0/2] Make open by reference use id then node-name

2014-02-12 Thread Benoît Canet
This series was asked by Kevin. It sit on top of the snapshot fix patch and max openv2 series. I have done the following tests. check qemu-iotest ok snapshot blockbackend by id ok open quorum by node-name reference and id reference ok Error messages seems ok Benoît Canet (2): block: Relax

[Qemu-devel] [PATCH 1/2] block: Relax bdrv_lookup_bs constraints.

2014-02-12 Thread Benoît Canet
The following patch will reuse bdrv_lookup_bs in order to open images by references so the rules of usage of bdrv_lookup_bs must be relaxed a bit. Signed-off-by: Benoit Canet --- block.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/block.c b/bl

[Qemu-devel] [PATCH 2/2] block: Open by reference will try device then node_name.

2014-02-12 Thread Benoît Canet
Since we introduced node_name for named bs of the graph modify the opening by reference to use it as a fallback. This patch also enforce the separation of the device id and graph node namespaces. Signed-off-by: Benoit Canet --- block.c| 10 -- blockdev.c | 6 ++ 2 files changed

[Qemu-devel] [PATCH V16 11/12] quorum: Add quorum_open() and quorum_close().

2014-02-11 Thread Benoît Canet
From: Benoît Canet Example of command line: -drive if=virtio,file.driver=quorum,\ file.children.0.file.filename=1.raw,\ file.children.0.node-name=1.raw,\ file.children.0.driver=raw,\ file.children.1.file.filename=2.raw,\ file.children.1.node-name=2.raw,\ file.children.1.driver=raw

[Qemu-devel] [PATCH V16 03/12] quorum: Add quorum_aio_writev and its dependencies.

2014-02-11 Thread Benoît Canet
From: Benoît Canet Writes are mirrored num_children times on num_children devices. Signed-off-by: Benoit Canet --- block/quorum.c | 103 + 1 file changed, 103 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 1bc3390

[Qemu-devel] [PATCH V16 00/12] Quorum block filter

2014-02-11 Thread Benoît Canet
enoît] report error on io failure [Benoît] !! need Eric review don't flush on exit [Kevin] Benoît Canet (12): quorum: Create quorum.c, add QuorumChildRequest and QuorumAIOCB. quorum: Create BDRVQuorumState and BlkDriver and do init. quorum: Add quorum_aio_writev and its depe

[Qemu-devel] [PATCH V16 04/12] blkverify: Extract qemu_iovec_clone() and qemu_iovec_compare() from blkverify.

2014-02-11 Thread Benoît Canet
From: Benoît Canet qemu_iovec_compare() will be used to compare IOs vectors in quorum blkverify mode. The patch extract these functions in order to factorize the code. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/blkverify.c | 108

[Qemu-devel] [PATCH V16 05/12] quorum: Add quorum_aio_readv.

2014-02-11 Thread Benoît Canet
From: Benoît Canet Add code to do num_children reads in parallel and cleanup the structures afterward. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/block

[Qemu-devel] [PATCH V16 06/12] quorum: Add quorum mechanism.

2014-02-11 Thread Benoît Canet
From: Benoît Canet This patchset enable the core of the quorum mechanism. The num_children reads are compared to get the majority version and if this version exist more than threshold time the guest won't see the error at all. QMP events are used to report individual driver errors or

[Qemu-devel] [PATCH V16 10/12] quorum: Implement recursive .bdrv_recurse_is_first_non_filter in quorum.

2014-02-11 Thread Benoît Canet
From: Benoît Canet This is used to activate quorum snapshot. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 9956081..90676dc 100644 --- a/block/quorum.c +++ b

[Qemu-devel] [PATCH V16 12/12] quorum: Add unit test.

2014-02-11 Thread Benoît Canet
Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- tests/qemu-iotests/081 | 95 ++ tests/qemu-iotests/081.out | 34 + tests/qemu-iotests/group | 1 + 3 files changed, 130 insertions(+) create mode 100755 tests/qemu-iotests/0

[Qemu-devel] [PATCH V16 09/12] quorum: Add quorum_co_flush().

2014-02-11 Thread Benoît Canet
From: Benoît Canet Makes a vote to select error if any. Signed-off-by: Benoit Canet --- block/quorum.c | 28 1 file changed, 28 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index b8e21ff..9956081 100644 --- a/block/quorum.c +++ b/block/quorum.c

[Qemu-devel] [PATCH V16 08/12] quorum: Add quorum_invalidate_cache().

2014-02-11 Thread Benoît Canet
From: Benoît Canet We really want that live migration works with quorum so implement quorum_invalidate_cache(). Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index c066f08

[Qemu-devel] [PATCH V16 07/12] quorum: Add quorum_getlength().

2014-02-11 Thread Benoît Canet
From: Benoît Canet Check that every bs file returns the same length. Otherwise, return -EIO to disable the quorum and avoid length discrepancy. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 26 ++ 1 file changed, 26 insertions(+) diff --git

[Qemu-devel] [PATCH V16 01/12] quorum: Create quorum.c, add QuorumChildRequest and QuorumAIOCB.

2014-02-11 Thread Benoît Canet
From: Benoît Canet Quorum is a block filter mirroring writes to num_children children. For reads quorum reads each children and does a vote. If more than vote_threshold versions are identicals the quorum is reached and this winning version is returned to the guest. So quorum prevents bit

[Qemu-devel] [PATCH V16 02/12] quorum: Create BDRVQuorumState and BlkDriver and do init.

2014-02-11 Thread Benoît Canet
From: Benoît Canet Create the structure holding the quorum settings and write the minimal block driver instanciation boilerplate. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz --- block/quorum.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/block

Re: [Qemu-devel] [PATCH v3 3/5] qemu-iotests: Add VM method qtest() to iotests.py

2014-02-11 Thread Benoît Canet
The Tuesday 11 Feb 2014 à 14:41:00 (+0800), Fam Zheng wrote : > This will allow test case to run command in qtest protocol. It's > write-only for now. > > Signed-off-by: Fam Zheng > --- > tests/qemu-iotests/iotests.py | 17 +++-- > 1 file changed, 15 insertions(+), 2 deletions(-) >

Re: [Qemu-devel] [PATCH v3 5/5] qemu-iotests: Add 080 for IO throttling

2014-02-11 Thread Benoît Canet
The Tuesday 11 Feb 2014 à 14:41:02 (+0800), Fam Zheng wrote : > This case utilizes qemu-io command "aio_{read,write} -q" to verify the > effectiveness of IO throttling options. > > It's implemented by driving the vm timer from qtest protocol, so the > throttling timers are signaled with determined

Re: [Qemu-devel] [PATCH v3 2/5] qtest: Add scripts/qtest/qtest.py

2014-02-11 Thread Benoît Canet
The Tuesday 11 Feb 2014 à 14:40:59 (+0800), Fam Zheng wrote : > This removes the dummy scripts/qtest and adds scripts/qtest/qtest.py as > a python library for qtest protocol. > > This is a skeleton with a basic "cmd" method to execute a command, > reading and parsing of qtest output will be added

[Qemu-devel] [FIX V2] Fix broken external snapshots

2014-02-10 Thread Benoît Canet
Best regards Benoît Benoît Canet (1): block: Fix device snapshots broken by the block filter snapshots patchset. block.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) -- 1.8.3.2

[Qemu-devel] [FIX V2] block: Fix device snapshots broken by the block filter snapshots patchset.

2014-02-10 Thread Benoît Canet
Take into account the fact that a block filter like quorum will be in bs->file while a regular block driver device is really on the top level. Signed-off-by: Benoit Canet --- block.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index 07ac50

<    4   5   6   7   8   9   10   11   12   13   >