Re: [Qemu-devel] [PATCH 8/9] throttle: Update throttle infrastructure copyright

2015-02-24 Thread Benoît Canet
On Tue, Feb 24, 2015 at 09:49:26AM -0700, Eric Blake wrote: > On 02/13/2015 09:06 AM, Alberto Garcia wrote: > > From: Benoît Canet > > > > Signed-off-by: Benoit Canet > > Signed-off-by: Alberto Garcia > > --- > > include/qemu/throttle.h | 4 ++-- > >

Re: [Qemu-devel] Block filter status

2014-12-15 Thread Benoît Canet
On Mon, Dec 15, 2014 at 04:32:19PM +, Farr, Kaitlin M. wrote: > Hello all, > > Hello, 1) I once wanted to write block filters. 2) I am not a QEMU contributor anymore. 3) If you need block filters you also need to write them. Best regards Benoît > I would like to inquire about the status

Re: [Qemu-devel] [PATCH] block: qemu-iotests change _supported_proto to file once more.

2014-10-20 Thread Benoît Canet
; index a8c0c9c..52c529b 100755 > --- a/tests/qemu-iotests/092 > +++ b/tests/qemu-iotests/092 > @@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 > . ./common.filter > > _supported_fmt qcow > -_supported_proto generic > +_supported_proto file > _supported_os Linux > > offset_backing_file_offset=8 > diff --git a/tests/qemu-iotests/103 b/tests/qemu-iotests/103 > index 0f1dc9f..ccab551 100755 > --- a/tests/qemu-iotests/103 > +++ b/tests/qemu-iotests/103 > @@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 > . ./common.filter > > _supported_fmt qcow2 > -_supported_proto file > +_supported_proto file nfs > _supported_os Linux > > IMG_SIZE=64K > -- > 1.7.9.5 > > Seems legit. Reviewed-by: Benoît Canet

Re: [Qemu-devel] [EXTERNAL] Re: how to dynamically add a block device using qmp?

