Re: [Qemu-devel] tcmu-runner and QEMU

2014-08-29 Thread Benoît Canet
The Friday 29 Aug 2014 à 15:36:41 (-0700), Andy Grover wrote : > On 08/29/2014 11:51 AM, Benoît Canet wrote: > >QMP is just a way to control QEMU via a socket: it is not particularly block > >related. > > > >On the other hand bringing the whole block layers into a t

Re: [Qemu-devel] tcmu-runner and QEMU

2014-08-30 Thread Benoît Canet
The Saturday 30 Aug 2014 à 15:46:41 (+0100), Richard W.M. Jones wrote : > For the benefit of those who have absolutely no idea what you're > talking about, could you write a simpler summary of what you're trying > to do? > > Rich. Hello, Most cloud providers sell virtualized instances either usi

Re: [Qemu-devel] tcmu-runner and QEMU

2014-08-30 Thread Benoît Canet
The Saturday 30 Aug 2014 à 17:02:12 (+0100), Richard W.M. Jones wrote : > On Sat, Aug 30, 2014 at 05:53:43PM +0200, Benoît Canet wrote: > > The Saturday 30 Aug 2014 à 15:46:41 (+0100), Richard W.M. Jones wrote : > > > For the benefit of those who have absolutely no idea what yo

Re: [Qemu-devel] tcmu-runner and QEMU

2014-08-30 Thread Benoît Canet
The Saturday 30 Aug 2014 à 17:04:12 (+0100), Richard W.M. Jones wrote : > BTW, what is "tcmu-runner"? The github repo you pointed to is ... opaque. Andy Groover is working on a way to implement LIO storage backend in userspace. tcmu-runner is a daemon able to load storage backend plugins for this

Re: [Qemu-devel] tcmu-runner and QEMU

2014-08-30 Thread Benoît Canet
The Saturday 30 Aug 2014 à 19:22:09 (+0200), Benoît Canet wrote : > The Saturday 30 Aug 2014 à 17:04:12 (+0100), Richard W.M. Jones wrote : > > BTW, what is "tcmu-runner"? The github repo you pointed to is ... opaque. > > Andy Groover. My apologizes for the mispelling.

Re: [Qemu-devel] tcmu-runner and QEMU

2014-08-31 Thread Benoît Canet
The Sunday 31 Aug 2014 à 13:03:14 (-0700), Andy Grover wrote : > On 08/30/2014 09:02 AM, Richard W.M. Jones wrote: > >On Sat, Aug 30, 2014 at 05:53:43PM +0200, Benoît Canet wrote: > >>If the cloud provider want to be able to boot QCOW2 or QED images on > >>bare met

Re: [Qemu-devel] [PATCH 0/8] add basic recovery logic to quorum driver

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 15:43:06 (+0800), Liu Yuan wrote : > This patch set mainly add mainly two logics to implement device recover > - notify qourum driver of the broken states from the child driver(s) > - dirty track and sync the device after it is repaired > > Thus quorum allow VMs to continu

Re: [Qemu-devel] [PATCH 2/8] block: add driver operation callbacks

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 15:43:08 (+0800), Liu Yuan wrote : > Driver operations are defined as callbacks passed from block upper drivers to > lower drivers and are supposed to be called by lower drivers. > > Requests handling(queuing, submitting, etc.) are done in protocol tier in the > block laye

Re: [Qemu-devel] [PATCH 3/8] block/sheepdog: propagate disconnect/reconnect events to upper driver

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 15:43:09 (+0800), Liu Yuan wrote : > This is the reference usage how we propagate connection state to upper tier. > > Cc: Eric Blake > Cc: Benoit Canet > Cc: Kevin Wolf > Cc: Stefan Hajnoczi > Signed-off-by: Liu Yuan > --- > block/sheepdog.c | 9 + > 1 file c

Re: [Qemu-devel] [PATCH 4/8] block/quorum: add quorum_aio_release() helper

2014-09-01 Thread Benoît Canet
id quorum_aio_finalize(QuorumAIOCB *acb) > } > } > > -g_free(acb->qcrs); > -qemu_aio_release(acb); > +quorum_aio_release(acb); > } > > static bool quorum_sha256_compare(QuorumVoteValue *a, QuorumVoteValue *b) > -- > 1.9.1 > Reviewed-by: Benoît Canet

Re: [Qemu-devel] [PATCH 5/8] quorum: fix quorum_aio_cancel()

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 15:43:11 (+0800), Liu Yuan wrote : > For a fifo read pattern, we only have one running aio >(possible other cases that has less number than num_children in the future) I have trouble understanding this part of the commit message could you try to clarify it ? > , so we nee

Re: [Qemu-devel] [PATCH 7/8] block: add two helpers

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 15:43:13 (+0800), Liu Yuan wrote : > These helpers are needed by later quorum sync device logic. > > Cc: Eric Blake > Cc: Benoit Canet > Cc: Kevin Wolf > Cc: Stefan Hajnoczi > Signed-off-by: Liu Yuan > --- > block.c | 10 ++ > include/block/bloc

Re: [Qemu-devel] [PATCH 6/8] block/quorum: add broken state to BlockDriverState

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 15:43:12 (+0800), Liu Yuan wrote : > This allow VM continues to process even if some devices are broken meanwhile > with proper configuration. > > We mark the device broken when the protocol tier notify back some broken > state(s) of the device, such as diconnection via dr

