[Qemu-devel] [PATCH V10 00/13] Quorum block driver

2014-01-28 Thread Benoît Canet
with Kevin help [Benoît] snapshot support [Benoît] operation it performs on its children [Max] s/hold/holds/ [Max] s/occur/occurs/ [Max] Change callback cancelation [Max] Make quorum compilation optional in order not to depend on gnutls [Max] Benoît Canet (13): quorum: Create

[Qemu-devel] [PATCH V10 13/13] quorum: Add unit test.

2014-01-28 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- tests/qemu-iotests/075 | 85 ++ tests/qemu-iotests/075.out | 27 +++ tests/qemu-iotests/group | 1 + 3 files changed, 113 insertions(+) create mode 100644 tests/qemu-iotests/075

[Qemu-devel] [PATCH V10 07/13] quorum: Add quorum_getlength().

2014-01-28 Thread Benoît Canet
From: Benoît Canet ben...@irqsave.net Check that every bs file returns the same length. Otherwize, return -EIO to disable the quorum and avoid length discrepancy. Signed-off-by: Benoit Canet ben...@irqsave.net --- block/quorum.c | 26 ++ 1 file changed, 26 insertions

[Qemu-devel] [PATCH V10 11/13] quorum: Implement recursive .bdrv_recurse_is_first_non_filter in quorum.

2014-01-28 Thread Benoît Canet
From: Benoît Canet ben...@irqsave.net Signed-off-by: Benoit Canet ben...@irqsave.net --- block/quorum.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 1b84b07..e7b2090 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -685,6

[Qemu-devel] [PATCH V10 06/13] quorum: Add quorum mechanism.

2014-01-28 Thread Benoît Canet
From: Benoît Canet ben...@irqsave.net Use gnutls's SHA-256 to compare versions. Signed-off-by: Benoit Canet ben...@irqsave.net --- block/Makefile.objs | 2 +- block/quorum.c| 333 +- configure | 36 + docs/qmp

[Qemu-devel] [PATCH V10 10/13] quorum: Add quorum_co_flush().

2014-01-28 Thread Benoît Canet
From: Benoît Canet ben...@irqsave.net Makes a vote to select error if any. Signed-off-by: Benoit Canet ben...@irqsave.net --- block/quorum.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 9b0718b..1b84b07 100644

Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open().

2014-01-27 Thread Benoît Canet
Le Friday 24 Jan 2014 à 15:54:39 (+0100), Max Reitz a écrit : On 24.01.2014 15:48, Kevin Wolf wrote: Am 24.01.2014 um 14:37 hat Max Reitz geschrieben: On 24.01.2014 14:26, Kevin Wolf wrote: Am 23.01.2014 um 21:31 hat Benoît Canet geschrieben: Signed-off-by: Benoit Canet ben...@irqsave.net

Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open().

2014-01-27 Thread Benoît Canet
Le Monday 27 Jan 2014 à 20:11:59 (+0100), Max Reitz a écrit : On 27.01.2014 15:36, Benoît Canet wrote: Le Friday 24 Jan 2014 à 15:54:39 (+0100), Max Reitz a écrit : On 24.01.2014 15:48, Kevin Wolf wrote: Am 24.01.2014 um 14:37 hat Max Reitz geschrieben: On 24.01.2014 14:26, Kevin Wolf wrote

Re: [Qemu-devel] [PATCH 1/2] block: remove QED .bdrv_make_empty implementation

2014-01-27 Thread Benoît Canet
Le Monday 27 Jan 2014 à 16:09:12 (-0500), Jeff Cody a écrit : The QED .bdrv_make_empty() implementation does nothing but return -ENOTSUP, which causes problems in bdrv_commit(). Since the function stub exists for QED, it is called, which then always returns an error. The proper way to not

Re: [Qemu-devel] [PATCH 2/2] block: remove qcow2 .bdrv_make_empty implementation

2014-01-27 Thread Benoît Canet
Le Monday 27 Jan 2014 à 16:09:13 (-0500), Jeff Cody a écrit : The QCOW2 .bdrv_make_empty implementation always returns 0 for success, but does not actually do anything. The proper way to not support an optional driver function stub is to just not implement it, so let's remove the stub.

Re: [Qemu-devel] [PATCH 01/10] block: Change BDS parameter of bdrv_open() to **

2014-01-26 Thread Benoît Canet
Le Sunday 26 Jan 2014 à 20:02:34 (+0100), Max Reitz a écrit : Make bdrv_open() take a pointer to a BDS pointer, similarly to bdrv_file_open(). If a pointer to a NULL pointer is given, bdrv_open() will create a new BDS with an empty name; if the BDS pointer is not NULL, that existing BDS will

Re: [Qemu-devel] [PATCH 03/10] block: Make bdrv_file_open() static

2014-01-26 Thread Benoît Canet
Le Sunday 26 Jan 2014 à 20:02:36 (+0100), Max Reitz a écrit : 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 to

Re: [Qemu-devel] [PATCH 04/10] block: Reuse NULL options check from bdrv_open()

