Re: [Qemu-devel] [PATCH v2 1/3] nfs: Fix leak of opts in nfs_file_open

2014-08-27 Thread Benoît Canet
The Thursday 28 Aug 2014 à 12:12:36 (+0800), Fam Zheng wrote : Signed-off-by: Fam Zheng f...@redhat.com --- block/nfs.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 93d87f3..8740c1a 100644 --- a/block/nfs.c +++ b/block/nfs.c

Re: [Qemu-devel] [PATCH] block: Make op blockers recursive

2014-08-26 Thread Benoît Canet
On Tue, Aug 26, 2014 at 12:42:04PM +0800, Fam Zheng wrote: On Mon, 08/25 12:12, Benoît Canet wrote: On Mon, Aug 25, 2014 at 05:37:37PM +0800, Fam Zheng wrote: On Mon, 08/25 09:06, Benoît Canet wrote: On Mon, Aug 25, 2014 at 02:04:24PM +0800, Fam Zheng wrote: On Fri, 08/22 18:11

Re: [Qemu-devel] [PATCH] coroutine: Drop co_sleep_ns

2014-08-26 Thread Benoît Canet
(type) + ns); -qemu_coroutine_yield(); -timer_del(sleep_cb.ts); -timer_free(sleep_cb.ts); -} - void coroutine_fn co_aio_sleep_ns(AioContext *ctx, QEMUClockType type, int64_t ns) { -- 2.1.0 Reviewed-by: Benoît Canet benoit.ca

Re: [Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane

2014-08-26 Thread Benoît Canet
; typedef struct MultiReqBuffer { -- 2.1.0 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH] block: Make op blockers recursive

2014-08-25 Thread Benoît Canet
On Mon, Aug 25, 2014 at 02:04:24PM +0800, Fam Zheng wrote: On Fri, 08/22 18:11, Benoît Canet wrote: Since the block layer code is starting to modify the BDS graph right in the middle of BDS chains (block-mirror's replace parameter for example) QEMU needs to properly block and unblock

Re: [Qemu-devel] [PATCH] qemu-iotests: stop using /tmp directly

2014-08-25 Thread Benoît Canet
The Sunday 24 Aug 2014 à 21:54:51 (+0200), Peter Wu wrote : On Friday 22 August 2014 20:58:34 Benoît Canet wrote: The Friday 22 Aug 2014 à 13:25:43 (+0200), Peter Wu wrote : Before this patch you could not run multiple tests concurrently as they might clobber each other test files

Re: [Qemu-devel] [PATCH v3 07/10] qcow2: Rebuild refcount structure during check

2014-08-25 Thread Benoît Canet
On Fri, Aug 22, 2014 at 06:31:41PM +0200, Max Reitz wrote: The previous commit introduced the rebuild variable to qcow2's implementation of the image consistency check. Now make use of this by adding a function which creates a completely new refcount structure based solely on the in-memory

Re: [Qemu-devel] is there a limit on the number of in-flight I/O operations?

2014-08-23 Thread Benoît Canet
The Friday 22 Aug 2014 à 18:59:38 (-0600), Chris Friesen wrote : On 07/21/2014 10:10 AM, Benoît Canet wrote: The Monday 21 Jul 2014 à 09:35:29 (-0600), Chris Friesen wrote : On 07/21/2014 09:15 AM, Benoît Canet wrote: The Monday 21 Jul 2014 à 08:59:45 (-0600), Chris Friesen wrote : On 07/19

Re: [Qemu-devel] [PATCH v2 2/9] qcow2: Factor out refcount accounting for check

2014-08-22 Thread Benoît Canet
On Fri, Aug 22, 2014 at 05:26:45PM +0200, Max Reitz wrote: On 21.08.2014 23:16, Benoît Canet wrote: On Thu, Aug 21, 2014 at 01:13:20PM -0600, Eric Blake wrote: On 08/21/2014 12:57 PM, Benoît Canet wrote: On Fri, Aug 15, 2014 at 05:16:19PM +0200, Max Reitz wrote: Put the code for calculating

[Qemu-devel] [PATCH] Implement recursive op blockers

2014-08-22 Thread Benoît Canet
This self contained patch implements recursives op blockers while passing all the ./check -qcow2 tests. Benoît Canet (1): block: Make op blockers recursive block.c | 69 --- block/blkverify.c | 21 +++ block

[Qemu-devel] [PATCH] block: Make op blockers recursive

2014-08-22 Thread Benoît Canet
Since the block layer code is starting to modify the BDS graph right in the middle of BDS chains (block-mirror's replace parameter for example) QEMU needs to properly block and unblock whole BDS subtrees; recursion is a neat way to achieve this task. This patch also takes care of modifying the op

Re: [Qemu-devel] [PATCH v3 02/10] qcow2: Split qcow2_check_refcounts()

2014-08-22 Thread Benoît Canet
, refcount_table, + nb_clusters); /* check OFLAG_COPIED */ ret = check_oflag_copied(bs, res, fix); -- 2.0.4 Thanks it's nicer to read. My opinion changed from It must be good Max took care of it to I did not find any bug :) Reviewed-by: Benoît Canet

Re: [Qemu-devel] [PATCH v3 03/10] qcow2: Pull check_refblocks() up

2014-08-22 Thread Benoît Canet
structures on-disk. */ -- 2.0.4 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH v3 04/10] qcow2: Reuse refcount table in calculate_refcounts()

2014-08-22 Thread Benoît Canet
, nb_clusters; -uint16_t *refcount_table; +uint16_t *refcount_table = NULL; int ret; size = bdrv_getlength(bs-file); -- 2.0.4 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH v3 05/10] qcow2: Fix refcount blocks beyond image end

2014-08-22 Thread Benoît Canet
, +strerror(-ret)); +} else { +res-corruptions++; +} continue; } -- 2.0.4 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH v3 06/10] qcow2: Do not perform potentially damaging repairs