2014-10-14 Thread Benoît Canet
The Monday 13 Oct 2014 à 14:08:18 (-0700), Ken Chiang wrote : > I also tried to add a virt io device to the frontend but still no disc in the > VM. Am I missing anything else? > > > {"QMP": {"version": {"qemu": {"micro": 0, "minor": 0, "major": 2}, "package": > " (Debian 2.0.0+dfsg-2ubuntu1.2)

Re: [Qemu-devel] [PATCH v3 3/3] util: Infrastructure for computing recent averages

2014-10-13 Thread Benoît Canet
On Mon, Oct 13, 2014 at 02:05:34PM +0200, Paolo Bonzini wrote: > Il 24/09/2014 17:21, Benoît Canet ha scritto: > > The module takes care of computing minimal and maximal > > values over the time slice duration. > > The code looks good, just two comments: > >

Re: [Qemu-devel] [PATCH v5 08/11] qcow2: Rebuild refcount structure during check

2014-10-11 Thread Benoît Canet
> +int64_t first_free_cluster = 0, rt_ofs = -1, cluster = 0; > +int64_t rb_ofs, rb_start, rb_index; Everytime a few day pass and I read rb_ofs and rt_ofs again I found these names obfuscated. I know Linus says that C is a spartan language but these look odd. Maybe refcount_block_offset, r

Re: [Qemu-devel] [PATCH 1/3] block: Ignore allocation size in underlying file

2014-10-11 Thread Benoît Canet
The Saturday 11 Oct 2014 à 11:44:20 (+0200), Max Reitz wrote : > Am 10.10.2014 um 13:50 schrieb Benoît Canet: > >The Saturday 16 Aug 2014 à 20:54:16 (+0200), Max Reitz wrote : > >>When falling through to the underlying file in > >>bdrv_co_get_block_status(), do not le

Re: [Qemu-devel] [PATCH 2/3] qemu-io: Respect early image end for map

2014-10-11 Thread Benoît Canet
0; > +} else if (!num) { > +error_report("Unexpected end of image"); > + return 0; > } > > retstr = ret ? "allocated" : "not allocated"; > -- > 2.0.4 > > Reviewed-by: Benoît Canet

Re: [Qemu-devel] [PATCH 2/3] qemu-io: Respect early image end for map

2014-10-11 Thread Benoît Canet
The Saturday 11 Oct 2014 à 11:53:40 (+0200), Max Reitz wrote : > Am 10.10.2014 um 14:03 schrieb Benoît Canet: > >>+} else if (!num) { > >>+error_report("Unexpected end of image"); > >>+return 0; > >I think this test

Re: [Qemu-devel] [PATCH v5 08/11] qcow2: Rebuild refcount structure during check

2014-10-10 Thread Benoît Canet
> +*nb_clusters = cluster + cluster_count - contiguous_free_clusters; > +*refcount_table = g_try_realloc(*refcount_table, > +*nb_clusters * sizeof(uint16_t)); Something tells me that these sizeof(uint16_t) are connected to s->refcount_order

Re: [Qemu-devel] [PATCH v5 01/11] qcow2: Calculate refcount block entry count

2014-10-10 Thread Benoît Canet
On Fri, Aug 29, 2014 at 11:40:53PM +0200, Max Reitz wrote: > The size of a refblock entry is (in theory) variable; calculate > therefore the number of entries per refblock and the according bit shift > (1 << x == entry count) when opening an image. > > Signed-off-by: Max Reitz > --- > block/qcow

Re: [Qemu-devel] [PATCH 2/3] qemu-io: Respect early image end for map

2014-10-10 Thread Benoît Canet
> +} else if (!num) { > +error_report("Unexpected end of image"); > +return 0; I think this test can miss some case of Unexpected end of image. For example supose that in map_is_allocated the first bdrv_is_allocated actually succeed then *pnum = num. Then the botto

Re: [Qemu-devel] [PATCH 1/3] block: Ignore allocation size in underlying file

2014-10-10 Thread Benoît Canet
The Saturday 16 Aug 2014 à 20:54:16 (+0200), Max Reitz wrote : > When falling through to the underlying file in > bdrv_co_get_block_status(), do not let the number of sectors for which > information could be obtained be overwritten. > > Signed-off-by: Max Reitz > --- > block.c | 6 -- > 1 fi

Re: [Qemu-devel] [PATCH 1/2] raw-posix: Fix raw_co_get_block_status() after EOF

2014-10-10 Thread Benoît Canet
gt; +*pnum = 0; > +return 0; > +} > > ret = try_fiemap(bs, start, &data, &hole, nb_sectors, pnum); > if (ret < 0) { > -- > 2.1.0 > > Reviewed-by: Benoît Canet

Re: [Qemu-devel] [PATCH v1 7/8] throttle: Add throttle group support

2014-10-10 Thread Benoît Canet
On Thu, Oct 09, 2014 at 04:58:22PM +0800, Fam Zheng wrote: > On Wed, 10/08 11:05, Benoît Canet wrote: > > On Wed, Oct 08, 2014 at 02:53:38PM +0800, Fam Zheng wrote: > > > > > > Does this mean that after this series, all the throttle_states must be > > > contain

Re: [Qemu-devel] [PATCH v2 0/2] raw-posix: Fix raw_co_get_block_status()

2014-10-09 Thread Benoît Canet
On Wed, Oct 08, 2014 at 09:43:19PM +0200, Max Reitz wrote: > On 22.09.2014 17:36, Max Reitz wrote: > >raw_co_get_block_status() should return 0 and set *pnum to 0 after the > >EOF; currently it does this merely by accident, so implement it > >directly. Also, nb_sectors should be clamped against the

Re: [Qemu-devel] [PATCH v1 7/8] throttle: Add throttle group support

2014-10-08 Thread Benoît Canet
On Wed, Oct 08, 2014 at 02:53:38PM +0800, Fam Zheng wrote: > > Does this mean that after this series, all the throttle_states must be > contained inside its own throttle group? If so, we could embed ThrottleGroup > fields in ThrottleState. > > It's weird when a function called throttle_group_comp

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

2014-10-07 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 --- block.c | 2 ++ include/qemu/throttle.h | 3 +++ uti

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

2014-10-07 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 h

[Qemu-devel] [PATCH v1 7/8] throttle: Add throttle group support

2014-10-07 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

[Qemu-devel] [PATCH v1 3/8] throttle: Add throttle group infrastructure tests

2014-10-07 Thread Benoît Canet
Signed-off-by: Benoit Canet --- tests/test-throttle.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/tests/test-throttle.c b/tests/test-throttle.c index 3e52df3..ecb5504 100644 --- a/tests/test-throttle.c +++ b/tests/test-throttle.c @@ -15

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

2014-10-07 Thread Benoît Canet
This will be needed by the group throttling algorithm. Signed-off-by: Benoit Canet --- 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 3a16c48..3b9d1b8 100644 --- a/

[Qemu-devel] [PATCH v1 8/8] throttle: Update throttle infrastructure copyright

2014-10-07 Thread Benoît Canet
/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 + * Benoît Canet * * This program is free software; you can redistribute

[Qemu-devel] [PATCH v1 2/8] throttle: Add throttle group infrastructure

2014-10-07 Thread Benoît Canet
QEMU block throttling group infrastructure + * + * Copyright (C) Nodalink, EURL. 2014 + * + * Author: + * Benoît Canet + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Found

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

2014-10-07 Thread Benoît Canet
This will be needed by the group throttling patches for the algorithm to be accurate. Signed-off-by: Benoit Canet --- block.c | 7 +-- include/qemu/throttle.h | 3 ++- util/throttle.c | 12 +++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a

[Qemu-devel] [PATCH v1 0/8] Block Throttle Group Support

2014-10-07 Thread Benoît Canet
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 infrastructure tests throttle: Prepare t

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

2014-10-01 Thread Benoît Canet
> > > > The main purpose of this is mirror.c and commit.c would form BDS loops on > > completion. > > These callers could break the look manually but the code would fail > > if a loop is not breaked and the blocker function are called on it. > > So the blocker code have to handle recursion loops.

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

2014-10-01 Thread Benoît Canet
Thanks a lot for reviewing this patch. Since the code is not trivial I will give my arguments for writing it this way. > > +/* block recursively a BDS > > + * > > + * If base != NULL the caller must make sure that there is no multiple > > child > > + * BDS in the subtree pointed to by bs > >

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

2014-09-30 Thread Benoît Canet
> > Seems like these new functions would be better named '.bdrv_op_block' > and '.bdrv_op_unblock'? That way, recursive or not, it is clear block > drivers can implement whatever blocking is appropriate for themselves. > > > QLIST_ENTRY(BlockDriver) list; > > }; Hi, Thanks a lot for revi

Re: [Qemu-devel] [PATCH 0/2] Virtio-9p live migration patchset

2014-09-30 Thread Benoît Canet
The Tuesday 30 Sep 2014 à 22:08:12 (+0300), Boris Sukholitko wrote : > On Tue, Sep 30, 2014 at 12:46 AM, Benoît Canet > wrote: > > The Friday 26 Sep 2014 à 18:19:55 (+0300), Boris Sukholitko wrote : > >> This patchset is a small rebase of the 9p live migration patches made

Re: [Qemu-devel] [PATCH v3 2/3] timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse

2014-09-29 Thread Benoît Canet
On Mon, Sep 29, 2014 at 11:54:47PM +0200, Paolo Bonzini wrote: > Il 29/09/2014 18:04, Benoît Canet ha scritto: > > On Wed, Sep 24, 2014 at 05:33:45PM +0200, Paolo Bonzini wrote: > >> Il 24/09/2014 17:21, Benoît Canet ha scritto: > >>> Reviewed-by: Eric Blake >

Re: [Qemu-devel] [PATCH 1/2] virtio-9p: Add support for 9p migration.

2014-09-29 Thread Benoît Canet
The Friday 26 Sep 2014 à 18:19:56 (+0300), Boris Sukholitko wrote : > This patch is a rebase of Aneesh Kumar's and Benoit Canet's previous > work. > > Signed-off-by: Boris Sukholitko If Aneesh and me worked on this you should also keep our signed-off in addition of yours. Best regards Benoît

Re: [Qemu-devel] [PATCH 0/2] Virtio-9p live migration patchset

2014-09-29 Thread Benoît Canet
The Friday 26 Sep 2014 à 18:19:55 (+0300), Boris Sukholitko wrote : > This patchset is a small rebase of the 9p live migration patches made a year > ago by Benoit Canet. > > See http://lists.gnu.org/archive/html/qemu-devel/2013-04/msg02190.html > for the previous thread. > > I took the liberty to

Re: [Qemu-devel] [PATCH v2 0/2] Recursive op blockers

2014-09-29 Thread Benoît Canet
On Mon, Sep 22, 2014 at 09:00:50PM +0200, Benoît Canet wrote: > in v2: > Added a base parameters [Kevin] > Remove multiple blockers [Kevin] > > Addressed Kevin's comments except BLOCK_OP_TYPE_MIRROR_REPLACE > relaxing > and "You n

Re: [Qemu-devel] [PATCH v3 2/3] timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse

2014-09-29 Thread Benoît Canet
On Wed, Sep 24, 2014 at 05:33:45PM +0200, Paolo Bonzini wrote: > Il 24/09/2014 17:21, Benoît Canet ha scritto: > > Reviewed-by: Eric Blake > > Signed-off-by: Benoît Canet > > --- > > include/qemu/throttle.h | 2 -- > > include/qemu/timer.h| 2 ++ > &g

Re: [Qemu-devel] [PATCH v3 03/23] block: Connect BlockBackend to BlockDriverState

2014-09-25 Thread Benoît Canet
On Tue, Sep 23, 2014 at 03:36:03PM +0200, Kevin Wolf wrote: > Do we have a KVM Forum block layer agenda yet? I think this thread could > already contain a few topics to discuss there. Being the guy who constantly bring back painfull issues (Block filters, Block Backend) on the table I think we sho

Re: [Qemu-devel] [PATCH v3] docs: add blkdebug block driver documentation

2014-09-24 Thread Benoît Canet
The Wednesday 24 Sep 2014 à 10:44:14 (+0100), Stefan Hajnoczi wrote : > The blkdebug block driver is undocumented. Documenting it is worthwhile > since it offers powerful error injection features that are used by > qemu-iotests test cases. > > This document will make it easier for people to learn

Re: [Qemu-devel] [PATCH v2 2/2] block: Catch simultaneous usage of options and their aliases

2014-09-24 Thread Benoît Canet
of context about what's happening. > +error_setg(errp, "the option '%s' and its alias '%s' can't be > used at the " > + "same time", to, from); > +return; > +} Anyway: Reviewed-by: Benoît Canet

[Qemu-devel] [PATCH v3 3/3] util: Infrastructure for computing recent averages

2014-09-24 Thread Benoît Canet
The module takes care of computing minimal and maximal values over the time slice duration. Suggested-by: Paolo Bonzini Signed-off-by: Benoît Canet --- include/qemu/timed-average.h | 60 + tests/Makefile | 2 + tests/test-timed-average.c | 89

[Qemu-devel] [PATCH v3 0/3] timed average infrastructure for use in block statistics

2014-09-24 Thread Benoît Canet
algorithm [Paolo] rewrite commit message [Markus] stub cpu_get_clock in tests [Paolo] Benoît Benoît Canet (3): throttle: Make NANOSECONDS_PER_SECOND an integer timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse util: Infrastructure for computing recent averages

Re: [Qemu-devel] [PATCH v2 1/2] block: Specify -drive legacy option aliases in array

2014-09-24 Thread Benoît Canet
}, > +{ "bps_rd_max", "throttling.bps-read-max" }, > +{ "bps_wr_max", "throttling.bps-write-max" }, > > -qemu_opt_rename(all_opts, > -"iops_size", "throttling.iops-size"); > +{ "iops_size", "throttling.iops-size" }, > > -qemu_opt_rename(all_opts, "readonly", "read-only"); > +{ "readonly", "read-only" }, > +}; > + > +for (i = 0; i < ARRAY_SIZE(opt_renames); i++) { > +qemu_opt_rename(all_opts, opt_renames[i].from, opt_renames[i].to); > +} > > value = qemu_opt_get(all_opts, "cache"); > if (value) { > -- > 1.8.3.1 > > Reviewed-by: Benoît Canet

[Qemu-devel] [PATCH v3 1/3] throttle: Make NANOSECONDS_PER_SECOND an integer

2014-09-24 Thread Benoît Canet
We will want to reuse this define in the future by making it common to multiple QEMU modules. It would be safer that this define be an integer so we avoid strange float rounding errors. Do this conversion. Signed-off-by: Benoît Canet --- include/qemu/throttle.h | 2 +- 1 file changed, 1

[Qemu-devel] [PATCH v3 2/3] timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse

2014-09-24 Thread Benoît Canet
Reviewed-by: Eric Blake Signed-off-by: Benoît Canet --- include/qemu/throttle.h | 2 -- include/qemu/timer.h| 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 8f9e611..1c639d2 100644 --- a/include/qemu/throttle.h

Re: [Qemu-devel] [PATCH v2 3/3] util: Add an utility infrastructure used to compute an average on a time slice

2014-09-24 Thread Benoît Canet
On Mon, Sep 08, 2014 at 04:29:26PM +0200, Paolo Bonzini wrote: > Il 08/09/2014 14:18, Benoît Canet ha scritto: > > The algorithm used was defined on the list while discussing the new IO > > accounting > > overhaul. > > See http://lists.nongnu.org/archive/html/qemu-

[Qemu-devel] [PATCH v2 0/2] Recursive op blockers

2014-09-22 Thread Benoît Canet
than that here?". pass ./check -qcow2 Benoît Canet (2): block: Rename BLOCK_OP_TYPE_REPLACE to BLOCK_OP_TYPE_MIRROR_REPLACE block: Make op blockers recursive block-migration.c | 4 +- block.c | 123 ++ block/blkve

[Qemu-devel] [PATCH v2 1/2] block: Rename BLOCK_OP_TYPE_REPLACE to BLOCK_OP_TYPE_MIRROR_REPLACE

2014-09-22 Thread Benoît Canet
This operation blocker is really specific to the mirroring code so its name should reflect this. Signed-off-by: Benoît Canet --- block.c | 2 +- include/block/block.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index bcd952a..9a9f8a0

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

2014-09-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. An optional base arguments was added to the API

[Qemu-devel] [PATCH v2 1/2] block: Rename BLOCK_OP_TYPE_REPLACE to BLOCK_OP_TYPE_MIRROR_REPLACE

2014-09-22 Thread Benoît Canet
This operation blocker is really specific to the mirroring code so its name should reflect this. Signed-off-by: Benoît Canet --- block.c | 2 +- include/block/block.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index bcd952a..9a9f8a0

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

2014-09-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. An optional base arguments was added to the API

[Qemu-devel] [PATCH v2 0/2] Recursive op blockers

2014-09-22 Thread Benoît Canet
than that here?". pass ./check -qcow2 Benoît Canet (2): block: Rename BLOCK_OP_TYPE_REPLACE to BLOCK_OP_TYPE_MIRROR_REPLACE block: Make op blockers recursive block-migration.c | 4 +- block.c | 123 ++ block/blkve

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

2014-09-22 Thread Benoît Canet
On Thu, Sep 18, 2014 at 10:57:48AM +0800, Fam Zheng wrote: > > > > > > > > BLOCK_OP_TYPE_MIRROR_REPLACE is checked and blocked by > > > > block-job-complete > > > > during the time the mirror finish when an arbitrary node of the graph > > > > must be > > > > replaced. > > > > > > It seems to me

Re: [Qemu-devel] [PATCH v3 20/23] block/qapi: Convert qmp_query_block() to BlockBackend

2014-09-22 Thread Benoît Canet
On Tue, Sep 16, 2014 at 08:12:25PM +0200, Markus Armbruster wrote: > Much more command code needs conversion. I start with this one > because it's using bdrv_dev_* functions, which I'm about to lift into > BlockBackend. > > While there, give bdrv_query_info() internal linkage. > > Signed-off-by:

Re: [Qemu-devel] [PATCH v3 22/23] block: Lift device model API into BlockBackend

2014-09-22 Thread Benoît Canet
On Tue, Sep 16, 2014 at 08:12:27PM +0200, Markus Armbruster wrote: > Move device model attachment / detachment and the BlockDevOps device > model callbacks and their wrappers from BlockDriverState to > BlockBackend. > > Signed-off-by: Markus Armbruster > --- > block.c| 12

Re: [Qemu-devel] [PATCH v3 21/23] blockdev: Convert qmp_eject(), qmp_change_blockdev() to BlockBackend

2014-09-22 Thread Benoît Canet
On Tue, Sep 16, 2014 at 08:12:26PM +0200, Markus Armbruster wrote: > Much more command code needs conversion. I'm converting these now > because they's using bdrv_dev_* functions, which I'm about to lift > into BlockBackend. > > Signed-off-by: Markus Armbruster > --- > blockdev.c | 20 +

Re: [Qemu-devel] [PATCH v3 23/23] block: Make device model's references to BlockBackend strong

2014-09-22 Thread Benoît Canet
On Tue, Sep 16, 2014 at 08:12:28PM +0200, Markus Armbruster wrote: > Doesn't make a difference just yet, but it's the right thing to do. > > Signed-off-by: Markus Armbruster > --- > block/block-backend.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/block/block-bac

Re: [Qemu-devel] [PATCH 0/2] Handle interferences between multiple children drivers and stream and commit

2014-09-19 Thread Benoît Canet
On Fri, Sep 19, 2014 at 12:35:36AM -0400, Jeff Cody wrote: > On Mon, Sep 15, 2014 at 04:21:18PM +0200, Benoît Canet wrote: > > We do not want to try to stream or commit with a base argument through > > a multiple children driver. > > > > Handle this case. > >

Re: [Qemu-devel] [PATCH] block: Validate node-name

2014-09-17 Thread Benoît Canet
The Wednesday 17 Sep 2014 à 13:31:06 (+0200), Kevin Wolf wrote : > The device_name of a BlockDriverState is currently checked because it is > always used as a QemuOpts ID and qemu_opts_create() checks whether such > IDs are wellformed. > > node-name is supposed to share the same namespace, but it

Re: [Qemu-devel] [PATCH v3 19/23] blockdev: Drop DriveInfo member enable_auto_del

2014-09-17 Thread Benoît Canet
> 1.9.3 > Reviewed-by: Benoit Canet

Re: [Qemu-devel] [PATCH v3 18/23] blockdev: Fix blockdev-add not to create IDE drive (0, 0)

2014-09-17 Thread Benoît Canet
> -- > 1.9.3 > Reviewed-by: Benoit Canet

Re: [Qemu-devel] [PATCH] block: Validate node-name

2014-09-17 Thread Benoît Canet
> +int qemu_opts_id_wellformed(const char *id) This return 0 and 1 as a bool. Could we make the function return bool in the same series ? I wonder what are the possible interferences between !strchr("-._", id[i]) and Jeff's node name auto naming series.

Re: [Qemu-devel] [PATCH v3 16/23] pc87312: Drop unused members of PC87312State

2014-09-17 Thread Benoît Canet
On Tue, Sep 16, 2014 at 08:12:21PM +0200, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > include/hw/isa/pc87312.h | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/include/hw/isa/pc87312.h b/include/hw/isa/pc87312.h > index befc8bd..bf74470 100644 > --- a/include/hw

Re: [Qemu-devel] [PATCH v3 17/23] blockdev: Drop superfluous DriveInfo member id

2014-09-17 Thread Benoît Canet
On Tue, Sep 16, 2014 at 08:12:22PM +0200, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > block/block-backend.c | 1 - > blockdev.c| 3 +-- > include/sysemu/blockdev.h | 1 - > 3 files changed, 1 insertion(+), 4 deletions(-) > > diff --git a/block/block-ba

Re: [Qemu-devel] [PATCH v3 13/23] virtio-blk: Rename VirtIOBlkConf variables to conf

2014-09-17 Thread Benoît Canet
> -if (size % dev->blk.conf.logical_block_size) { > +if (size % dev->conf.conf.logical_block_size) { This look strange (conf.conf) Anyway this seems correct. Reviewed-by: Benoit Canet

Re: [Qemu-devel] [PATCH v3 12/23] virtio-blk: Drop redundant VirtIOBlock member conf

2014-09-17 Thread Benoît Canet
On Tue, Sep 16, 2014 at 08:12:17PM +0200, Markus Armbruster wrote: > Commit 12c5674 turned it into a pointer to member blk.conf. > > Signed-off-by: Markus Armbruster > --- > hw/block/virtio-blk.c | 28 ++-- > include/hw/virtio/virtio-blk.h | 1 - > 2 files chang

Re: [Qemu-devel] [PATCH v3 10/23] block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()

2014-09-17 Thread Benoît Canet
On Tue, Sep 16, 2014 at 08:12:15PM +0200, Markus Armbruster wrote: > -s->enabled = dinfo ? bdrv_is_inserted(dinfo->bdrv) : 0; > +s->enabled = bs && bdrv_is_inserted(bs); This is not so mechanical but seems correct anyway. Reviewed-by: Benoit Canet

Re: [Qemu-devel] [PATCH v3] async: aio_context_new(): Handle event_notifier_init failure

2014-09-16 Thread Benoît Canet
The Tuesday 16 Sep 2014 à 13:40:24 (-0600), Eric Blake wrote : > On 09/16/2014 12:04 PM, Chrysostomos Nanakos wrote: > > If event_notifier_init fails QEMU exits without printing > > any error information to the user. This commit adds an error > > message on failure: > > > > # qemu [...] > > Show

Re: [Qemu-devel] [PATCH v2] async: aio_context_new(): Handle event_notifier_init failure

2014-09-16 Thread Benoît Canet
> static void iothread_complete(UserCreatable *obj, Error **errp) > { > +Error *local_error = NULL; > IOThread *iothread = IOTHREAD(obj); > > iothread->stopping = false; > -iothread->ctx = aio_context_new(); > +iothread->ctx = aio_context_new(&local_error); > +if (!iot

Re: [Qemu-devel] [PATCH v2 09/23] block: Merge BlockBackend and BlockDriverState name spaces

2014-09-16 Thread Benoît Canet
> 1.9.3 > Reviewed-by: Benoît Canet

Re: [Qemu-devel] [PATCH v2 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-16 Thread Benoît Canet
> #include "qemu-common.h" > -#include "block/block_int.h" > +#include "block/block.h" > +#include "qemu/error-report.h" > +#include "qemu/main-loop.h" That's a lot of include fiddling I am not sure to understand them while looking at the following diff. > #include "hw/hw.h" > #include "qemu

Re: [Qemu-devel] [PATCH v2 07/23] block: Eliminate bdrv_iterate(), use bdrv_next()

2014-09-16 Thread Benoît Canet
' || > +!strncmp(name, str, strlen(str))) { > +readline_add_completion(mon->rs, name); > +} > +} > break; > case 's': > case 'S': > -- > 1.9.3 > Reviewed-by: Benoît Canet

Re: [Qemu-devel] [PATCH v2 06/23] block: Make BlockBackend own its BlockDriverState

2014-09-16 Thread Benoît Canet
> /* blkdev->bs is not create by us, we get a reference > * so we can bdrv_unref() unconditionally */ > -bdrv_ref(blkdev->bs); > +/* Except we don't bdrv_unref() anymore, we blk_unref(). Is this dot extra ? ^ The foll

Re: [Qemu-devel] [PATCH v2 05/23] block: Code motion to get rid of stubs/blockdev.c

2014-09-16 Thread Benoît Canet
e.o > stub-obj-y += chr-testdev.o > diff --git a/stubs/blockdev.c b/stubs/blockdev.c > deleted file mode 100644 > index 5d0a79c..000 > --- a/stubs/blockdev.c > +++ /dev/null > @@ -1,12 +0,0 @@ > -#include > -#include "sysemu/blockdev.h" > - > -DriveInfo *drive_get_by_blockdev(BlockDriverState *bs) > -{ > -return NULL; > -} > - > -void drive_info_del(DriveInfo *dinfo) > -{ > -assert(!dinfo); > -} > -- > 1.9.3 > Reviewed-by: Benoît Canet

Re: [Qemu-devel] [PATCH v2 04/23] block: Connect BlockBackend and DriveInfo

2014-09-16 Thread Benoît Canet
nfo set. Must we try to assert this ? This would require an extra linked list traversal but I don't think it's a performance path anyway. Reviewed-by: Benoît Canet

Re: [Qemu-devel] [PATCH v1] async: aio_context_new(): Handle event_notifier_init failure

2014-09-15 Thread Benoît Canet
The Monday 15 Sep 2014 à 21:03:18 (+0200), Benoît Canet wrote : > The Sunday 14 Sep 2014 à 13:23:13 (+0300), Chrysostomos Nanakos wrote : > > If event_notifier_init fails QEMU exits without printing > > any error information to the user. This commit adds an error > &g

Re: [Qemu-devel] [PATCH v1] async: aio_context_new(): Handle event_notifier_init failure

2014-09-15 Thread Benoît Canet
The Sunday 14 Sep 2014 à 13:23:13 (+0300), Chrysostomos Nanakos wrote : > If event_notifier_init fails QEMU exits without printing > any error information to the user. This commit adds an error > message on failure: > > # qemu [...] > qemu: event_notifier_init failed: Too many open files in syst

Re: [Qemu-devel] [PATCH v7 0/3] block: Introduce "null" drivers

2014-09-15 Thread Benoît Canet
> block/Makefile.objs | 1 + > block/null.c | 178 > +++ > qapi/block-core.json | 57 +++-- > 3 files changed, 215 insertions(+), 21 deletions(-) > create mode 100644 block/null.c > > -- > 1.9.3 > I don't think I will be able to break it further. Reviewed-by: Benoît Canet

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

2014-09-15 Thread Benoît Canet
On Fri, Sep 12, 2014 at 11:48:33AM +0800, Fam Zheng wrote: > On Tue, 09/09 14:28, Benoît Canet wrote: > > On Tue, Sep 09, 2014 at 01:56:46PM +0200, Kevin Wolf wrote: > > > Am 22.08.2014 um 18:11 hat Benoît Canet geschrieben: > > > > Since the block layer code is st

Re: [Qemu-devel] [PATCH v2 03/23] block: Connect BlockBackend to BlockDriverState

2014-09-15 Thread Benoît Canet
> index ff95da6..fa8a7d0 100644 > --- a/qemu-nbd.c > +++ b/qemu-nbd.c > @@ -689,7 +689,7 @@ int main(int argc, char **argv) > } > > blk = blk_new("hda", &error_abort); Is a blk_new_with_bs converssion missing here ? > -bs = bdrv_new_root("hda", &error_abort); > +bs = blk_bs(bl

[Qemu-devel] [PATCH 1/2] block: Introduce a BlockDriver field to flag drivers supporting multiple children

2014-09-15 Thread Benoît Canet
The recursive op blocker patch to come will take an optional base argument which will not have any meaning when an intermediary BDS driver of the graph support multiple children. Flag such drivers to be able to handle this case. CC: Jeff Cody Signed-off-by: Benoît Canet --- block/blkverify.c

[Qemu-devel] [PATCH 2/2] block: commit and stream return an error when a subtree is found

2014-09-15 Thread Benoît Canet
-off-by: Benoît Canet --- block.c | 17 +++-- blockdev.c| 18 -- include/block/block.h | 3 ++- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/block.c b/block.c index d06dd51..ea86252 100644 --- a/block.c +++ b/block.c

[Qemu-devel] [PATCH 0/2] Handle interferences between multiple children drivers and stream and commit

2014-09-15 Thread Benoît Canet
We do not want to try to stream or commit with a base argument through a multiple children driver. Handle this case. Benoît Canet (2): block: Introduce a BlockDriver field to flag drivers supporting multiple children block: commit and stream return an error when a subtree is found

Re: [Qemu-devel] [PATCH v2 02/23] block: New BlockBackend

2014-09-15 Thread Benoît Canet
> --- a/block.c > +++ b/block.c > @@ -2119,10 +2119,11 @@ static void bdrv_delete(BlockDriverState *bs) > > bdrv_close(bs); > > +drive_info_del(drive_get_by_blockdev(bs)); > + > /* remove from list, if necessary */ > bdrv_make_anon(bs); > > -drive_info_del(drive_get_b

Re: [Qemu-devel] [PATCH v2 01/23] block: Split bdrv_new_root() off bdrv_new()

2014-09-15 Thread Benoît Canet
src_flags, > new_backing_drv, &local_err); > if (ret) { > diff --git a/qemu-io.c b/qemu-io.c > index d2ab694..24ca59c 100644 > --- a/qemu-io.c > +++ b/qemu-io.c > @@ -58,7 +58,7 @@ static int openfile(char *name, int flags, int growable, > QDict *opts) > return 1; > } > > -qemuio_bs = bdrv_new("hda", &error_abort); > +qemuio_bs = bdrv_new_root("hda", &error_abort); > > if (growable) { > flags |= BDRV_O_PROTOCOL; > diff --git a/qemu-nbd.c b/qemu-nbd.c > index f3cf8a2..24b8454 100644 > --- a/qemu-nbd.c > +++ b/qemu-nbd.c > @@ -687,7 +687,7 @@ int main(int argc, char **argv) > drv = NULL; > } > > -bs = bdrv_new("hda", &error_abort); > +bs = bdrv_new_root("hda", &error_abort); > > srcpath = argv[optind]; > ret = bdrv_open(&bs, srcpath, NULL, NULL, flags, drv, &local_err); > -- > 1.9.3 > Reviewed-by: Benoît Canet

Re: [Qemu-devel] [PATCH v2 3/3] util: Add an utility infrastructure used to compute an average on a time slice

2014-09-15 Thread Benoît Canet
On Mon, Sep 15, 2014 at 01:13:08PM +0200, Markus Armbruster wrote: > Benoît Canet writes: > > > On Mon, Sep 08, 2014 at 05:09:38PM +0200, Paolo Bonzini wrote: > >> Il 08/09/2014 16:49, Benoît Canet ha scritto: > >> >> > - create two windows, with twi

Re: [Qemu-devel] [PATCH v2 3/3] util: Add an utility infrastructure used to compute an average on a time slice

2014-09-15 Thread Benoît Canet
On Mon, Sep 15, 2014 at 01:13:08PM +0200, Markus Armbruster wrote: > Benoît Canet writes: > > > On Mon, Sep 08, 2014 at 05:09:38PM +0200, Paolo Bonzini wrote: > >> Il 08/09/2014 16:49, Benoît Canet ha scritto: > >> >> > - create two windows, with twi

Re: [Qemu-devel] [PATCH 2/4] block: Keep DriveInfo alive until BlockDriverState dies

2014-09-15 Thread Benoît Canet
ubs/Makefile.objs > index 5e347d0..c0b1f6a 100644 > --- a/stubs/Makefile.objs > +++ b/stubs/Makefile.objs > @@ -1,5 +1,6 @@ > stub-obj-y += arch-query-cpu-def.o > stub-obj-y += bdrv-commit-all.o > +stub-obj-y += blockdev.o > stub-obj-y += chr-baum-init.o > stub-obj-y += chr-msmouse.o > stub-obj-y += chr-testdev.o > diff --git a/stubs/blockdev.c b/stubs/blockdev.c > new file mode 100644 > index 000..5d0a79c > --- /dev/null > +++ b/stubs/blockdev.c > @@ -0,0 +1,12 @@ > +#include > +#include "sysemu/blockdev.h" > + > +DriveInfo *drive_get_by_blockdev(BlockDriverState *bs) > +{ > +return NULL; > +} > + > +void drive_info_del(DriveInfo *dinfo) > +{ > +assert(!dinfo); > +} > -- > 1.9.3 > Reviewed-by: Benoît Canet

Re: [Qemu-devel] [PATCH 1/4] blockdev: Disentangle BlockDriverState and DriveInfo creation

2014-09-15 Thread Benoît Canet
EF(bs_opts); > qemu_opts_del(opts); > @@ -520,9 +524,8 @@ static DriveInfo *blockdev_init(const char *file, QDict > *bs_opts, > return dinfo; > > err: > -bdrv_unref(dinfo->bdrv); > +bdrv_unref(bs); I would have moved this. > QTAILQ_REMOVE(&drives, dinfo, next); > -bdrv_new_err: > g_free(dinfo->id); > g_free(dinfo); To Here. No functional difference but it would reflect it's goto chain role: being in the reverse order of the allocations. > early_err: > -- > 1.9.3 Reviewed-by: Benoît Canet >

Re: [Qemu-devel] [PATCH 4/4] block: Improve message for device name clashing with node name

2014-09-13 Thread Benoît Canet
;}} > +{"error": {"class": "GenericError", "desc": "Device name 'test-node' > conflicts with an existing node name"}} > main-loop: WARNING: I/O thread spun for 1000 iterations > {"error": {"class": "GenericError", "desc": "could not open disk image > disk2: node-name=disk is conflicting with a device id"}} > {"error": {"class": "GenericError", "desc": "could not open disk image > disk2: Duplicate node name"}} > -- > 1.9.3 > Reviewed-by: Benoît Canet

Re: [Qemu-devel] New requirement for getting block layer patches merged

2014-09-11 Thread Benoît Canet
> EOF > --- > If you have feedback or questions, let us know. The process can be > tweaked as time goes on so we can continue to improve. Great mail. Now we need a wiki entry describing the process. Also we need something reminding who is the maintainer of the current week. Best regards Benoît

Re: [Qemu-devel] [PATCH 10/23] block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()

2014-09-11 Thread Benoît Canet
The Thursday 11 Sep 2014 à 21:12:44 (+0200), Markus Armbruster wrote : > Benoît Canet writes: > > >> + blk_bs(blk_by_legacy_dinfo(dinfo))); > > > > This seems to be a fairly common pattern: "blk_bs(blk_by_legacy_dinfo())&q