2014-01-26 Thread Benoît Canet
Le Sunday 26 Jan 2014 à 20:02:37 (+0100), Max Reitz a écrit : Remove the check whether options is NULL form bdrv_file_open() and rely s/form/for/g ? on the one in bdrv_open() instead. Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 15 +-- 1 file changed, 5

Re: [Qemu-devel] [PATCH 05/10] block: Reuse reference handling from bdrv_open()

2014-01-26 Thread Benoît Canet
Le Sunday 26 Jan 2014 à 20:02:38 (+0100), Max Reitz a écrit : Remove the reference parameter and the related handling code from bdrv_file_open(), since it exists in bdrv_open() now as well. Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 33 +++-- 1

Re: [Qemu-devel] [PATCH 06/10] block: Remove bdrv_new() from bdrv_file_open()

2014-01-26 Thread Benoît Canet
Le Sunday 26 Jan 2014 à 20:02:39 (+0100), Max Reitz a écrit : Change bdrv_file_open() to take a simple pointer to an already existing BDS instead of an indirect one. The BDS will be created in bdrv_open() if necessary. Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 29

Re: [Qemu-devel] [PATCH 08/10] block: Reuse bs-options setting from bdrv_open()

2014-01-26 Thread Benoît Canet
Le Sunday 26 Jan 2014 à 20:02:41 (+0100), Max Reitz a écrit : Setting bs-options in bdrv_file_open() is not necessary if it is already done in bdrv_open(). Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 07/10] block: Reuse fail path from bdrv_open()

2014-01-26 Thread Benoît Canet
Le Sunday 26 Jan 2014 à 20:02:40 (+0100), Max Reitz a écrit : The fail paths of bdrv_file_open() and bdrv_open() naturally exhibit similarities, thus it is possible to reuse the one from bdrv_open() and shorten the one in bdrv_file_open() accordingly. Signed-off-by: Max Reitz

Re: [Qemu-devel] [PATCH v5 1/4] qcow2: remove n_start and n_end of qcow2_alloc_cluster_offset()

2014-01-25 Thread Benoît Canet
Le Sunday 26 Jan 2014 à 11:12:37 (+0800), Hu Tao a écrit : n_start can be actually calculated from offset. The number of sectors to be allocated(n_end - n_start) can be passed in in num. By removing n_start and n_end, we can save two parameters. The side effect is there is a bug in

Re: [Qemu-devel] [PATCH v5 2/4] qcow2: fix offset overflow in qcow2_alloc_clusters_at()

2014-01-25 Thread Benoît Canet
Le Sunday 26 Jan 2014 à 11:12:38 (+0800), Hu Tao a écrit : When cluster size is big enough it can lead to an offset overflow in qcow2_alloc_clusters_at(). This patch fixes it. The allocation is stopped each time at L2 table boundary (see handle_alloc()), so the possible maximum bytes could

Re: [Qemu-devel] [PATCH v5 3/4] qcow2: check for NULL l2meta

2014-01-25 Thread Benoît Canet
Le Sunday 26 Jan 2014 à 11:12:39 (+0800), Hu Tao a écrit : In the case of a metadata preallocation with a large cluster size, qcow2_alloc_cluster_offset() can allocate nothing and returns a NULL l2meta. This patch checks for it and link2 l2 with only valid l2meta. Replace 9 and 512 with

Re: [Qemu-devel] [PATCH] scsi: Change scsi sense buf size to 252

2014-01-25 Thread Benoît Canet
Le Friday 24 Jan 2014 à 15:02:24 (+0800), Fam Zheng a écrit : Current buffer size fails the assersion check in like hw/scsi/scsi-bus.c:1655:assert(req-sense_len = sizeof(req-sense)); when backend (block/iscsi.c) returns more data then 96. Exercise the core dump path by booting an

Re: [Qemu-devel] [PATCH V6 2/8] block: Allow the user to define node-name option both on command line and QMP.

2014-01-24 Thread Benoît Canet
Le Thursday 23 Jan 2014 à 21:31:33 (+0100), Benoît Canet a écrit : From: Benoît Canet ben...@irqsave.net Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 36 qapi-schema.json | 2 ++ 2 files changed, 38 insertions(+) diff --git

Re: [Qemu-devel] [PATCH v4 2/4] qcow2: fix offset overflow in qcow2_alloc_clusters_at()

2014-01-24 Thread Benoît Canet
Le Friday 24 Jan 2014 à 18:01:20 (+0800), Hu Tao a écrit : On Thu, Jan 23, 2014 at 06:13:48PM +0100, Benoît Canet wrote: Le Thursday 23 Jan 2014 à 11:04:06 (+0800), Hu Tao a écrit : When cluster size is big enough it can lead offset overflow Maybe it can lead to an offset overflow

Re: [Qemu-devel] [PATCH v4 1/4] qcow2: remove n_start and n_end of qcow2_alloc_cluster_offset()

2014-01-24 Thread Benoît Canet
Le Friday 24 Jan 2014 à 17:32:40 (+0800), Hu Tao a écrit : On Thu, Jan 23, 2014 at 06:02:08PM +0100, Benoît Canet wrote: Le Thursday 23 Jan 2014 à 11:04:05 (+0800), Hu Tao a écrit : n_start can be actually calculated from offset. The number of sectors to be allocated(n_end - n_start) can