2014-08-22 Thread Benoît Canet
to rebuild refcount structures\n); +} + /* check OFLAG_COPIED */ ret = check_oflag_copied(bs, res, fix); if (ret 0) { -- 2.0.4 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH v3 08/10] qcow2: Clean up after refcount rebuild

2014-08-22 Thread Benoît Canet
to rebuild refcount structures\n); -- 2.0.4 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH v3 01/10] qcow2: Fix leaks in dirty images

2014-08-22 Thread Benoît Canet
; -- 2.0.4 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH v3 10/10] iotests: Add test for potentially damaging repairs

2014-08-22 Thread Benoît Canet
-iotests/group +++ b/tests/qemu-iotests/group @@ -103,3 +103,4 @@ 099 rw auto quick 101 rw auto quick 103 rw auto quick +104 rw auto quick -- 2.0.4 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH] qemu-iotests: stop using /tmp directly

2014-08-22 Thread Benoît Canet
The Friday 22 Aug 2014 à 13:25:43 (+0200), Peter Wu wrote : Before this patch you could not run multiple tests concurrently as they might clobber each other test files. This patch solves that by using random temporary directory instead of `/tmp` (for writing output in the individual tests and

Re: [Qemu-devel] [PATCH v3 10/10] iotests: Add test for potentially damaging repairs

2014-08-22 Thread Benoît Canet
On Fri, Aug 22, 2014 at 01:55:01PM -0600, Eric Blake wrote: On 08/22/2014 10:31 AM, Max Reitz wrote: There are certain cases where repairing a qcow2 image might actually damage it further (or rather, where repairing it has in fact damaged it further with the old qcow2 check implementation).

Re: [Qemu-devel] [PATCH v5 2/2] block/quorum: add simple read pattern support

2014-08-21 Thread Benoît Canet
The Friday 15 Aug 2014 à 13:05:17 (+0800), Liu Yuan wrote : This patch adds single read pattern to quorum driver and quorum vote is default pattern. For now we do a quorum vote on all the reads, it is designed for unreliable underlying storage such as non-redundant NFS to make sure data

Re: [Qemu-devel] [PATCH 1/2] raw-posix: fix O_DIRECT short reads

2014-08-21 Thread Benoît Canet
) { offset = -errno; break; -- 1.9.3 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH 2/2] qemu-iotests: add test case 101 for short file I/O

2014-08-21 Thread Benoît Canet
file == +dd if=/dev/zero of=$TEST_IMG bs=1 count=320 + +echo +echo == reading bytes beyond EOF gives zeroes == We could pad the file with 0xFF to make sure the read really get only zeroes. Reviewed-by: Benoît Canet benoit.ca...@nodalink.com +$QEMU_IO -c read -P 0 0 512 $TEST_IMG

Re: [Qemu-devel] [PATCH v2] vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted

2014-08-21 Thread Benoît Canet
), cluster_sectors); +extent-next_cluster_sector = ROUND_UP(nb_sectors, cluster_sectors); if (s-num_extents 1) { extent-end_sector = (*(extent - 1)).end_sector + extent-sectors; -- 1.9.3 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH 1/4] qcow2: Fix leak of QemuOpts in qcow2_open()