Re: [Qemu-devel] [PATCH 2/8] block: add driver operation callbacks

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 17:19:19 (+0800), Liu Yuan wrote : > On Mon, Sep 01, 2014 at 10:28:54AM +0200, Benoît Canet wrote: > > The Monday 01 Sep 2014 à 15:43:08 (+0800), Liu Yuan wrote : > > > Driver operations are defined as callbacks passed from block upper > > > dri

Re: [Qemu-devel] [PATCH 5/8] quorum: fix quorum_aio_cancel()

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 17:26:09 (+0800), Liu Yuan wrote : > On Mon, Sep 01, 2014 at 10:35:27AM +0200, Benoît Canet wrote: > > The Monday 01 Sep 2014 à 15:43:11 (+0800), Liu Yuan wrote : > > > For a fifo read pattern, we only have one running aio > > > > >(p

Re: [Qemu-devel] [PATCH 8/8] quorum: add basic device recovery logic

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 15:43:14 (+0800), Liu Yuan wrote : > For some configuration, quorum allow VMs to continue while some child devices > are broken and when the child devices are repaired and return back, we need to > sync dirty bits during downtime to keep data consistency. > > The recovery

Re: [Qemu-devel] [libvirt] IO accounting overhaul

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 11:52:00 (+0200), Markus Armbruster wrote : > Cc'ing libvirt following Stefan's lead. > > Benoît Canet writes: > > > Hi, > > > > I collected some items of a cloud provider wishlist regarding I/O accouting. > > Feedback from

Re: [Qemu-devel] [PATCH] block: kill tail whitespace in block.c

2014-09-01 Thread Benoît Canet
644 > --- a/block.c > +++ b/block.c > @@ -2239,7 +2239,7 @@ int bdrv_commit(BlockDriverState *bs) > > if (!drv) > return -ENOMEDIUM; > - > + > if (!bs->backing_hd) { > return -ENOTSUP; > } > -- > 1.9.1 > > Review

Re: [Qemu-devel] [PATCH 2/2] docs/qcow2: Correct refcount_block_entries

2014-09-01 Thread Benoît Canet
The Friday 29 Aug 2014 à 23:45:27 (+0200), Max Reitz wrote : > A refblock entry may have a different size than 16 bits, it may even be > smaller than a byte. Correct the refcount_block_entries calculation Now if the refblock entry size is smaller than a byte > accordingly. > > Signed-off-by: Max

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 18:52:48 (+0800), Jun Li wrote : > When every item of refcount block is NULL, free refcount block and reset the > corresponding item of refcount table with NULL. > > Signed-off-by: Jun Li > --- > > The v2 do following change to modify some potential issue. > >

Re: [Qemu-devel] [PATCH 1/2] qcow2: Drop REFCOUNT_SHIFT

2014-09-01 Thread Benoît Canet
The Friday 29 Aug 2014 à 23:45:26 (+0200), Max Reitz wrote : > With BDRVQcowState.refcount_block_bits, we don't need REFCOUNT_SHIFT > anymore. > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 32 ++-- > block/qcow2.c | 2 +- > block/qcow2.h

Re: [Qemu-devel] [libvirt] IO accounting overhaul

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 13:41:01 (+0200), Markus Armbruster wrote : > Benoît Canet writes: > > > The Monday 01 Sep 2014 à 11:52:00 (+0200), Markus Armbruster wrote : > >> Cc'ing libvirt following Stefan's lead. > >> > >> Benoît Canet writes

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

2014-09-01 Thread Benoît Canet
On Wed, Aug 20, 2014 at 02:27:06PM +, Benoît Canet wrote: > 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 p

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-02 Thread Benoît Canet
The Tuesday 02 Sep 2014 à 00:04:08 (+0800), Jun Li wrote : > On Mon, 09/01 13:11, Benoît Canet wrote: > > The Monday 01 Sep 2014 à 18:52:48 (+0800), Jun Li wrote : > > > When every item of refcount block is NULL, free refcount block and reset > > > the > > >

Re: [Qemu-devel] [PATCH 0/8] add basic recovery logic to quorum driver

2014-09-02 Thread Benoît Canet
The Monday 01 Sep 2014 à 15:43:06 (+0800), Liu Yuan wrote : Liu, Do you think this could work with qcow2 file backed by NFS servers ? Best regards Benoît > This patch set mainly add mainly two logics to implement device recover > - notify qourum driver of the broken states from the child drive

Re: [Qemu-devel] [PATCH] cow: make padding in the header explicit

2014-09-04 Thread Benoît Canet
der_v2 { > uint32_t version; > char backing_file[1024]; > int32_t mtime; > +uint32_t padding; > uint64_t size; > uint32_t sectorsize; > -}; > +} QEMU_PACKED; > > typedef struct BDRVCowState { > CoMutex lock; > -- > 1.9.3 > > Reviewed-by: Benoît Canet

Re: [Qemu-devel] tcmu-runner and QEMU

2014-09-04 Thread Benoît Canet
The Wednesday 03 Sep 2014 à 14:11:59 (+0100), Stefan Hajnoczi wrote : > On Tue, Sep 02, 2014 at 05:20:55PM -0700, Andy Grover wrote: > > On 09/02/2014 02:25 AM, Stefan Hajnoczi wrote: > > > The qemu-lio tool would live in the QEMU codebase and reuse all the > > > infrastructure. For example, it co

Re: [Qemu-devel] NBD TLS support in QEMU

2014-09-04 Thread Benoît Canet
The Wednesday 03 Sep 2014 à 17:44:17 (+0100), Stefan Hajnoczi wrote : > Hi, > QEMU offers both NBD client and server functionality. The NBD protocol > runs unencrypted, which is a problem when the client and server > communicate over an untrusted network. > > The particular use case that prompted

Re: [Qemu-devel] [PATCH 3/4] linux-aio: increase max event to 256

2014-09-04 Thread Benoît Canet
The Thursday 14 Aug 2014 à 17:41:43 (+0800), Ming Lei wrote : > This patch increases max event to 256 for the comming s/comming/coming/ See http://en.wiktionary.org/wiki/comming and https://www.wordnik.com/words/comming > virtio-blk multi virtqueue support. > > Signed-off-by: Ming Lei > --- >

Re: [Qemu-devel] [PATCH 1/4] linux-aio: fix submit aio as a batch

2014-09-04 Thread Benoît Canet
The Thursday 14 Aug 2014 à 17:41:41 (+0800), Ming Lei wrote : > In the enqueue path, we can't complete request, otherwise > "Co-routine re-entered recursively" may be caused, so this > patch fixes the issue with below ideas: s/with below ideas/with the following ideas/g > > - for -EAGAIN o

Re: [Qemu-devel] [libvirt] NBD TLS support in QEMU

2014-09-04 Thread Benoît Canet
The Thursday 04 Sep 2014 à 15:34:59 (+0100), Daniel P. Berrange wrote : > On Thu, Sep 04, 2014 at 04:19:17PM +0200, Benoît Canet wrote: > > The Wednesday 03 Sep 2014 à 17:44:17 (+0100), Stefan Hajnoczi wrote : > > > Hi, > > > QEMU offers both NBD client and server funct

Re: [Qemu-devel] [PATCH v4 01/20] block: Add refcnt in BlockDriverAIOCB

2014-09-04 Thread Benoît Canet
The Wednesday 03 Sep 2014 à 19:23:36 (+0800), Fam Zheng wrote : > This will be useful in synchronous cancel emulation with > bdrv_aio_cancel_async. > > Signed-off-by: Fam Zheng > --- > block.c | 12 +++- > include/block/aio.h | 2 ++ > 2 files changed, 13 insertions(+), 1 de

Re: [Qemu-devel] [PATCH v4 04/20] block: Convert bdrv_em_aiocb_info.cancel to .cancel_async

2014-09-04 Thread Benoît Canet
The Wednesday 03 Sep 2014 à 19:23:39 (+0800), Fam Zheng wrote : > All the difference is that the old .cancel doesn't call cb, but > .cancel_async does. > > Signed-off-by: Fam Zheng > --- > block.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/block.c b/block.c > i

Re: [Qemu-devel] [PATCH v4 05/20] thread-pool: Convert thread_pool_aiocb_info.cancel to cancel_async

2014-09-04 Thread Benoît Canet
The Wednesday 03 Sep 2014 à 19:23:40 (+0800), Fam Zheng wrote : > The .cancel_async has the same the first half with .cancel: try to steal "The .cancel_async share the same first half with .cancel" ? > the request if not submitted yet. In this case set the elem to > THREAD_DONE status and ret to

Re: [Qemu-devel] [PATCH v4 15/20] quorum: Convert quorum_aiocb_info.cancel to .cancel_async

2014-09-04 Thread Benoît Canet
The Wednesday 03 Sep 2014 à 19:23:50 (+0800), Fam Zheng wrote : > Before, we cancel all the child requests with bdrv_aio_cancel, then free > the acb.. > > Now we just kick off asynchronous cancellation of child requests and > return, we know quorum_aio_cb will be called later, so in the end > quor

Re: [Qemu-devel] tcmu-runner and QEMU

2014-09-04 Thread Benoît Canet
The Thursday 04 Sep 2014 à 08:15:39 (-0700), Andy Grover wrote : > On 09/04/2014 06:24 AM, Benoît Canet wrote: > >>There are other commands for snapshots and backup which are issued via > >>QMP. > >> > >>It might even make sense to make the tcmu interface ava

Re: [Qemu-devel] NBD TLS support in QEMU

2014-09-04 Thread Benoît Canet
The Friday 05 Sep 2014 à 00:07:04 (+0200), Wouter Verhelst wrote : > On Thu, Sep 04, 2014 at 04:19:17PM +0200, Benoît Canet wrote: > > The Wednesday 03 Sep 2014 à 17:44:17 (+0100), Stefan Hajnoczi wrote : > > > Hi, > > > QEMU offers both NBD client and server funct

Re: [Qemu-devel] [PATCH v4 04/20] block: Convert bdrv_em_aiocb_info.cancel to .cancel_async

2014-09-05 Thread Benoît Canet
The Friday 05 Sep 2014 à 18:55:51 (+0800), Fam Zheng wrote : > On Thu, 09/04 17:21, Benoît Canet wrote: > > The Wednesday 03 Sep 2014 à 19:23:39 (+0800), Fam Zheng wrote : > > > All the difference is that the old .cancel doesn't call cb, but > > > .cancel_async

[Qemu-devel] [PATCH 3/4] block: rename BlockAcctType members to start with BLOCK_ instead of BDRV_

2014-09-05 Thread Benoît Canet
CC: Anthony Liguori CC: "Michael S. Tsirkin" CC: Paolo Bonzini CC: John Snow CC: Richard Henderson CC: Markus Armbruster CC: Alexander Graf i Signed-off-by: Benoît Canet --- block/accounting.c | 4 ++-- block/qapi.c | 16 hw/bl

[Qemu-devel] [PATCH 0/4] Extract block accounting statistic code in it's own module

2014-09-05 Thread Benoît Canet
Best regards Benoît Benoît Canet (4): block: Extract the BlockAcctStats structure block: Extract the block accounting code block: rename BlockAcctType members to start with BLOCK_ instead of BDRV_ block: Make the block accounting functions operate on BlockAcctStats bl

[Qemu-devel] [PATCH 2/4] block: Extract the block accounting code

2014-09-05 Thread Benoît Canet
CC: Benoit Canet CC: Fam Zheng CC: Peter Crosthwaite CC: Paolo Bonzini Signed-off-by: Benoît Canet --- block.c| 27 ++-- block/Makefile.objs| 1 + block/accounting.c | 57 ++ include/block

[Qemu-devel] [PATCH 4/4] block: Make the block accounting functions operate on BlockAcctStats

2014-09-05 Thread Benoît Canet
CC: Eric Blake CC: Peter Maydell CC: Michael Tokarev CC: John Snow CC: Markus Armbruster CC: Alexander Graf CC: Max Reitz Signed-off-by: Benoît Canet --- block.c| 13 - block/accounting.c | 23 ++- dma-helpers.c |

[Qemu-devel] [PATCH 1/4] block: Extract the BlockAcctStats structure

2014-09-05 Thread Benoît Canet
Extract the block accounting statistics into a structure so the block device models can hold them in the future. CC: Kevin Wolf CC: Stefan Hajnoczi CC: Max Reitz CC: Eric Blake Signed-off-by: Benoît Canet --- block.c | 11 ++- block/qapi.c | 19

[Qemu-devel] [PATCH 0/2] Add the infrastructure that will be used to compute I/O accouting averages

2014-09-05 Thread Benoît Canet
Tiny module of code to maintain and compute timed average on a given period. It comes with unit tests so we are sure the code will not bitrot while waiting for the accouting code to use it. Best regards Benoît Benoît Canet (2): timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse

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

2014-09-05 Thread Benoît Canet
The algorithm used was defined on the list while discussing the new IO accounting overhaul. See http://lists.nongnu.org/archive/html/qemu-devel/2014-08/msg04954.html Signed-off-by: Benoît Canet --- include/qemu/timed-average.h | 45 +++ tests/Makefile | 2

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

2014-09-05 Thread Benoît Canet
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 b890613..1c639d2 100644 --- a/include/qemu/throttle.h +++ b/include/qemu

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

2014-09-05 Thread Benoît Canet
On Fri, Sep 05, 2014 at 03:31:16PM +0100, Peter Maydell wrote: > On 5 September 2014 15:21, Benoît Canet wrote: > > Signed-off-by: Benoît Canet > > --- > > include/qemu/throttle.h | 2 -- > > include/qemu/timer.h| 2 ++ > > 2 files changed, 2 insertions(+),

Re: [Qemu-devel] [libvirt] IO accounting overhaul

2014-09-05 Thread Benoît Canet
The Friday 05 Sep 2014 à 16:30:31 (+0200), Kevin Wolf wrote : > Am 01.09.2014 um 13:41 hat Markus Armbruster geschrieben: > > Benoît Canet writes: > > > > > The Monday 01 Sep 2014 à 11:52:00 (+0200), Markus Armbruster wrote : > > >> Cc'ing libvirt follo

Re: [Qemu-devel] [libvirt] IO accounting overhaul

2014-09-05 Thread Benoît Canet
The Friday 05 Sep 2014 à 16:30:31 (+0200), Kevin Wolf wrote : > Am 01.09.2014 um 13:41 hat Markus Armbruster geschrieben: > > Benoît Canet writes: > > > > > The Monday 01 Sep 2014 à 11:52:00 (+0200), Markus Armbruster wrote : > > >> Cc'ing libvirt follo

Re: [Qemu-devel] [libvirt] IO accounting overhaul

2014-09-05 Thread Benoît Canet
The Friday 05 Sep 2014 à 16:30:31 (+0200), Kevin Wolf wrote : > Am 01.09.2014 um 13:41 hat Markus Armbruster geschrieben: > > Benoît Canet writes: > > > > > The Monday 01 Sep 2014 à 11:52:00 (+0200), Markus Armbruster wrote : > > >> Cc'ing libvirt follo

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

2014-09-05 Thread Benoît Canet
On Fri, Sep 05, 2014 at 08:55:53AM -0600, Eric Blake wrote: > On 09/05/2014 08:21 AM, Benoît Canet wrote: > > The algorithm used was defined on the list while discussing the new IO > > accounting > > overhaul. > > See http://lists.nongnu.org/archive/html/qemu-

Re: [Qemu-devel] [PATCH 12/22] quorum: implement .bdrv_detach/attach_aio_context()

2014-05-05 Thread Benoît Canet
7;t know about our ->bs[] > BlockDriverStates, which is also part of the graph. > > Cc: Benoît Canet > Signed-off-by: Stefan Hajnoczi > --- > block/quorum.c | 48 > 1 file changed, 36 insertions(+), 12 deletions(-) > > diff --git a/blo

Re: [Qemu-devel] [PATCH v12 0/4] qapi: Allow modularization of QAPI schema files

2014-05-06 Thread Benoît Canet
ive format. > * s/file path/file name/. > * s/included/include/. > * Move "-i" to the end of the command. > * Fix GNUism when using sed. > > Changes in v6: > > * Split changes for long-line breaking in makefiles. > * Put documentation on a separate section; reference

Re: [Qemu-devel] [PATCH v12 0/4] qapi: Allow modularization of QAPI schema files

2014-05-06 Thread Benoît Canet
The Tuesday 06 May 2014 à 09:27:25 (-0400), Luiz Capitulino wrote : > On Tue, 6 May 2014 15:07:40 +0200 > Benoît Canet wrote: > > > I am trying to use this series to modularise the block API. > > > > Here are my finding. > > > > I tried to make a qmp/bl

Re: [Qemu-devel] [PATCH v2 13/25] quorum: implement .bdrv_detach/attach_aio_context()

2014-05-07 Thread Benoît Canet
7;t know about our ->bs[] > BlockDriverStates, which is also part of the graph. V1 seemed sweet and fine. What has changed since V1 ? Best regards Benoît > > Cc: Benoît Canet > Signed-off-by: Stefan Hajnoczi > --- > block/quorum.c | 48 >

Re: [Qemu-devel] [PATCH v12 0/4] qapi: Allow modularization of QAPI schema files

2014-05-07 Thread Benoît Canet
The Wednesday 07 May 2014 à 21:44:06 (+0200), Markus Armbruster wrote : > Eric Blake writes: > > > On 05/06/2014 07:27 AM, Luiz Capitulino wrote: > >> On Tue, 6 May 2014 15:07:40 +0200 > >> Benoît Canet wrote: > >> > >>> I am tr

[Qemu-devel] [PATCH] qapi: Make the include directive idempotent.

2014-05-08 Thread Benoît Canet
The purpose of this change is to help create a json file containing common definitions. The history used to detect multiple inclusions is not a stack anymore but a regular list. The cycle detection check where updated and leaved in place to make sure the code will never enter into an infinite rec

Re: [Qemu-devel] [PATCH] qapi: Make the include directive idempotent.

2014-05-08 Thread Benoît Canet
The Thursday 08 May 2014 à 20:30:33 (+0200), Markus Armbruster wrote : > Humor me: no period at end of subject. > > Benoît Canet writes: > > > The purpose of this change is to help create a json file containing > > common definitions. > > Please describe th

Re: [Qemu-devel] [PATCH] qapi: Make the include directive idempotent.

2014-05-09 Thread Benoît Canet
The Friday 09 May 2014 à 07:36:31 (+0200), Markus Armbruster wrote : > Benoît Canet writes: > > > The Thursday 08 May 2014 à 20:30:33 (+0200), Markus Armbruster wrote : > [...] > >> There are two reasons to detect cycles. The technical one is preventing > >&g

[Qemu-devel] [PATCH V2] Let the C generated bits of QAPI be generated only once when identical includes are done

2014-05-09 Thread Benoît Canet
in V2: Keep the cycle detection [Markus] Don't talk about idempottent [Markus] Benoît Canet (1): qapi: Let redundant includes be skipped excepted the first occurrence. scripts/qapi.py | 14 +++--- tests/Mak

[Qemu-devel] [PATCH V2] qapi: Let redundant includes be skipped excepted the first occurrence.

2014-05-09 Thread Benoît Canet
The purpose of this change is to help create a json file containing common definitions; each bit of generated C code must be spitted only one time. A second history global to all QAPISchema instances has been added to detect when a file is included more than one time and skip these includes. It do

Re: [Qemu-devel] [PATCH V3 0/3] Quorum maintainance operations

2014-05-09 Thread Benoît Canet
The Friday 14 Mar 2014 à 16:18:39 (+0100), Benoît Canet wrote : Stefan, Kevin: Ping, I made this a dependency of Fam's nbd series to simplify his work on the job blockers. However Fam's series is a lot of work and takes time to merge. This patchset is the only thing I _must_ succee

Re: [Qemu-devel] [PATCH 1/5] qcow1: Make padding in the header explicit

2014-05-12 Thread Benoît Canet
The Monday 12 May 2014 à 15:04:07 (+0200), Kevin Wolf wrote : > We were relying on all compilers inserting the same padding in the > header struct that is used for the on-disk format. Let's not do that. > Mark the struct as packed and insert an explicit padding field for > compatibility. > > Signe

Re: [Qemu-devel] [PATCH 2/5] qcow1: Check maximum cluster size

2014-05-12 Thread Benoît Canet
The Monday 12 May 2014 à 15:04:08 (+0200), Kevin Wolf wrote : > Huge values for header.cluster_bits cause unbounded allocations (e.g. > for s->cluster_cache) and crash qemu this way. Less huge values may > survive those allocations, but can cause integer overflows later on. > > The only cluster si

Re: [Qemu-devel] [PATCH 3/5] qcow1: Validate L2 table size (CVE-2014-0222)

2014-05-12 Thread Benoît Canet
The Monday 12 May 2014 à 15:04:09 (+0200), Kevin Wolf wrote : > Too large L2 table sizes cause unbounded allocations. Images actually > created by qemu-img only have 512 byte or 4k L2 tables. > > To keep things consistent with cluster sizes, allow ranges between 512 > bytes and 64k (in fact, down

Re: [Qemu-devel] [PATCH 4/5] qcow1: Validate image size (CVE-2014-0223)

2014-05-12 Thread Benoît Canet
The Monday 12 May 2014 à 15:04:10 (+0200), Kevin Wolf wrote : > A huge image size could cause s->l1_size to overflow. Make sure that > images never require a L1 table larger than what fits in s->l1_size. > > This cannot only cause unbounded allocations, but also the allocation of > a too small L1

Re: [Qemu-devel] [PATCH 5/5] qcow1: Stricter backing file length check*

2014-05-12 Thread Benoît Canet
The Monday 12 May 2014 à 15:04:11 (+0200), Kevin Wolf wrote : > Like qcow2 since commit 6d33e8e7, error out on invalid lengths instead > of silently truncating them to 1023. > > Also don't rely on bdrv_pread() catching integer overflows that make len > negative, but use unsigned variables in the f

Re: [Qemu-devel] [PATCH 4/5] qcow1: Validate image size (CVE-2014-0223)

2014-05-12 Thread Benoît Canet
The Monday 12 May 2014 à 18:43:33 (+0200), Kevin Wolf wrote : > Am 12.05.2014 um 17:50 hat Benoît Canet geschrieben: > > The Monday 12 May 2014 à 15:04:10 (+0200), Kevin Wolf wrote : > > > A huge image size could cause s->l1_size to overflow. Make sure that > > > i

Re: [Qemu-devel] [PATCH 4/5] qcow1: Validate image size (CVE-2014-0223)

2014-05-12 Thread Benoît Canet
The Monday 12 May 2014 à 19:04:22 (+0200), Benoît Canet wrote : > The Monday 12 May 2014 à 18:43:33 (+0200), Kevin Wolf wrote : > > Am 12.05.2014 um 17:50 hat Benoît Canet geschrieben: > > > The Monday 12 May 2014 à 15:04:10 (+0200), Kevin Wolf wrote : > > > > A

Re: [Qemu-devel] [PATCH V2] qapi: Let redundant includes be skipped excepted the first occurrence.

2014-05-14 Thread Benoît Canet
The Monday 12 May 2014 à 11:11:41 (-0600), Eric Blake wrote : > On 05/09/2014 09:48 AM, Benoît Canet wrote: > > Subject line has problems. 'excepted' is not a word, and you are already > asked to avoid trailing '.'. I suggest a much simpler: > > qapi: skip

[Qemu-devel] [PATCH v3] qapi: skip redundant includes

2014-05-14 Thread Benoît Canet
The purpose of this change is to help create a json file containing common definitions; each bit of generated C code must be emitted only one time. A second history global to all QAPISchema instances has been added to detect when a file is included more than one time and skip these includes. It do

[Qemu-devel] [PATCH v3] Let the C generated bits of QAPI be generated only once when identical includes are done

2014-05-14 Thread Benoît Canet
in V3: change commit title [Eric] s/spitted/emitted/ change tests names [Eric] Benoît Canet (1): qapi: skip redundant includes scripts/qapi.py | 14 +++--- tests/Makefile| 3 ++- tests/qapi-schema

Re: [Qemu-devel] [PATCH 1/3] throttle: add throttle_detach/attach_aio_context()

2014-05-14 Thread Benoît Canet
test cases need to be updated since the throttle_init() interface > has changed. > > Cc: Benoît Canet > Signed-off-by: Stefan Hajnoczi > --- > block.c | 7 +++ > include/qemu/throttle.h | 10 ++ > tests/test-throttle.c | 2

Re: [Qemu-devel] [PATCH 2/3] throttle: add detach/attach test case

2014-05-14 Thread Benoît Canet
The Wednesday 14 May 2014 à 16:22:46 (+0200), Stefan Hajnoczi wrote : > Add a test case that checks the timer is really removed/added by the > detach/attach functions. > > Cc: Benoît Canet > Signed-off-by: Stefan Hajnoczi > --- > tests/test-throttle.c | 24 +

Re: [Qemu-devel] [PATCH 0/3] throttle: use AioContext for dataplane support

2014-05-14 Thread Benoît Canet
The Wednesday 14 May 2014 à 16:22:44 (+0200), Stefan Hajnoczi wrote : > This series applies on top of my "dataplane: use QEMU block layer" series. > > Now that the dataplane code path is using the QEMU block layer we should make > I/O throttling limits safe to use. When the block_set_io_throttle

Re: [Qemu-devel] [PATCH 3/3] blockdev: acquire AioContext in block_set_io_throttle

2014-05-14 Thread Benoît Canet
t is running I/O for this device. > > Cc: Benoît Canet > Signed-off-by: Stefan Hajnoczi > --- > blockdev.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/blockdev.c b/blockdev.c > index 7810e9f..e0f1978 100644 > --- a/blockdev.c > +++ b/blockdev.c &

Re: [Qemu-devel] [PATCH 0/3] throttle: use AioContext for dataplane support

2014-05-14 Thread Benoît Canet
The Wednesday 14 May 2014 à 16:22:44 (+0200), Stefan Hajnoczi wrote : > This series applies on top of my "dataplane: use QEMU block layer" series. > > Now that the dataplane code path is using the QEMU block layer we should make > I/O throttling limits safe to use. When the block_set_io_throttle

Re: [Qemu-devel] [PATCH 1/3] throttle: add throttle_detach/attach_aio_context()

2014-05-15 Thread Benoît Canet
be updated since the throttle_init() interface > has changed. > > Cc: Benoît Canet > Signed-off-by: Stefan Hajnoczi > --- > block.c | 7 +++ > include/qemu/throttle.h | 10 ++ > tests/test-throttle.c | 25 - > util/

Re: [Qemu-devel] [PATCH 3/5] block: make 'top' argument to block-commit optional

2014-05-15 Thread Benoît Canet
The Wednesday 14 May 2014 à 23:20:17 (-0400), Jeff Cody wrote : > Now that active layer block-commit is supported, the 'top' argument > no longer needs to be mandatory. > > Change it optional, with the default being the active layer in the Do you mean "Change it to optional" or "Make it optional"

Re: [Qemu-devel] [PATCH 2/5] block: add helper function to determine if a BDS is in a chain

2014-05-15 Thread Benoît Canet
The Wednesday 14 May 2014 à 23:20:16 (-0400), Jeff Cody wrote : > This is a small helper function, to determine if 'base' is in the > chain of BlockDriverState 'top'. It returns true if it is in the chain, > and false otherwise. > > If either argument is NULL, it will also return false. > > Sign

Re: [Qemu-devel] [PATCH 1/5] block: Auto-generate node_names for each BDS entry

2014-05-15 Thread Benoît Canet
The Wednesday 14 May 2014 à 23:20:15 (-0400), Jeff Cody wrote : > Currently, node_name is only filled in when done so explicitly by the > user. If no node_name is specified, then the node name field is not > populated. > > If node_names are automatically generated when not specified, that means >

Re: [Qemu-devel] [PATCH 4/5] block: Accept node-name arguments for block-commit

2014-05-15 Thread Benoît Canet
The Wednesday 14 May 2014 à 23:20:18 (-0400), Jeff Cody wrote : > This modifies the block operation block-commit so that it will > accept node-name arguments for either 'top' or 'base' BDS. > > The filename and node-name are mutually exclusive to each other; > i.e.: > "top" and "top-node-name"

Re: [Qemu-devel] [PATCH 5/5] block: extend block-commit to accept a string for the backing file

2014-05-15 Thread Benoît Canet
The Wednesday 14 May 2014 à 23:20:19 (-0400), Jeff Cody wrote : > On some image chains, QEMU may not always be able to resolve the > filenames properly, when updating the backing file of an image > after a block commit. > > For instance, certain relative pathnames may fail, or drives may > have be

Re: [Qemu-devel] [PATCH 1/5] block: Auto-generate node_names for each BDS entry

2014-05-15 Thread Benoît Canet
The Thursday 15 May 2014 à 08:06:14 (-0400), Jeff Cody wrote : > On Thu, May 15, 2014 at 01:58:59PM +0200, Benoît Canet wrote: > > The Wednesday 14 May 2014 à 23:20:15 (-0400), Jeff Cody wrote : > > > Currently, node_name is only filled in when done so explicitly by the

Re: [Qemu-devel] [PATCH v2 3/5] qcow1: Validate L2 table size (CVE-2014-0222)

2014-05-15 Thread Benoît Canet
The Thursday 15 May 2014 à 16:21:55 (+0200), Kevin Wolf wrote : > Too large L2 table sizes cause unbounded allocations. Images actually > created by qemu-img only have 512 byte or 4k L2 tables. > > To keep things consistent with cluster sizes, allow ranges between 512 > bytes and 64k (in fact, dow

Re: [Qemu-devel] [PATCH v2 4/5] qcow1: Validate image size (CVE-2014-0223)

2014-05-15 Thread Benoît Canet
The Thursday 15 May 2014 à 16:21:56 (+0200), Kevin Wolf wrote : > A huge image size could cause s->l1_size to overflow. Make sure that > images never require a L1 table larger than what fits in s->l1_size. > > This cannot only cause unbounded allocations, but also the allocation of > a too small L

Re: [Qemu-devel] [PATCH v2 2/5] qcow1: Check maximum cluster size

2014-05-15 Thread Benoît Canet
The Thursday 15 May 2014 à 16:21:54 (+0200), Kevin Wolf wrote : > Huge values for header.cluster_bits cause unbounded allocations (e.g. > for s->cluster_cache) and crash qemu this way. Less huge values may > survive those allocations, but can cause integer overflows later on. > > The only cluster

Re: [Qemu-devel] [PATCH v3] qapi: skip redundant includes

2014-05-15 Thread Benoît Canet
The Thursday 15 May 2014 à 13:39:02 (-0600), Eric Blake wrote : > On 05/15/2014 01:13 PM, Luiz Capitulino wrote: > > On Wed, 14 May 2014 16:07:49 +0200 > > Benoît Canet wrote: > > > >> The purpose of this change is to help create a json file containing > &

[Qemu-devel] [PATCH v4] Let the C generated bits of QAPI be generated only once when identical includes are done

2014-05-16 Thread Benoît Canet
in v4: Document the feature [Eric, Luiz] Benoît Canet (1): qapi: skip redundant includes docs/qapi-code-gen.txt| 2 +- scripts/qapi.py | 14 +++--- tests/Makefile| 3 ++- tests/qapi-schema

[Qemu-devel] [PATCH v4] qapi: skip redundant includes

2014-05-16 Thread Benoît Canet
The purpose of this change is to help create a json file containing common definitions; each bit of generated C code must be emitted only one time. A second history global to all QAPISchema instances has been added to detect when a file is included more than one time and skip these includes. It do

Re: [Qemu-devel] [PATCH v2 4/5] qcow1: Validate image size (CVE-2014-0223)

2014-05-16 Thread Benoît Canet
The Friday 16 May 2014 à 12:47:56 (+0200), Kevin Wolf wrote : > Am 15.05.2014 um 18:35 hat Benoît Canet geschrieben: > > The Thursday 15 May 2014 à 16:21:56 (+0200), Kevin Wolf wrote : > > > A huge image size could cause s->l1_size to overflow. Make sure that > > > i

Re: [Qemu-devel] [PATCH] docs: clarify that qcow2 file size is not always a cluster multiple

2014-05-26 Thread Benoît Canet
The Thursday 22 May 2014 à 11:42:50 (+0200), Stefan Hajnoczi wrote : > Normally one would expect that qcow2 image file lengths are multiples of > the cluster size. This is not true in all cases and the spec should > document this so implementers remember to accept such files. > > $ qemu-img creat

Re: [Qemu-devel] [Qemu-stable] [PATCH 01/14] qemu-img: Plug memory leak on block option help error path

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:02 (+0200), Markus Armbruster wrote : > Introduced in commit a283cb6; mostly harmless. Spotted by Coverity. > > Signed-off-by: Markus Armbruster > --- > qemu-img.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/qemu-img.c b/qemu-img.c > index 1ad899e..6

Re: [Qemu-devel] [PATCH 02/14] block/vvfat: Plug memory leak in enable_write_target()

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:03 (+0200), Markus Armbruster wrote : > I figure the leak originated in bdrv_create2(), and was duplicated > into callers when commit 91a073ak dropped that function. Looks like > the other places have since been fixed. > > Spotted by Coverity. > > Signed-off-by: Ma

Re: [Qemu-devel] [PATCH 04/14] block: Plug memory leak on brv_open_image() error path

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:05 (+0200), Markus Armbruster wrote : > Introduced in commit da557a. Spotted by Coverity. > > Signed-off-by: Markus Armbruster > --- > block.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/block.c b/block.c > index 40c5e1a..1996f84 100644 > --- a/block

Re: [Qemu-devel] [PATCH 05/14] qemu-io: Support multiple -o in open command

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:06 (+0200), Markus Armbruster wrote : > Instead of ignoring all option values but the last one, multiple -o > options now have the same meaning as having a single option with all > settings in the order of their respective -o options. > > Same as commit 2dc8328 for q

Re: [Qemu-devel] [PATCH 06/14] qemu-io: Plug memory leak in open command

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:07 (+0200), Markus Armbruster wrote : > Introduced in commit b543c5c. Spotted by Coverity. > > Signed-off-by: Markus Armbruster > --- > qemu-io.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/qemu-io.c b/qemu-io.c > index ef3fef6..ffbad25 100644 > ---

Re: [Qemu-devel] [PATCH 03/14] qcow2: Plug memory leak on qcow2_invalidate_cache() error paths

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:04 (+0200), Markus Armbruster wrote : > Introduced in commit 5a8a30d. Spotted by Coverity. > > Signed-off-by: Markus Armbruster > --- > block/qcow2.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/block/qcow2.c b/block/qcow2.c > index

Re: [Qemu-devel] [PATCH 07/14] qemu-io: Don't print NULL when open without non-option arg fails

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:08 (+0200), Markus Armbruster wrote : > Reproducer: "open -o a=b". Broken in commit fd0fee3. > Signed-off-by: Markus Armbruster > --- > qemu-io.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/qemu-io.c b/qemu-io.c > index ffbad25..

Re: [Qemu-devel] [PATCH 08/14] blockdev: Plug memory leak in blockdev_init()

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:09 (+0200), Markus Armbruster wrote : > blockdev_init() leaks bs_opts when qemu_opts_create() fails, i.e. when > the ID is bad. Missed in commit ec9c10d. > > Signed-off-by: Markus Armbruster > --- > blockdev.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deleti

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