Re: [Qemu-devel] [PATCH] block: Fix bdrv_commit return value

2014-01-24 Thread Benoît Canet
Le Friday 24 Jan 2014 à 14:08:21 (+0100), Kevin Wolf a écrit : bdrv_commit() could return 0 or 1 on success, depending on whether or now the last sector was allocated in the overlay and whether the overlay format had a .bdrv_make_empty callback. Most callers ignored it, but qemu-img commit

Re: [Qemu-devel] [PATCH v3 21/29] block: Assert serialisation assumptions in pwritev

2014-01-24 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:11 (+0100), Kevin Wolf a écrit : If a request calls wait_serialising_requests() and actually has to wait in this function (i.e. a coroutine yield), other requests can run and previously read data (like the head or tail buffer) could become outdated. In this case,

Re: [Qemu-devel] [PATCH v3 25/29] iscsi: Set bs-request_alignment

2014-01-24 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:15 (+0100), Kevin Wolf a écrit : From: Paolo Bonzini pbonz...@redhat.com The iSCSI backend already gets the block size from the READ CAPACITY command it sends. Save it so that the generic block layer gets it too. Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH v4 1/4] qcow2: remove n_start and n_end of qcow2_alloc_cluster_offset()

2014-01-23 Thread Benoît Canet
Le Thursday 23 Jan 2014 à 11:04:05 (+0800), Hu Tao a écrit : n_start can be actually calculated from offset. The number of sectors to be allocated(n_end - n_start) can be passed in in num. By removing n_start and n_end, we can save two parameters. The side effect is there is a bug in

Re: [Qemu-devel] [PATCH v4 2/4] qcow2: fix offset overflow in qcow2_alloc_clusters_at()

2014-01-23 Thread Benoît Canet
Le Thursday 23 Jan 2014 à 11:04:06 (+0800), Hu Tao a écrit : When cluster size is big enough it can lead offset overflow Maybe it can lead to an offset overflow in in qcow2_alloc_clusters_at(). This patch fixes it. The allocation each time is stopped at L2 table boundary The allocation is

Re: [Qemu-devel] [PATCH v2] qapi: Add backing to BlockStats

2014-01-23 Thread Benoît Canet
Le Thursday 23 Jan 2014 à 10:03:26 (+0800), Fam Zheng a écrit : Currently there is no way to query BlockStats of the backing chain. This adds backing field into BlockStats to make it possible. The comment of parent is reworded. Signed-off-by: Fam Zheng f...@redhat.com --- v2: Only add

Re: [Qemu-devel] [PATCH v4 3/4] qcow2: check for NULL l2meta

2014-01-23 Thread Benoît Canet
Le Thursday 23 Jan 2014 à 11:04:07 (+0800), Hu Tao a écrit : In case of do preallocating metadata with a large cluster size, In the case of a metadata preallocation with qcow2_alloc_cluster_offset() can allocate nothing and returns a NULL l2meta. This patch checks for it and link2 l2 with only

[Qemu-devel] [PATCH V6 2/8] block: Allow the user to define node-name option both on command line and QMP.

2014-01-23 Thread Benoît Canet
From: Benoît Canet ben...@irqsave.net Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 36 qapi-schema.json | 2 ++ 2 files changed, 38 insertions(+) diff --git a/block.c b/block.c index 60b70bc..d9d02d2 100644 --- a/block.c +++ b

[Qemu-devel] [PATCH V6 4/8] qmp: Allow to change password on named block driver states.