2014-08-21 Thread Benoît Canet
@@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags, return ret; fail: +qemu_opts_del(opts); g_free(s-unknown_header_fields); cleanup_unknown_header_ext(bs); qcow2_free_snapshots(bs); -- 2.0.4 Reviewed-by: Benoît Canet benoit.ca

Re: [Qemu-devel] [PATCH v2 2/9] qcow2: Factor out refcount accounting for check

2014-08-21 Thread Benoît Canet
On Thu, Aug 21, 2014 at 01:13:20PM -0600, Eric Blake wrote: On 08/21/2014 12:57 PM, Benoît Canet wrote: On Fri, Aug 15, 2014 at 05:16:19PM +0200, Max Reitz wrote: Put the code for calculating the reference counts during qemu-img check into an own function. Also, do not use g_realloc

Re: [Qemu-devel] QEMU block layer todo list

2014-08-20 Thread Benoît Canet
The Wednesday 20 Aug 2014 à 09:57:39 (+0200), Christian Borntraeger wrote : On 19/08/14 16:20, Stefan Hajnoczi wrote: The following wiki page contains a list of proposed tasks for the QEMU block layer: http://qemu-project.org/Features/Block/Todo Benoit requested that we make the

Re: [Qemu-devel] [PATCH v8] slirp/misc: Use the GLib memory allocation APIs

2014-08-20 Thread Benoît Canet
; -} -#endif - void slirp_connection_info(Slirp *slirp, Monitor *mon) { const char * const tcpstates[] = { -- 1.7.12.4 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [RFC V2 0/8] Throttle group cooperative round robin scheduling

2014-08-20 Thread Benoît Canet
On Wed, Aug 13, 2014 at 04:23:51PM +0200, Benoît Canet wrote: Hi, Here is my current wip on the throttle group support. For the user interface I implemented Stefanha's idea proposed in Stuttgart. For the throttling algorithm I use a cooperative round robin scheduler. Classical round

Re: [Qemu-devel] [PATCH v2 1/7] block: Add status callback to bdrv_amend_options()

2014-08-15 Thread Benoît Canet
: %s, strerror(-ret)); goto out; -- 2.0.3 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH v2 2/7] qemu-img: Add progress output for amend

2014-08-15 Thread Benoît Canet
-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH v2 4/7] block/qcow2: Implement status CB for amend

2014-08-15 Thread Benoît Canet
*bs, QEMUSnapshotInfo *sn_info); -- 2.0.3 Ok it's the driver responsability to check if the callback is not null. That make sense. Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH v2 5/7] block/qcow2: Make get_refcount() global

2014-08-15 Thread Benoît Canet
cluster_index, int addend, enum qcow2_discard_type type); -- 2.0.3 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH v5 1/2] qapi: add read-pattern enum for quorum

2014-08-15 Thread Benoît Canet
' } } ## # @BlockdevOptions -- 1.9.1 Reviewed-by: Benoît Canet benoit.ca...@nodalink.com

Re: [Qemu-devel] [PATCH v2 2/7] qemu-img: Add progress output for amend

2014-08-15 Thread Benoît Canet
The Friday 15 Aug 2014 à 15:06:12 (+0200), Max Reitz wrote : On 15.08.2014 13:18, Benoît Canet wrote: The Saturday 02 Aug 2014 à 01:49:16 (+0200), Max Reitz wrote : Now that bdrv_amend_options() supports a status callback, use it to display a progress report. Signed-off-by: Max Reitz mre