Re: [Qemu-devel] [PATCH 10/23] block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()

2014-09-11 Thread Benoît Canet
> + blk_bs(blk_by_legacy_dinfo(dinfo))); This seems to be a fairly common pattern: "blk_bs(blk_by_legacy_dinfo())". How about a helper function ?

Re: [Qemu-devel] [PATCH 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-11 Thread Benoît Canet
The Thursday 11 Sep 2014 à 07:00:41 (-0600), Eric Blake wrote : > On 09/11/2014 05:34 AM, Benoît Canet wrote: > > The Wednesday 10 Sep 2014 à 10:13:37 (+0200), Markus Armbruster wrote : > >> device_name[] is can become non-empty only in bdrv_new_named() and > >> bdrv_

Re: [Qemu-devel] [PATCH 11/23] block: Rename BlockDriverAIOCB* to BlockAIOCB*

2014-09-11 Thread Benoît Canet
The Wednesday 10 Sep 2014 à 10:13:40 (+0200), Markus Armbruster wrote : > I'll use BlockDriverAIOCB with block backends shortly, and the name is > going to fit badly there. It's a block layer thing anyway, not just a > block driver thing. > > Signed-off-by: Markus Armbruster > --- > block-migra

Re: [Qemu-devel] [PATCH 10/23] block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()

2014-09-11 Thread Benoît Canet
The Wednesday 10 Sep 2014 à 10:13:39 (+0200), Markus Armbruster wrote : > Signed-off-by: Markus Armbruster > --- > blockdev.c | 3 +-- > hw/arm/collie.c | 9 + > hw/arm/gumstix.c | 5 +++-- > hw/arm/mainston

Re: [Qemu-devel] [PATCH 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-11 Thread Benoît Canet
The Thursday 11 Sep 2014 à 13:34:33 (+0200), Benoît Canet wrote : > The Wednesday 10 Sep 2014 à 10:13:37 (+0200), Markus Armbruster wrote : > > device_name[] is can become non-empty only in bdrv_new_named() and > > bdrv_move_feature_fields(). The latter is used only to undo dam

Re: [Qemu-devel] [PATCH 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-11 Thread Benoît Canet
The Wednesday 10 Sep 2014 à 10:13:37 (+0200), Markus Armbruster wrote : > device_name[] is can become non-empty only in bdrv_new_named() and > bdrv_move_feature_fields(). The latter is used only to undo damage > done by bdrv_swap(). The former is called only by blk_new_with_bs(). > Therefore, whe

Re: [Qemu-devel] [PATCH 07/23] block: Eliminate bdrv_iterate(), use bdrv_next()

2014-09-11 Thread Benoît Canet
The Wednesday 10 Sep 2014 à 10:13:36 (+0200), Markus Armbruster wrote : > Signed-off-by: Markus Armbruster > --- > block-migration.c | 30 +++--- > block.c | 9 - > blockdev.c| 31 +-- > include/block/block

Re: [Qemu-devel] [PATCH 06/23] block: Eliminate bdrv_states, use block_next() instead

2014-09-11 Thread Benoît Canet
The Wednesday 10 Sep 2014 à 10:13:35 (+0200), Markus Armbruster wrote : > Signed-off-by: Markus Armbruster > --- > block.c | 43 +++ > block/block-backend.c | 4 > include/block/block_int.h | 2 -- > 3 files changed, 23 insertio

Re: [Qemu-devel] [PATCH 01/23] block: Split bdrv_new_named() off bdrv_new()

2014-09-10 Thread Benoît Canet
The Wednesday 10 Sep 2014 à 10:13:30 (+0200), Markus Armbruster wrote : > Creating an anonymous BDS can't fail. Make that obvious. > > Signed-off-by: Markus Armbruster > --- > block.c | 26 +++--- > block/iscsi.c | 2 +- > block/vvfat.c | 2 +-

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

2014-09-10 Thread Benoît Canet
On Wed, Sep 10, 2014 at 09:14:35AM -0600, Eric Blake wrote: > On 09/10/2014 02:54 AM, Fam Zheng wrote: > > >> Let's think of a situation that recursive blockers protect but > >> backing_blocker does not: > >> > >> a <- b <- c <- d > >> > >> c is the backing file and is therefore protected by the o

  1   2   3   4   5   6   7   8   9   10   >