2014-01-23 Thread Benoît Canet
From: Benoît Canet ben...@irqsave.net Signed-off-by: Benoit Canet ben...@irqsave.net Reviewed-by: Fam Zheng f...@redhat.com There was two candidate ways to implement named node manipulation: 1) { 'command': 'block_passwd', 'data': {'*device': 'str', '*node

[Qemu-devel] [PATCH V6 0/8] Giving names to graph's BlockDriverState

2014-01-23 Thread Benoît Canet
] make bdrv_lookup_bs interface more generic [Kevin] s/check/checks/ [Fam] s/implentation/implementation/ [Fam] use node names for references [Kevin] Benoît Canet (8): block: Add bs-node_name to hold the name of a bs node of the bs graph. block: Allow the user to define node

[Qemu-devel] [PATCH V6 6/8] qmp: Allow block_resize to manipulate bs graph nodes.

2014-01-23 Thread Benoît Canet
From: Benoît Canet ben...@irqsave.net Signed-off-by: Benoit Canet ben...@irqsave.net Reviewed-by: Fam Zheng f...@redhat.com --- blockdev.c | 18 ++ hmp.c| 2 +- qapi-schema.json | 10 -- qmp-commands.hx | 3 ++- 4 files changed, 25 insertions(+), 8

[Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open().

2014-01-23 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 3e0994b..7726636 100644 --- a/block.c +++ b/block.c @@ -908,15 +908,15 @@ int bdrv_file_open(BlockDriverState **pbs, const char *filename,

[Qemu-devel] [PATCH V6 3/8] qmp: Add QMP query-named-block-nodes to list the named BlockDriverState nodes.

2014-01-23 Thread Benoît Canet
From: Benoît Canet ben...@irqsave.net Signed-off-by: Benoit Canet ben...@irqsave.net Reviewed-by: Fam Zheng f...@redhat.com --- block.c | 18 + block/qapi.c | 109 +- blockdev.c| 5 +++ include/block

[Qemu-devel] [PATCH V6 1/8] block: Add bs-node_name to hold the name of a bs node of the bs graph.

2014-01-23 Thread Benoît Canet
From: Benoît Canet ben...@irqsave.net Add the minimum of code to prepare for the following patches. Signed-off-by: Benoit Canet ben...@irqsave.net Reviewed-by: Fam Zheng f...@redhat.com --- block.c | 57 +++ include/block/block.h

[Qemu-devel] [PATCH V6 7/8] qmp: Allow to take external snapshots on bs graphs node.

2014-01-23 Thread Benoît Canet
From: Benoît Canet ben...@irqsave.net Signed-off-by: Benoit Canet ben...@irqsave.net Reviewed-by: Fam Zheng f...@redhat.com --- blockdev.c | 55 --- hmp.c| 4 +++- qapi-schema.json | 13 ++--- qmp-commands.hx | 11

[Qemu-devel] [PATCH V6 5/8] block: Create authorizations mechanism for external snapshot and resize.

2014-01-23 Thread Benoît Canet
From: Benoît Canet ben...@irqsave.net Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 65 --- block/blkverify.c | 2 +- blockdev.c| 2 +- include/block/block.h | 20 +++ include

Re: [Qemu-devel] [PATCH] osdep: drop unused #include trace.h

2014-01-23 Thread Benoît Canet
Le Thursday 23 Jan 2014 à 14:27:59 (-0600), Stefan Hajnoczi a écrit : osdep.c does not use trace_*() so we can just drop the include. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- util/osdep.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util/osdep.c b/util/osdep.c index

Re: [Qemu-devel] [PATCH v3 1/3] block: resize backing file image during offline commit, if necessary

2014-01-23 Thread Benoît Canet
Le Thursday 23 Jan 2014 à 16:48:55 (-0500), Jeff Cody a écrit : Currently, if an image file is logically larger than its backing file, commiting it via 'qemu-img commit' will fail. For instance, if we have a base image with a virtual size 10G, and a snapshot image of size 20G, then

Re: [Qemu-devel] [PATCH v3 2/3] block: resize backing image during active layer commit, if needed

2014-01-23 Thread Benoît Canet
Le Thursday 23 Jan 2014 à 16:48:56 (-0500), Jeff Cody a écrit : If the top image to commit is the active layer, and also larger than the base image, then an I/O error will likely be returned during block-commit. For instance, if we have a base image with a virtual size 10G, and a active

Re: [Qemu-devel] [PATCH v3 1/3] block: resize backing file image during offline commit, if necessary

2014-01-23 Thread Benoît Canet
Le Thursday 23 Jan 2014 à 15:07:44 (-0700), Eric Blake a écrit : On 01/23/2014 03:00 PM, Benoît Canet wrote: Le Thursday 23 Jan 2014 à 16:48:55 (-0500), Jeff Cody a écrit : Currently, if an image file is logically larger than its backing file, commiting it via 'qemu-img commit' will fail

Re: [Qemu-devel] [PATCH v4 2/3] block: resize backing image during active layer commit, if needed

2014-01-23 Thread Benoît Canet
Le Thursday 23 Jan 2014 à 17:45:08 (-0500), Jeff Cody a écrit : If the top image to commit is the active layer, and also larger than the base image, then an I/O error will likely be returned during block-commit. For instance, if we have a base image with a virtual size 10G, and a active

Re: [Qemu-devel] [PATCH v3 15/29] block: Allow waiting for overlapping requests between begin/end

2014-01-22 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:05 (+0100), Kevin Wolf a écrit : Previously, it was not possible to use wait_for_overlapping_requests() between tracked_request_begin()/end() because it would wait for itself. Ignore the current request in the overlap check and run more of the

Re: [Qemu-devel] [PATCH v3 16/29] block: Make zero-after-EOF work with larger alignment

2014-01-22 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:06 (+0100), Kevin Wolf a écrit : Odd file sizes could make bdrv_aligned_preadv() shorten the request in non-aligned ways. Fix it by rounding to the required alignment instead of 512 bytes. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 7 --- 1

Re: [Qemu-devel] [PATCH v3 17/29] block: Generalise and optimise COR serialisation

2014-01-22 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:07 (+0100), Kevin Wolf a écrit : Change the API so that specific requests can be marked serialising. Only I find the spelling serialising instead of serializing really odd since QEMU code is full of z like the word virtualization. Reviewed-by: Benoit Canet

Re: [Qemu-devel] [PATCH v3 18/29] block: Make overlap range for serialisation dynamic

2014-01-22 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:08 (+0100), Kevin Wolf a écrit : Copy on Read wants to serialise with all requests touching the same cluster, so wait_serialising_requests() rounded to cluster boundaries. Other users like alignment RMW will have different requirements, though (requests touching

Re: [Qemu-devel] [PATCH v3 19/29] block: Allow wait_serialising_requests() at any point

2014-01-22 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:09 (+0100), Kevin Wolf a écrit : We can only have a single wait_serialising_requests() call per request because otherwise we can run into deadlocks where requests are waiting for each other. The same is true when wait_serialising_requests() is not at the very

Re: [Qemu-devel] [PATCH v3 20/29] block: Align requests in bdrv_co_do_pwritev()

2014-01-22 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:10 (+0100), Kevin Wolf a écrit : This patch changes bdrv_co_do_pwritev() to actually be what its name promises. If requests aren't properly aligned, it performs a RMW. Requests touching the same block are serialised against the RMW request. Further optimisation

Re: [Qemu-devel] [PATCH V5 7/7] qmp: Allow to take external snapshots on bs graphs node.

2014-01-22 Thread Benoît Canet
Le Tuesday 21 Jan 2014 à 15:28:49 (+0100), Kevin Wolf a écrit : Am 12.12.2013 um 16:34 hat Benoît Canet geschrieben: Signed-off-by: Benoit Canet ben...@irqsave.net --- blockdev.c | 55 --- hmp.c| 4 +++- qapi

Re: [Qemu-devel] [PATCH V5 0/7] Giving names to BlockDriverState graph nodes

2014-01-22 Thread Benoît Canet
Le Tuesday 21 Jan 2014 à 16:44:49 (+0100), Kevin Wolf a écrit : Am 21.01.2014 um 16:36 hat Benoît Canet geschrieben: Le Tuesday 21 Jan 2014 à 15:33:09 (+0100), Kevin Wolf a écrit : Am 12.12.2013 um 16:33 hat Benoît Canet geschrieben: v5: block empty node names [Kevin

Re: [Qemu-devel] [PATCH V5 0/7] Giving names to BlockDriverState graph nodes

2014-01-22 Thread Benoît Canet
Le Tuesday 21 Jan 2014 à 16:44:49 (+0100), Kevin Wolf a écrit : Am 21.01.2014 um 16:36 hat Benoît Canet geschrieben: Le Tuesday 21 Jan 2014 à 15:33:09 (+0100), Kevin Wolf a écrit : Am 12.12.2013 um 16:33 hat Benoît Canet geschrieben: v5: block empty node names [Kevin

Re: [Qemu-devel] [PATCH v3 01/29] block: Move initialisation of BlockLimits to bdrv_refresh_limits()

2014-01-21 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:14:51 (+0100), Kevin Wolf a écrit : This function separates filling the BlockLimits from bdrv_open(), which allows it to call it from other operations which may change the limits (e.g. modifications to the backing file chain or bdrv_reopen) Signed-off-by: Kevin

Re: [Qemu-devel] [PATCH v3 07/29] block: rename buffer_alignment to guest_block_size

2014-01-21 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:14:57 (+0100), Kevin Wolf a écrit : From: Paolo Bonzini pbonz...@redhat.com The alignment field is now set to the value that is promised to the guest, rather than required by the host. The next patches will make QEMU aware of the host-provided values, so make this

Re: [Qemu-devel] [PATCH v3 08/29] raw: Probe required direct I/O alignment

2014-01-21 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:14:58 (+0100), Kevin Wolf a écrit : From: Paolo Bonzini pbonz...@redhat.com Add a bs-request_alignment field that contains the required offset/length alignment for I/O requests and fill it in the raw block drivers. Use ioctls if possible, else see what alignment it

Re: [Qemu-devel] [PATCH v3 09/29] block: Introduce bdrv_aligned_preadv()

2014-01-21 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:14:59 (+0100), Kevin Wolf a écrit : This separates the part of bdrv_co_do_readv() that needs to happen before the request is modified to match the backend alignment, and a part that needs to be executed afterwards and passes the request to the BlockDriver.

Re: [Qemu-devel] [PATCH v3 10/29] block: Introduce bdrv_co_do_preadv()

2014-01-21 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:00 (+0100), Kevin Wolf a écrit : Similar to bdrv_pread(), which aligns byte-aligned request to 512 byte sectors, bdrv_co_do_preadv() takes a byte-aligned request and aligns it to the alignment specified in bs-request_alignment. Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PATCH v3 11/29] block: Introduce bdrv_aligned_pwritev()

2014-01-21 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:01 (+0100), Kevin Wolf a écrit : This separates the part of bdrv_co_do_writev() that needs to happen before the request is modified to match the backend alignment, and a part that needs to be executed afterwards and passes the request to the BlockDriver.

Re: [Qemu-devel] [PATCH v3 12/29] block: write: Handle COR dependency after I/O throttling

2014-01-21 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:02 (+0100), Kevin Wolf a écrit : First waiting for all COR requests to complete and calling the throttling function afterwards means that the request could be delayed and we still need to wait for the COR request even if it was issued only after the throttled

Re: [Qemu-devel] [PATCH v3 13/29] block: Introduce bdrv_co_do_pwritev()

2014-01-21 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:03 (+0100), Kevin Wolf a écrit : This is going to become the bdrv_co_do_preadv() equivalent for writes. In this patch, however, just a function taking byte offsets is created, it doesn't align anything yet. Signed-off-by: Kevin Wolf kw...@redhat.com ---

Re: [Qemu-devel] [PATCH v3 14/29] block: Switch BdrvTrackedRequest to byte granularity

2014-01-21 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:15:04 (+0100), Kevin Wolf a écrit : Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 52 +++ block/backup.c| 7 ++- include/block/block_int.h | 4 ++-- 3 files changed, 42

Re: [Qemu-devel] [PATCH 1/3] qemu-progress: Drop unused include

2014-01-21 Thread Benoît Canet
Le Monday 20 Jan 2014 à 15:17:19 (+0100), Kevin Wolf a écrit : Signed-off-by: Kevin Wolf kw...@redhat.com --- util/qemu-progress.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util/qemu-progress.c b/util/qemu-progress.c index 9a3f96c..ad33fee 100644 --- a/util/qemu-progress.c +++

Re: [Qemu-devel] [PATCH 2/3] qemu-progress: Fix progress printing on SIGUSR1

2014-01-21 Thread Benoît Canet
Le Monday 20 Jan 2014 à 15:17:20 (+0100), Kevin Wolf a écrit : Since commit a7aae221 ('Switch SIG_IPI to SIGUSR1'), SIGUSR1 is blocked during startup, breaking the progress report in tools. This patch reenables the signal when initialising a progress report. Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PATCH 3/3] Documentation: qemu-img: Mention SIGUSR1 progress report

2014-01-21 Thread Benoît Canet
Le Monday 20 Jan 2014 à 15:17:21 (+0100), Kevin Wolf a écrit : Document the SIGUSR1 behaviour of qemu-img. Also, added compare to the list of subcommands that support -p. Signed-off-by: Kevin Wolf kw...@redhat.com --- qemu-img.texi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

Re: [Qemu-devel] [PATCH V5 0/7] Giving names to BlockDriverState graph nodes

2014-01-21 Thread Benoît Canet
Le Tuesday 21 Jan 2014 à 15:33:09 (+0100), Kevin Wolf a écrit : Am 12.12.2013 um 16:33 hat Benoît Canet geschrieben: v5: block empty node names [Kevin] factorize setting of node-name option [Kevin] NULL terminate node_name on removal [Kevin] make query-named-block-nodes

Re: [Qemu-devel] [PATCH v3 04/29] qemu_memalign: Allow small alignments

2014-01-17 Thread Benoît Canet
-by: Benoît Canet ben...@irqsave.net

Re: [Qemu-devel] [PATCH v3 03/29] block: Update BlockLimits when they might have changed

2014-01-17 Thread Benoît Canet
*bs); int bdrv_commit(BlockDriverState *bs); int bdrv_commit_all(void); int bdrv_change_backing_file(BlockDriverState *bs, -- 1.8.1.4 Reviewed-by: Benoît Canet ben...@irqsave.net

Re: [Qemu-devel] [PATCH v3 01/29] block: Move initialisation of BlockLimits to bdrv_refresh_limits()

2014-01-17 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:14:51 (+0100), Kevin Wolf a écrit : This function separates filling the BlockLimits from bdrv_open(), which allows it to call it from other operations which may change the limits (e.g. modifications to the backing file chain or bdrv_reopen) Signed-off-by: Kevin

Re: [Qemu-devel] [PATCH v3 02/29] block: Inherit opt_transfer_length

2014-01-17 Thread Benoît Canet
-bl.opt_transfer_length, +bs-backing_hd-bl.opt_transfer_length); +} + +/* Then let the driver override it */ +if (drv-bdrv_refresh_limits) { return drv-bdrv_refresh_limits(bs); } Reviewed-by: Benoît Canet ben...@irqsave.net -- 1.8.1.4

Re: [Qemu-devel] [PATCH V5 0/7] Giving names to BlockDriverState graph nodes

2014-01-16 Thread Benoît Canet
Le Thursday 12 Dec 2013 à 16:33:53 (+0100), Benoît Canet a écrit : v5: block empty node names [Kevin] factorize setting of node-name option [Kevin] NULL terminate node_name on removal [Kevin] make query-named-block-nodes return BlockDeviceInfo structure [Eric] Change some

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

2013-12-29 Thread Benoît Canet
Le Monday 30 Dec 2013 à 01:33:34 (+0100), Loic Dachary a écrit : Stash the rbd stderr and stdout because it also contains human readable progress messages : Removing image: 3% complete... in addition to potential error messages. Display the stashed output if rbd exits on error.

[Qemu-devel] [PATCH V5 0/7] Giving names to BlockDriverState graph nodes

2013-12-12 Thread Benoît Canet
API for node name [Eric] Use the same authorization as snapshot on block resize [Kevin] Rebase the series [Kevin] Benoît Canet (7): block: Add bs-node_name to hold the name of a bs node of the bs graph. block: Allow the user to define node-name option. qmp: Add a command to list

[Qemu-devel] [PATCH V5 2/7] block: Allow the user to define node-name option.

2013-12-12 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/block.c b/block.c index 481d566..1c57f0d 100644 --- a/block.c +++ b/block.c @@ -735,6 +735,39 @@ static int bdrv_open_flags(BlockDriverState *bs,

[Qemu-devel] [PATCH V5 1/7] block: Add bs-node_name to hold the name of a bs node of the bs graph.

2013-12-12 Thread Benoît Canet
Add the minimum of code to prepare for the following patches. Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 57 +++ include/block/block.h | 1 + include/block/block_int.h | 9 +++- 3 files changed, 52

[Qemu-devel] [PATCH V5 4/7] qmp: Allow to change password on named block driver states.

2013-12-12 Thread Benoît Canet
There was two candidate ways to implement named node manipulation: 1) { 'command': 'block_passwd', 'data': {'*device': 'str', '*node-name': 'str', 'password': 'str'} } 2) { 'command': 'block_passwd', 'data': {'device': 'str',

[Qemu-devel] [PATCH V5 3/7] qmp: Add a command to list the named BlockDriverState nodes.

2013-12-12 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 18 + block/qapi.c | 109 +- blockdev.c| 5 +++ include/block/block.h | 1 + include/block/qapi.h | 1 + qapi-schema.json | 16

[Qemu-devel] [PATCH V5 6/7] qmp: Allow block_resize to manipulate bs graph nodes.

2013-12-12 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- blockdev.c | 18 ++ hmp.c| 2 +- qapi-schema.json | 10 -- qmp-commands.hx | 3 ++- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/blockdev.c b/blockdev.c index ebb8f48..374d03d 100644

[Qemu-devel] [PATCH V5 7/7] qmp: Allow to take external snapshots on bs graphs node.

2013-12-12 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- blockdev.c | 55 --- hmp.c| 4 +++- qapi-schema.json | 13 ++--- qmp-commands.hx | 11 ++- 4 files changed, 71 insertions(+), 12 deletions(-) diff --git

[Qemu-devel] [PATCH V5 5/7] block: Create authorizations mechanism for external snapshot and resize.

2013-12-12 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 65 --- block/blkverify.c | 2 +- blockdev.c| 2 +- include/block/block.h | 20 +++ include/block/block_int.h | 12 ++--- 5

Re: [Qemu-devel] [PATCH V4 2/7] block: Allow the user to define node-name option.

2013-12-11 Thread Benoît Canet
Le Monday 09 Dec 2013 à 17:15:26 (+0100), Kevin Wolf a écrit : Am 05.12.2013 um 18:14 hat Benoît Canet geschrieben: Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 44 +++- 1 file changed, 39 insertions(+), 5 deletions(-) diff

Re: [Qemu-devel] [PATCH V4 4/7] qmp: Allow to change password on names block driver states.

2013-12-09 Thread Benoît Canet
Le Friday 06 Dec 2013 à 11:52:15 (-0500), Luiz Capitulino a écrit : On Fri, 06 Dec 2013 08:24:33 -0700 Eric Blake ebl...@redhat.com wrote: On 12/06/2013 07:27 AM, Luiz Capitulino wrote: On Thu, 5 Dec 2013 18:15:00 +0100 Benoît Canet ben...@irqsave.net wrote: -{ 'command

Re: [Qemu-devel] [PATCH V4 3/7] qmp: Add a command to list the named BlockDriverState nodes.

2013-12-09 Thread Benoît Canet
Le Friday 06 Dec 2013 à 08:59:38 (-0700), Eric Blake a écrit : On 12/05/2013 10:14 AM, Benoît Canet wrote: Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 16 blockdev.c| 5 + include/block/block.h | 1 + qapi-schema.json

Re: [Qemu-devel] [PATCH V4 0/7] Giving names to BlockDriverState graph nodes

2013-12-09 Thread Benoît Canet
Le Monday 09 Dec 2013 à 16:32:14 (+0100), Kevin Wolf a écrit : Am 05.12.2013 um 18:14 hat Benoît Canet geschrieben: This partial series start to add some node-name manipulation from QMP. In particular it will allow to take snapshots of quorum files. I propose reviewing it and merging

Re: [Qemu-devel] [PATCH V4 5/7] qmp: Allow block_resize to manipulate bs graph nodes.

2013-12-09 Thread Benoît Canet
Le Monday 09 Dec 2013 à 17:24:09 (+0100), Kevin Wolf a écrit : Am 05.12.2013 um 18:15 hat Benoît Canet geschrieben: Signed-off-by: Benoit Canet ben...@irqsave.net --- blockdev.c | 13 + hmp.c| 2 +- qapi-schema.json | 10 -- qmp-commands.hx

Re: [Qemu-devel] [PATCH V4 4/7] qmp: Allow to change password on names block driver states.

2013-12-09 Thread Benoît Canet
Le Monday 09 Dec 2013 à 11:41:09 (-0500), Luiz Capitulino a écrit : On Mon, 9 Dec 2013 17:23:09 +0100 Kevin Wolf kw...@redhat.com wrote: I'm leaning slightly towards the approach that Benoît took, if only for the naming aspect (that is, I also thought of the idea of a bool flag,

Re: [Qemu-devel] [PATCH V4 4/7] qmp: Allow to change password on names block driver states.

2013-12-09 Thread Benoît Canet
Le Monday 09 Dec 2013 à 12:03:26 (-0500), Luiz Capitulino a écrit : On Mon, 9 Dec 2013 17:48:50 +0100 Benoît Canet benoit.ca...@irqsave.net wrote: Le Monday 09 Dec 2013 à 11:41:09 (-0500), Luiz Capitulino a écrit : On Mon, 9 Dec 2013 17:23:09 +0100 Kevin Wolf kw...@redhat.com wrote

Re: [Qemu-devel] [RFC V3 4/7] qmp: Allow block_passwd to manipulate bs graph nodes.

2013-12-05 Thread Benoît Canet
Le Wednesday 04 Dec 2013 à 16:56:05 (-0700), Eric Blake a écrit : On 12/03/2013 06:26 AM, Benoît Canet wrote: Signed-off-by: Benoit Canet ben...@irqsave.net --- +BlockDriverState * bdrv_lookup_bs(bool has_device, const char * device, + bool

Re: [Qemu-devel] [RFC V3 7/7] qmp: Allow to take external snapshots on bs graphs node.

2013-12-05 Thread Benoît Canet
Le Wednesday 04 Dec 2013 à 17:11:26 (-0700), Eric Blake a écrit : On 12/03/2013 06:26 AM, Benoît Canet wrote: Signed-off-by: Benoit Canet ben...@irqsave.net --- blockdev.c | 49 + hmp.c| 4 +++- qapi-schema.json | 13

Re: [Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a drive bs graph.

2013-12-05 Thread Benoît Canet
Le Wednesday 04 Dec 2013 à 16:46:34 (-0700), Eric Blake a écrit : On 12/03/2013 06:26 AM, Benoît Canet wrote: In addition to Fam's review, s/skeletton/skeleton/ in subject --- blockdev.c | 8 qapi-schema.json | 32 2 files changed

Re: [Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a drive bs graph.

2013-12-05 Thread Benoît Canet
Le Thursday 05 Dec 2013 à 07:38:37 (-0700), Eric Blake a écrit : On 12/05/2013 07:24 AM, Benoît Canet wrote: Am I correct that it will be possible to have named nodes that are not currently associated with any device? If so, how do we learn about those nodes? Would it be better

Re: [Qemu-devel] [RFC V3 6/7] block: Create authorizations mechanism for external snapshots.

2013-12-05 Thread Benoît Canet
Le Wednesday 04 Dec 2013 à 15:03:42 (+0800), Fam Zheng a écrit : On 2013年12月04日 14:34, Benoît Canet wrote: Le Wednesday 04 Dec 2013 à 14:12:19 (+0800), Fam Zheng a écrit : On 2013年12月04日 13:20, Benoît Canet wrote: Le Wednesday 04 Dec 2013 à 11:47:22 (+0800), Fam Zheng a écrit : On 2013年12月03日

Re: [Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a drive bs graph.

2013-12-05 Thread Benoît Canet
Le Thursday 05 Dec 2013 à 07:59:22 (-0700), Eric Blake a écrit : On 12/05/2013 07:43 AM, Benoît Canet wrote: There's one case where management might not know - if libvirtd gets restarted while in the middle of an operation that was attempting to create a named node, then on restart

[Qemu-devel] [PATCH V4 0/7] Giving names to BlockDriverState graph nodes

2013-12-05 Thread Benoît Canet
] More commments to explain authorization method [Fam] Add a don't care result to snapshot authorization method [Fam] Add #optional [Eric] Best regards Benoît Benoît Canet (7): block: Add bs-node_name to hold the name of a bs node of the bs graph. block: Allow the user

[Qemu-devel] [PATCH V4 2/7] block: Allow the user to define node-name option.

2013-12-05 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 44 +++- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index 4f6b36a..61f5ba0 100644 --- a/block.c +++ b/block.c @@ -873,6 +873,7 @@ int

[Qemu-devel] [PATCH V4 5/7] qmp: Allow block_resize to manipulate bs graph nodes.

2013-12-05 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- blockdev.c | 13 + hmp.c| 2 +- qapi-schema.json | 10 -- qmp-commands.hx | 3 ++- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/blockdev.c b/blockdev.c index 5abf303..5bc9ddc 100644 ---

[Qemu-devel] [PATCH V4 6/7] block: Create authorizations mechanism for external snapshots.

2013-12-05 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 68 +-- block/blkverify.c | 2 +- include/block/block.h | 18 ++--- include/block/block_int.h | 12 ++--- 4 files changed, 84 insertions(+), 16

[Qemu-devel] [PATCH V4 3/7] qmp: Add a command to list the named BlockDriverState nodes.

2013-12-05 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 16 blockdev.c| 5 + include/block/block.h | 1 + qapi-schema.json | 11 +++ qmp-commands.hx | 19 +++ 5 files changed, 52 insertions(+) diff --git

[Qemu-devel] [PATCH V4 7/7] qmp: Allow to take external snapshots on bs graphs node.

2013-12-05 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- blockdev.c | 47 --- hmp.c| 4 +++- qapi-schema.json | 13 ++--- qmp-commands.hx | 11 ++- 4 files changed, 63 insertions(+), 12 deletions(-) diff --git a/blockdev.c

<    6   7   8   9   10   11   12   13   14   15   >