[Qemu-devel] [PATCH v2 03/26] monitor: Convert Monitor reset_seen field too boolean

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index c6b450b..48a147c 100644 --- a/monitor.c +++ b/monitor.c @@ -191,7 +191,7 @@ typedef struct MonitorQAPIEventState { struct

[Qemu-devel] [PATCH v2 01/26] qmp: Extract system emulation related code from qmp.c into qmp-system.c

2014-08-15 Thread Benoît Canet
This patch will allow linking qmp.o with utility binaries without dragging in too many unrelated object files and external dependencies. Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- Makefile.objs | 2 +- qmp-system.c | 376

[Qemu-devel] [PATCH v2 04/26] monitor: Convert mon_cmd_t to MonitorCommand

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor.c | 68 +++ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/monitor.c b/monitor.c index 48a147c..f57dae5 100644 --- a/monitor.c +++ b/monitor.c @@ -123,7

[Qemu-devel] [PATCH v2 10/26] monitor: Extract a couple of function to monitor-system.c

2014-08-15 Thread Benoît Canet
The extracted function are help_cmd, do_help_cmd, do_trace_event_set_state, and do_trace_file. Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor-system.c | 121 +++ monitor.c| 121

[Qemu-devel] [PATCH v2 07/26] monitor: Extract monitor_fprintf to monitor-system.c

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- Makefile.target | 1 + disas.c | 10 ++ include/monitor/monitor-system.h | 3 ++ include/monitor/monitor.h| 2 -- monitor-system.c | 69

[Qemu-devel] [PATCH v2 22/26] monitor: Extract hardware dependent completion function from monitor.c to monitor-system.c

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor-system.c | 283 +++ monitor.c| 281 -- 2 files changed, 283 insertions(+), 281 deletions(-) diff --git a/monitor

[Qemu-devel] [PATCH v2 02/26] monitor: Make some function public

2014-08-15 Thread Benoît Canet
Next commits will split monitor.c to monitor.c and monitor-system.c. Change some functions from static to public in order to prepare for this. Signed-off-by: Benoît Canet benoit.ca...@nodalink.com Reviewed-by: Eric Blake ebl...@redhat.com --- include/monitor/monitor.h | 10 ++ monitor.c

[Qemu-devel] [PATCH v2 06/26] monitor: Make monitor_fprintf public before extracting it

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com Reviewed-by: Eric Blake ebl...@redhat.com --- disas.c | 10 -- include/monitor/monitor.h | 2 ++ monitor.c | 4 ++-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/disas.c b/disas.c

[Qemu-devel] [PATCH v2 20/26] monitor: Move qmp_rtc_reset_reinjection from monitor.c to monitor-system.c

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor-system.c | 7 +++ monitor.c| 7 --- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/monitor-system.c b/monitor-system.c index 436dfad..ca0d0ff 100644 --- a/monitor-system.c +++ b/monitor-system.c

[Qemu-devel] [PATCH v2 11/26] monitor: Make do_info_help public

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- include/monitor/monitor-system.h | 1 + monitor.c| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/monitor/monitor-system.h b/include/monitor/monitor-system.h index 2e9abd2..a9e6f36

[Qemu-devel] [PATCH v2 09/26] monitor: Make some function to extract public

2014-08-15 Thread Benoît Canet
The functions made public are: help_cmd, do_help_cmd, do_trace_event_set_state and do_trace_file. Put the header declaration in monitor/monitor-system.h directly to avoid a type conflict. Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- include/monitor/monitor-system.h | 4

[Qemu-devel] [PATCH v2 12/26] monitor: Extract do_info_help in monitor-system.c

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor-system.c | 5 + monitor.c| 5 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/monitor-system.c b/monitor-system.c index e725a42..9dc270b 100644 --- a/monitor-system.c +++ b/monitor-system.c

[Qemu-devel] [PATCH v2 24/26] qemu-nbd: build QAPI block core into qemu-nbd

2014-08-15 Thread Benoît Canet
Compile and link QAPI block core code into qemu-nbd. This patch circle around unwanted dependecies by stubing some functions in the stubs directory. Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- Makefile| 33

[Qemu-devel] [PATCH v2 26/26] qemu-nbd: Add --qmp option to qemu-nbd.

2014-08-15 Thread Benoît Canet
This patch add a -qmp parameter to the qemu-nbd command line in order to be able to manipulate the qemu-nbd block devices via qmp. This could be used with containers to easily migrate from qemu to a container. Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- Makefile.objs

[Qemu-devel] [PATCH v2 00/26] Extract qmp.c and monitor.c core and wire QMP into qemu-nbd

2014-08-15 Thread Benoît Canet
In v2: Applied Eric's suggestions Applied Eric's Rev By changed my personal email into my company email Benoît Canet (26): qmp: Extract system emulation related code from qmp.c into qmp-system.c monitor: Make some function public monitor: Convert Monitor

[Qemu-devel] [PATCH v2 15/26] monitor: Move do_loadvm from monitor.c to monitor-system.c

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor-system.c | 12 monitor.c| 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/monitor-system.c b/monitor-system.c index a87203c..b6f33a7 100644 --- a/monitor-system.c +++ b/monitor

[Qemu-devel] [PATCH v2 18/26] monitor: Move more functions from monitor.c to monitor-system.c

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor-system.c | 69 monitor.c| 69 2 files changed, 69 insertions(+), 69 deletions(-) diff --git a/monitor

[Qemu-devel] [PATCH v2 16/26] monitor: Make commands public before moving them to monitor-system.c

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/monitor.c b/monitor.c index 5017ecf..6288334 100644 --- a/monitor.c +++ b/monitor.c @@ -173,10 +173,10 @@ static QLIST_HEAD(mon_list, Monitor

[Qemu-devel] [PATCH v2 17/26] monitor: Move MonitorCommand arrays and some function from monitor.c to monitor-system.c

2014-08-15 Thread Benoît Canet
Also add sizeof variables for MonitorCommand arrays for cross modules usage. Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor-system.c | 984 monitor.c| 1010 ++ 2

[Qemu-devel] [PATCH v2 08/26] monitor: Extract qmp_human_monitor_command into monitor-system.c

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor-system.c | 43 +++ monitor.c| 44 2 files changed, 43 insertions(+), 44 deletions(-) diff --git a/monitor-system.c b/monitor-system.c

[Qemu-devel] [PATCH v2 05/26] monitor: Extract monitor-system.h header

2014-08-15 Thread Benoît Canet
This header will allow allow splitting the monitor into two parts. Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- include/monitor/monitor-system.h | 99 monitor.c| 57 ++- 2 files changed, 102

[Qemu-devel] [PATCH v2 23/26] monitor: Cleanup monitor.c includes after extracting monitor-system.c

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor.c | 35 --- 1 file changed, 35 deletions(-) diff --git a/monitor.c b/monitor.c index bc67e7a..c376ae3 100644 --- a/monitor.c +++ b/monitor.c @@ -22,64 +22,29 @@ * THE SOFTWARE. */ #include

[Qemu-devel] [PATCH v2 21/26] monitor-system: Switch back functions to static

2014-08-15 Thread Benoît Canet
The move from monitor.c to monitor-system.c is done these functions no longer needs to be public. Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- include/monitor/monitor-system.h | 46 monitor-system.c | 93

[Qemu-devel] [PATCH v2 19/26] monitor: Move two net functions from monitor.c to monitor-system.c

2014-08-15 Thread Benoît Canet
With this move the monitor.c/monitor-system.c split is complete. Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- monitor-system.c | 49 + monitor.c| 49 - 2 files changed, 49

[Qemu-devel] [PATCH v2 13/26] monitor: Make some monitor functions public before moving them in monitor-system.c

2014-08-15 Thread Benoît Canet
This will allow monitor.c to access these functions once they are moved in monitor-system.c Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- include/monitor/monitor-system.h | 37 ++ monitor-system.c | 1164 ++ monitor.c

[Qemu-devel] [PATCH v2 25/26] qapi: Add a script to filter qmp-commands-old.h to generate a subset of it.

2014-08-15 Thread Benoît Canet
Since qmp-command-olds.h is generated from qmp-commands.hx we will sometime want to include only a subset of it. For example when linking qapi block commands with qemu-nbd. Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- Makefile | 7 +++ scripts

[Qemu-devel] [PATCH v2 14/26] monitor: Make do_loadvm public before moving it to monitor-system.c

2014-08-15 Thread Benoît Canet
Signed-off-by: Benoît Canet benoit.ca...@nodalink.com --- include/monitor/monitor-system.h | 1 + monitor.c| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/monitor/monitor-system.h b/include/monitor/monitor-system.h index 319b30c..af6dc54

Re: [Qemu-devel] [PATCH v5 2/2] block/quorum: add simple read pattern support

2014-08-15 Thread Benoît Canet
The Friday 15 Aug 2014 à 13:05:17 (+0800), Liu Yuan wrote : This patch adds single read pattern to quorum driver and quorum vote is default pattern. For now we do a quorum vote on all the reads, it is designed for unreliable underlying storage such as non-redundant NFS to make sure data

[Qemu-devel] [RFC V2 0/8] Throttle group cooperative round robin scheduling

2014-08-14 Thread Benoît Canet
queues -Compatible with the throttling code with almost no changes -As you go scheduling Best regards Benoît Benoît Canet (8): throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure throttle: Add throttle group infrastructure throttle: Add throttle group

[Qemu-devel] [RFC V2 2/8] throttle: Add throttle group infrastructure

2014-08-14 Thread Benoît Canet
@@ +/* + * QEMU block throttling group infrastructure + * + * Copyright (C) Nodalink, EURL. 2014 + * + * Author: + * Benoît Canet benoit.ca...@nodalink.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License

[Qemu-devel] [RFC V2 4/8] throttle: Prepare to have multiple timers for one ThrottleState

2014-08-14 Thread Benoît Canet
This patch transform the timer_pending call into two boolean values in the ThrottleState structure. This way we are sure that when multiple timers will be used only one can be armed at a time. Signed-off-by: Benoit Canet benoit.ca...@nodalink.com --- block.c | 2 ++

[Qemu-devel] [RFC V2 5/8] throttle: Add a way to know if throttle_schedule_timer had armed a timer

2014-08-14 Thread Benoît Canet
This will be needed by the group throttling patches for the algorithm to be accurate. Signed-off-by: Benoit Canet benoit.ca...@nodalink.com --- block.c | 7 +-- include/qemu/throttle.h | 3 ++- util/throttle.c | 12 +++- 3 files changed, 14 insertions(+), 8

[Qemu-devel] [RFC V2 8/8] throttle: Update throttle infrastructure copyright

2014-08-14 Thread Benoît Canet
100644 --- a/include/qemu/throttle.h +++ b/include/qemu/throttle.h @@ -1,10 +1,10 @@ /* * QEMU throttling infrastructure * - * Copyright (C) Nodalink, SARL. 2013 + * Copyright (C) Nodalink, EURL. 2013-2014 * * Author: - * Benoît Canet benoit.ca...@irqsave.net + * Benoît Canet benoit.ca

[Qemu-devel] [RFC V2 1/8] throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure

2014-08-14 Thread Benoît Canet
Group throttling will share ThrottleState between multiple bs. As a consequence the ThrottleState will be accessed by multiple aio context. Timers are tied to their aio context so they must go out of the ThrottleState structure. This commit pave the way for each bs of a common ThrottleState to

[Qemu-devel] [RFC V2 6/8] throttle: Add a way to fire one of the timers asap like a bottom half

2014-08-14 Thread Benoît Canet
This will be needed by the group throttling algorithm. Signed-off-by: Benoit Canet benoit.ca...@nodalink.com --- include/qemu/throttle.h | 2 ++ util/throttle.c | 11 +++ 2 files changed, 13 insertions(+) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index

[Qemu-devel] [RFC V2 3/8] throttle: Add throttle group infrastructure tests

2014-08-14 Thread Benoît Canet
Signed-off-by: Benoit Canet benoit.ca...@nodalink.com --- tests/test-throttle.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/tests/test-throttle.c b/tests/test-throttle.c index 66e4982..50e6655 100644 --- a/tests/test-throttle.c +++

[Qemu-devel] [RFC V2 7/8] throttle: Add throttle group support

2014-08-14 Thread Benoît Canet
The throttle group support use a cooperative round robin scheduling algorithm. The principle of the algorithm are simple: - Each BDS of the group is used as a token in a circular way. - The active BDS compute if a wait must be done and arm the right timer. - If a wait must be done the token timer

Re: [Qemu-devel] [PATCH v4 2/2] block/quorum: add simple read pattern support

2014-08-14 Thread Benoît Canet
The Thursday 17 Jul 2014 à 13:18:56 (+0800), Liu Yuan wrote : This patch adds single read pattern to quorum driver and quorum vote is default pattern. For now we do a quorum vote on all the reads, it is designed for unreliable underlying storage such as non-redundant NFS to make sure data

Re: [Qemu-devel] [PATCH 1/8] qcow2: Factor out refcount accounting for check

2014-08-14 Thread Benoît Canet
The Wednesday 13 Aug 2014 à 23:01:43 (+0200), Max Reitz wrote : Put the code for calculating the reference counts during qemu-img check into an own function. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-refcount.c | 202 + 1

Re: [Qemu-devel] [PATCH 2/8] qcow2: Factor out refcount comparison for check

2014-08-14 Thread Benoît Canet
The Wednesday 13 Aug 2014 à 23:01:44 (+0200), Max Reitz wrote : Put the code for comparing the calculated refcounts against the on-disk refcounts during qemu-img check into an own function. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-refcount.c | 91

Re: [Qemu-devel] [PATCH 3/8] qcow2: Fix refcount blocks beyond image end

2014-08-14 Thread Benoît Canet
The Wednesday 13 Aug 2014 à 23:01:45 (+0200), Max Reitz wrote : If the qcow2 check function detects a refcount block located beyond the image end, grow the image appropriately. This cannot break anything and is the logical fix for such a case. Signed-off-by: Max Reitz mre...@redhat.com ---

Re: [Qemu-devel] [PATCH 4/8] qcow2: Do not perform potentially damaging repairs

2014-08-14 Thread Benoît Canet
The Wednesday 13 Aug 2014 à 23:01:46 (+0200), Max Reitz wrote : If a referenced cluster has a refcount of 0, increasing its refcount may result in clusters being allocated for the refcount structures. This may overwrite the referenced cluster, therefore we cannot simply increase the refcount

Re: [Qemu-devel] [PATCH 5/8] qcow2: Rebuild refcount structure during check

2014-08-14 Thread Benoît Canet
The Wednesday 13 Aug 2014 à 23:01:47 (+0200), Max Reitz wrote : The previous commit introduced the rebuild variable to qcow2's implementation of the image consistency check. Now make use of this by adding a function which creates a completely new refcount structure based solely on the

Re: [Qemu-devel] [PATCHv2 1/3] rename parse_enum_option to qapi_enum_parse and make it public

2014-08-14 Thread Benoît Canet
The Wednesday 13 Aug 2014 à 19:20:17 (+0200), Peter Lieven wrote : relaxing the license to LGPLv2+ is intentional. Suggested-by: Markus Armbruster arm...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com Signed-off-by: Peter Lieven p...@kamp.de Reviewed-by: Eric Blake ebl...@redhat.com

Re: [Qemu-devel] [PATCHv2 2/3] qemu-nbd: add option to set detect-zeroes mode

2014-08-14 Thread Benoît Canet
The Wednesday 13 Aug 2014 à 19:20:18 (+0200), Peter Lieven wrote : Signed-off-by: Peter Lieven p...@kamp.de Reviewed-by: Eric Blake ebl...@redhat.com --- qemu-nbd.c | 25 + 1 file changed, 25 insertions(+) diff --git a/qemu-nbd.c b/qemu-nbd.c index

Re: [Qemu-devel] [PATCH v1] test-coroutine: test cost introduced by coroutine

2014-08-13 Thread Benoît Canet
The Wednesday 13 Aug 2014 à 18:08:47 (+0800), Ming Lei wrote : This test runs dummy function with coroutine by using two enter and one yield since which is a common usage. So we can see the cost introduced by corouting for running one function, for example: Run operation 2000

Re: [Qemu-devel] [PATCH v2] block.curl: adding 'curltimeout' option

2014-08-13 Thread Benoît Canet
The Tuesday 12 Aug 2014 à 16:12:57 (-0300), Daniel Henrique Barboza wrote : The curl hardcoded timeout (5 seconds) sometimes is not long enough depending on the remote server configuration and network traffic. The user should be able to set how much long he is willing to wait for the

[Qemu-devel] [RFC 3/5] throttle: Add throttle group infrastructure tests

2014-08-12 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- tests/test-throttle.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/tests/test-throttle.c b/tests/test-throttle.c index 66e4982..494a806 100644 --- a/tests/test-throttle.c +++

[Qemu-devel] [RFC 5/5] throttle: Add throttle group support.

2014-08-12 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 157 -- block/qapi.c | 2 +- blockdev.c| 16 - hmp.c | 4 +- include/block/block.h | 2 +-

[Qemu-devel] [RFC 4/5] throttle: Prepare to have multiple timers for one ThrottleState

2014-08-12 Thread Benoît Canet
This patch transform the timer_pending call into two boolean values in the ThrottleState structure. This way we are sure that when multiple timers will be used only one can be armed at a time. Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 2 ++

[Qemu-devel] [RFC 2/5] throttle: Add throttle group infrastructure.

2014-08-12 Thread Benoît Canet
/qemu/throttle-groups.h @@ -0,0 +1,43 @@ +/* + * QEMU throttling group infrastructure + * + * Copyright (C) Nodalink, EURL. 2014 + * + * Author: + * Benoît Canet benoit.ca...@irqsave.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU

[Qemu-devel] [RFC 1/5] throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure

2014-08-12 Thread Benoît Canet
Group throttling will share ThrottleState between multiple bs. As a consequence the ThrottleState will be accessed by multiple aio context. Timers are tied to their aio context so they must go out of the ThrottleState structure. This commit pave the way for each bs of a common ThrottleState to

[Qemu-devel] [RFC 0/5] Throttle group cooperative round robin scheduling

2014-08-12 Thread Benoît Canet
queues -Compatible with the throttling code with almost no changes -As you go scheduling Best regards Benoît Benoît Canet (5): throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure throttle: Add throttle group infrastructure. throttle: Add throttle group

Re: [Qemu-devel] [PATCH v2 1/7] block: Add status callback to bdrv_amend_options()

2014-08-04 Thread Benoît Canet
The Saturday 02 Aug 2014 à 01:49:15 (+0200), Max Reitz wrote : Depending on the changed options and the image format, bdrv_amend_options() may take a significant amount of time. In these cases, a way to be informed about the operation's status is desirable. Since the operation is rather

Re: [Qemu-devel] [PATCH v2 2/7] qemu-img: Add progress output for amend

2014-08-04 Thread Benoît Canet
The Saturday 02 Aug 2014 à 01:49:16 (+0200), Max Reitz wrote : Now that bdrv_amend_options() supports a status callback, use it to display a progress report. Signed-off-by: Max Reitz mre...@redhat.com --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 25 ++---

Re: [Qemu-devel] [PATCH v2 4/7] block/qcow2: Implement status CB for amend

2014-08-04 Thread Benoît Canet
The Saturday 02 Aug 2014 à 01:49:18 (+0200), Max Reitz wrote : The only really time-consuming operation potentially performed by qcow2_amend_options() is zero cluster expansion when downgrading qcow2 images from compat=1.1 to compat=0.10, so report status of that operation and that operation

Re: [Qemu-devel] [PATCH v2 5/7] block/qcow2: Make get_refcount() global

2014-08-04 Thread Benoît Canet
The Saturday 02 Aug 2014 à 01:49:19 (+0200), Max Reitz wrote : Reading the refcount of a cluster is an operation which can be useful in all of the qcow2 code, so make that function globally available. While touching this function, amend the comment describing the addend parameter: It is (no

Re: [Qemu-devel] [PATCH v2 6/7] block/qcow2: Simplify shared L2 handling in amend

2014-08-04 Thread Benoît Canet
The Saturday 02 Aug 2014 à 01:49:20 (+0200), Max Reitz wrote : Currently, we have a bitmap for keeping track of which clusters have been created during the zero cluster expansion process. This was necessary because we need to properly increase the refcount for shared L2 tables. However, now

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Benoît Canet
The Thursday 31 Jul 2014 à 11:55:28 (+0800), Ming Lei wrote : On Thu, Jul 31, 2014 at 7:37 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 30/07/2014 19:15, Ming Lei ha scritto: On Wed, Jul 30, 2014 at 9:45 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 30/07/2014 13:39, Ming Lei ha

Re: [Qemu-devel] [PATCH v2 1/2] block: fix overlapping multiwrite requests

2014-07-31 Thread Benoît Canet
The Wednesday 30 Jul 2014 à 09:53:30 (+0100), Stefan Hajnoczi wrote : When request A is a strict superset of request B: multiwrite_merge() merges them as follows: AA The tail of request A should have been included: AAAA This patch fixes data loss

Re: [Qemu-devel] [PATCH v2 2/2] qemu-iotests: add multiwrite test cases

2014-07-31 Thread Benoît Canet
The Wednesday 30 Jul 2014 à 09:53:31 (+0100), Stefan Hajnoczi wrote : This test case covers the basic bdrv_aio_multiwrite() scenarios: 1. Single request 2. Sequential requests (AABB) 3. Superset overlapping requests (AABBAA) 4. Subset overlapping requests (BBAABB) 5. Head overlapping

Re: [Qemu-devel] [PATCH alt 1/7] block: Add status callback to bdrv_amend_options()

2014-07-31 Thread Benoît Canet
The Saturday 26 Jul 2014 à 21:22:05 (+0200), Max Reitz wrote : Depending on the changed options and the image format, bdrv_amend_options() may take a significant amount of time. In these cases, a way to be informed about the operation's status is desirable. Since the operation is rather

Re: [Qemu-devel] [PATCH alt 2/7] qemu-img: Add progress output for amend

2014-07-31 Thread Benoît Canet
The Saturday 26 Jul 2014 à 21:22:06 (+0200), Max Reitz wrote : Now that bdrv_amend_options() supports a status callback, use it to display a progress report. Signed-off-by: Max Reitz mre...@redhat.com --- qemu-img.c | 26 +++--- 1 file changed, 23 insertions(+), 3

Re: [Qemu-devel] [PATCH alt 3/7] qemu-img: Fix insignifcant memleak

2014-07-31 Thread Benoît Canet
The Saturday 26 Jul 2014 à 21:22:07 (+0200), Max Reitz wrote : As soon as options is set in img_amend(), it needs to be freed before the function returns. This leak is rather insignifcant, as qemu-img will exit subsequently anyway, but there's no point in not fixing it. Signed-off-by: Max

<    1   2   3   4   5   6   7   8   9   10   >