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 ++--
> >
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
; 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
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)
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:
>
>
> +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
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
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
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
> +*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
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
> +} 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
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
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
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
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
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
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
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
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
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
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/
/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 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
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
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
> >
> > 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.
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
>
>
>
> 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
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
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
>
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
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
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
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
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
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
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
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
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
},
> +{ "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
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
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
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-
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
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
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
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
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
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
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
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:
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
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 +
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
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.
> >
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
> 1.9.3
>
Reviewed-by: Benoit Canet
> --
> 1.9.3
>
Reviewed-by: Benoit 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.
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
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
> -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
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
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
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
> 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
> 1.9.3
>
Reviewed-by: 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
' ||
> +!strncmp(name, str, strlen(str))) {
> +readline_add_completion(mon->rs, name);
> +}
> +}
> break;
> case 's':
> case 'S':
> --
> 1.9.3
>
Reviewed-by: 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
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
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
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
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
> 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
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
> 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
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
-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
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
> --- 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
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
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
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
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
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
>
;}}
> +{"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
> 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
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
> + 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 ?
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_
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
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
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
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
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
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
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 +-
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 - 100 of 2281 matches
Mail list logo