Re: [Qemu-block] [Qemu-devel] [PATCH 07/16] block: change drain to look only at one child at a time

2016-03-08 Thread Paolo Bonzini
On 09/03/2016 04:41, Fam Zheng wrote: > > bdrv_requests_pending is checking children to also wait until internal > > requests (such as metadata writes) have completed. However, checking > > children is in general overkill because, apart from this special case, > > the parent's in_flight count

Re: [Qemu-block] [Qemu-devel] [PATCH 06/16] block: add BDS field to count in-flight requests

2016-03-08 Thread Paolo Bonzini
On 09/03/2016 04:35, Fam Zheng wrote: >> > enum BdrvTrackedRequestType { >> > BDRV_TRACKED_READ, >> > BDRV_TRACKED_WRITE, >> > -BDRV_TRACKED_FLUSH, >> > -BDRV_TRACKED_IOCTL, >> > BDRV_TRACKED_DISCARD, > Okay, so flush and ioctl are not needed, but why is discard

Re: [Qemu-block] [Qemu-devel] [PATCH 05/16] mirror: use bottom half to re-enter coroutine

2016-03-08 Thread Paolo Bonzini
On 09/03/2016 04:19, Fam Zheng wrote: >> > +/* The I/O operation is not finished until the callback returns. >> > + * If we call qemu_coroutine_enter here, there is the possibility >> > + * of a deadlock when the coroutine calls bdrv_drained_begin. >> > + */ >> > +

Re: [Qemu-block] [Qemu-devel] [PATCH 03/16] block: introduce bdrv_no_throttling_begin/end

2016-03-08 Thread Paolo Bonzini
On 09/03/2016 02:45, Fam Zheng wrote: >> > @@ -555,11 +574,7 @@ static int bdrv_prwv_co(BlockDriverState *bs, int64_t >> > offset, >> > * will not fire; so the I/O throttling function has to be disabled >> > here >> > * if it has been enabled. >> > */ >> > -if

Re: [Qemu-block] [Qemu-devel] [PATCH 02/16] block: move restarting of throttled reqs to block/throttle-groups.c

2016-03-08 Thread Paolo Bonzini
On 09/03/2016 02:26, Fam Zheng wrote: >> diff --git a/block/throttle-groups.c b/block/throttle-groups.c >> index 4920e09..eccfc0d 100644 >> --- a/block/throttle-groups.c >> +++ b/block/throttle-groups.c >> @@ -313,6 +313,17 @@ void coroutine_fn >>

[Qemu-block] [PATCH 0/2] block/qapi: trivial fixes

2016-03-08 Thread Peter Xu
One is to use literal printf format when possible. One is to fix an unbounded usage of stack. Peter Xu (2): block/qapi: make two printf() formats literal block/qapi: fix unbounded stack for dump_qdict block/qapi.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) --

[Qemu-block] [PATCH 1/2] block/qapi: make two printf() formats literal

2016-03-08 Thread Peter Xu
Fix two places to use literal printf format when possible. Signed-off-by: Peter Xu --- block/qapi.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index db2d3fb..c4c2115 100644 --- a/block/qapi.c +++ b/block/qapi.c

[Qemu-block] [PATCH v11 2/3] quorum: implement bdrv_add_child() and bdrv_del_child()

2016-03-08 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block.c | 8

[Qemu-block] [PATCH v11 1/3] Add new block driver interface to add/delete a BDS's child

2016-03-08 Thread Changlong Xie
From: Wen Congyang In some cases, we want to take a quorum child offline, and take another child online. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei

[Qemu-block] [PATCH v11 3/3] qmp: add monitor command to add/remove a child

2016-03-08 Thread Changlong Xie
From: Wen Congyang The new QMP command name is x-blockdev-change. It's just for adding/removing quorum's child now, and doesn't support all kinds of children, all kinds of operations, nor all block drivers. So it is experimental now. Signed-off-by: Wen Congyang

[Qemu-block] [PATCH v11 0/3] qapi: child add/delete support

2016-03-08 Thread Changlong Xie
ChangLog: v10~v11: 1. Rebase to the newest codes 2. Address comment from Max Don't use contractions in error messages, p1: Remove R-Bs, and use "BdrvChild *child" in bdrv_del_child p2: Fix error logic in get_new_child_index/remove_child_index, and prefect child->name parsing p3: Make

Re: [Qemu-block] [Qemu-devel] [PATCH 07/16] block: change drain to look only at one child at a time

2016-03-08 Thread Fam Zheng
On Tue, 02/16 18:56, Paolo Bonzini wrote: > bdrv_requests_pending is checking children to also wait until internal > requests (such as metadata writes) have completed. However, checking > children is in general overkill because, apart from this special case, > the parent's in_flight count will

Re: [Qemu-block] [Qemu-devel] [PATCH 06/16] block: add BDS field to count in-flight requests

2016-03-08 Thread Fam Zheng
On Tue, 02/16 18:56, Paolo Bonzini wrote: > Unlike tracked_requests, this field also counts throttled requests, > and remains non-zero if an AIO operation needs a BH to be "really" > completed. > > With this change, it is no longer necessary to have a dummy > BdrvTrackedRequest for requests that

Re: [Qemu-block] [Qemu-devel] [PATCH v15 8/9] Implement new driver for block replication

2016-03-08 Thread Changlong Xie
On 03/05/2016 01:39 AM, Stefan Hajnoczi wrote: On Fri, Feb 05, 2016 at 12:18:07PM +0800, Changlong Xie wrote: +static void replication_start(ReplicationState *rs, ReplicationMode mode, + Error **errp) +{ +BlockDriverState *bs = rs->opaque; +

Re: [Qemu-block] [Qemu-devel] [PATCH 05/16] mirror: use bottom half to re-enter coroutine

2016-03-08 Thread Fam Zheng
On Tue, 02/16 18:56, Paolo Bonzini wrote: > mirror is calling bdrv_drain from an AIO callback---more precisely, > the bdrv_drain happens far away from the AIO callback, in the coroutine that > the AIO callback enters. > > This used to be okay because bdrv_drain more or less tried to guess > when

Re: [Qemu-block] [Qemu-devel] [PATCH 2/8] block: fix unbounded stack for dump_qdict

2016-03-08 Thread Peter Xu
On Tue, Mar 08, 2016 at 01:17:03PM +0100, Paolo Bonzini wrote: > > > On 08/03/2016 09:12, Markus Armbruster wrote: > > I'm afraid this isn't a good idea. It relies on the non-local argument > > that nobody will ever put a key longer than 255 into a qdict that gets > > dumped. That may even be

Re: [Qemu-block] [Qemu-devel] [PATCH 2/8] block: fix unbounded stack for dump_qdict

2016-03-08 Thread Peter Xu
On Tue, Mar 08, 2016 at 02:47:31PM +0100, Markus Armbruster wrote: > Fam Zheng writes: > > Also I think the double underscore identifiers are considered reserved in C, > > no? > > Correct. C99 7.1.3 Reserved identifiers: All identifiers that begin > with an underscore and

Re: [Qemu-block] [Qemu-devel] [PATCH 03/16] block: introduce bdrv_no_throttling_begin/end

2016-03-08 Thread Fam Zheng
On Tue, 02/16 18:56, Paolo Bonzini wrote: > Extract the handling of throttling from bdrv_flush_io_queue. Looks good overall. Have two questions below. > > Signed-off-by: Paolo Bonzini > --- > block.c | 1 - > block/io.c| 56 >

Re: [Qemu-block] [Qemu-devel] [PATCH 02/16] block: move restarting of throttled reqs to block/throttle-groups.c

2016-03-08 Thread Fam Zheng
On Tue, 02/16 18:56, Paolo Bonzini wrote: > We want to remove throttled_reqs from block/io.c. This is the easy > part---hide the handling of throttled_reqs during disable/enable of > throttling within throttle-groups.c. > > Signed-off-by: Paolo Bonzini > --- > block/io.c

Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/3] vmdk: Switch to heap arrays for vmdk_parent_open

2016-03-08 Thread Fam Zheng
On Tue, 03/08 16:24, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) > > diff --git a/block/vmdk.c b/block/vmdk.c > index c68f456..03be7f0 100644 > --- a/block/vmdk.c > +++

Re: [Qemu-block] [Qemu-devel] [PATCH v4 07/10] qapi: Don't special-case simple union wrappers

2016-03-08 Thread Markus Armbruster
Eric Blake writes: > On 03/08/2016 08:59 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Simple unions were carrying a special case that hid their 'data' >>> QMP member from the resulting C struct, via the hack method >>>

Re: [Qemu-block] [PATCH 00/16] AioContext fine-grained locking, part 1 of 3, including bdrv_drain rewrite

2016-03-08 Thread Paolo Bonzini
On 16/02/2016 18:56, Paolo Bonzini wrote: > So the fine-grained locking series has grown from 2 parts to 3... > > This first part stops where we remove RFifoLock. > > In the previous submission, the bulk of the series took care of > associating an AioContext to a thread, so that aio_poll could

[Qemu-block] [PATCH 10/11] vmdk: Use BB functions in .bdrv_create()

2016-03-08 Thread Kevin Wolf
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf --- block/vmdk.c | 77 +--- 1 file changed,

[Qemu-block] [PATCH 06/11] qed: Use BB functions in .bdrv_create()

2016-03-08 Thread Kevin Wolf
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf --- block/qed.c | 28 +++- 1 file changed, 15 insertions(+), 13

[Qemu-block] [PATCH 07/11] sheepdog: Use BB functions in .bdrv_create()

2016-03-08 Thread Kevin Wolf
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf --- block/sheepdog.c | 43 --- 1 file changed, 24

[Qemu-block] [PATCH 11/11] vpc: Use BB functions in .bdrv_create()

2016-03-08 Thread Kevin Wolf
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf --- block/vpc.c | 37 + 1 file changed, 21 insertions(+), 16

[Qemu-block] [PATCH 04/11] qcow: Use BB functions in .bdrv_create()

2016-03-08 Thread Kevin Wolf
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf --- block/qcow.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-)

[Qemu-block] [PATCH 00/11] block: Use BB function in .bdrv_create() implementations

2016-03-08 Thread Kevin Wolf
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementations are such users, so this series converts them. This series (specifically patch 1) will also help with moving the writethrough cache implementation from BDS to BB, where it really belongs.

[Qemu-block] [PATCH 01/11] block: Use writeback in .bdrv_create() implementations

2016-03-08 Thread Kevin Wolf
There's no reason to use a writethrough cache mode while creating an image. Signed-off-by: Kevin Wolf --- block/parallels.c | 3 ++- block/qcow.c | 3 ++- block/qcow2.c | 3 ++- block/sheepdog.c | 6 -- block/vdi.c | 3 ++- block/vhdx.c | 3 ++-

[Qemu-block] [PATCH 02/11] block: Introduce blk_set_allow_write_beyond_eof()

2016-03-08 Thread Kevin Wolf
We check that the guest can't write beyond the end of its disk, but for other internal users it can make sense to allow growing a file. Signed-off-by: Kevin Wolf --- block/block-backend.c | 23 --- include/sysemu/block-backend.h | 1 + 2 files

Re: [Qemu-block] [Qemu-devel] [PATCH v4 07/10] qapi: Don't special-case simple union wrappers

2016-03-08 Thread Eric Blake
On 03/08/2016 08:59 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Simple unions were carrying a special case that hid their 'data' >> QMP member from the resulting C struct, via the hack method >> QAPISchemaObjectTypeVariant.simple_union_type(). But by using >> the

[Qemu-block] [PATCH 2/8] block: fix unbounded stack for dump_qdict

2016-03-08 Thread Peter Xu
Suggested-by: Paolo Bonzini CC: Markus Armbruster CC: Kevin Wolf CC: qemu-block@nongnu.org Signed-off-by: Peter Xu --- block/qapi.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/qapi.c

Re: [Qemu-block] [Qemu-devel] [PATCH 2/8] block: fix unbounded stack for dump_qdict

2016-03-08 Thread Peter Xu
On Tue, Mar 08, 2016 at 09:12:45AM +0100, Markus Armbruster wrote: > Peter Xu writes: > > const char *format = composite ? "%*s%s:\n" : "%*s%s: "; > > Unrelated to your patch: ugh! > > Printf formats should be literals whenever possible, to make it easy for > the

Re: [Qemu-block] [PATCH] vmdk: Create streamOptimized as version 3

2016-03-08 Thread Radoslav Gerganov
On 17.09.2015 08:04, Fam Zheng wrote: > VMware products accept only version 3 for streamOptimized, let's bump > the version. > > Reported-by: Radoslav Gerganov > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 8 +++- > 1 file changed, 7

Re: [Qemu-block] [Qemu-devel] [PATCH] vmdk: Switch to heap arrays for vmdk_write_cid

2016-03-08 Thread Peter Xu
On Tue, Mar 08, 2016 at 02:18:35PM +0800, Fam Zheng wrote: > It is only called once for each opened image, so we can do it the easy > way. > > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 25 ++--- > 1 file changed, 14 insertions(+), 11 deletions(-) > >

[Qemu-block] [PATCH 0/8] Fix several unbounded stack usage

2016-03-08 Thread Peter Xu
Suggested by Paolo. Ths patchset fixes several of the warnings generated by "-Wstack-usage=10". There are about 20-30 unbound stack cases during my build, and this patch is only fixing several of them, those which are obvious and easy. For the rest, most of them need some knowledge on

Re: [Qemu-block] [Qemu-devel] [PATCH 2/8] block: fix unbounded stack for dump_qdict

2016-03-08 Thread Markus Armbruster
Peter Xu writes: > On Tue, Mar 08, 2016 at 09:12:45AM +0100, Markus Armbruster wrote: >> Peter Xu writes: >> > const char *format = composite ? "%*s%s:\n" : "%*s%s: "; >> >> Unrelated to your patch: ugh! >> >> Printf formats should be literals

Re: [Qemu-block] [Qemu-devel] [PATCH 2/8] block: fix unbounded stack for dump_qdict

2016-03-08 Thread Markus Armbruster
Fam Zheng writes: > On Tue, 03/08 09:12, Markus Armbruster wrote: >> Peter Xu writes: >> >> > Suggested-by: Paolo Bonzini >> > CC: Markus Armbruster >> > CC: Kevin Wolf >> > CC:

Re: [Qemu-block] [PATCH] block/gluster: add support for SEEK_DATA/SEEK_HOLE

2016-03-08 Thread Niels de Vos
On Tue, Mar 08, 2016 at 01:53:26PM +0100, Kevin Wolf wrote: > Am 08.03.2016 um 05:21 hat Niels de Vos geschrieben: > > On Mon, Mar 07, 2016 at 01:27:38PM -0500, Jeff Cody wrote: > > > On Mon, Mar 07, 2016 at 07:04:15PM +0100, Niels de Vos wrote: > > > > GlusterFS 3.8 contains support for SEEK_DATA

Re: [Qemu-block] [PATCH v2 0/3] vmdk: Move descriptor buffers to heap

2016-03-08 Thread Kevin Wolf
Am 08.03.2016 um 09:24 hat Fam Zheng geschrieben: > All three functions are not in hot path (all run once for the BDS lifecycle), > so it's okay to convert to g_malloc0. Yeah, it's okay, but still kind of useless to memset the whole buffer before you overwrite it anyway. There's also a useless

Re: [Qemu-block] [PATCH] block/gluster: add support for SEEK_DATA/SEEK_HOLE

2016-03-08 Thread Niels de Vos
On Tue, Mar 08, 2016 at 07:33:26AM -0500, Jeff Cody wrote: > On Tue, Mar 08, 2016 at 05:21:48AM +0100, Niels de Vos wrote: > > On Mon, Mar 07, 2016 at 01:27:38PM -0500, Jeff Cody wrote: > > > On Mon, Mar 07, 2016 at 07:04:15PM +0100, Niels de Vos wrote: > > > > GlusterFS 3.8 contains support for

Re: [Qemu-block] [PATCH] block/gluster: add support for SEEK_DATA/SEEK_HOLE

2016-03-08 Thread Kevin Wolf
Am 08.03.2016 um 05:21 hat Niels de Vos geschrieben: > On Mon, Mar 07, 2016 at 01:27:38PM -0500, Jeff Cody wrote: > > On Mon, Mar 07, 2016 at 07:04:15PM +0100, Niels de Vos wrote: > > > GlusterFS 3.8 contains support for SEEK_DATA and SEEK_HOLE. This makes > > > it possible to detect sparse areas

[Qemu-block] [PATCH 8/8] block: Use blk_co_pwritev() in blk_co_write_zeroes()

2016-03-08 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/block-backend.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 2947e8c..1c2ea72 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -1465,12

[Qemu-block] [PATCH 6/8] block: Use blk_prw() in blk_pread()/blk_pwrite()

2016-03-08 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/block-backend.c | 36 +--- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 5b9d387..579cc09 100644 --- a/block/block-backend.c +++

[Qemu-block] [PATCH 5/8] block: Use blk_co_pwritev() in blk_write_zeroes()

2016-03-08 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/block-backend.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 4fd0545..5b9d387 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@

[Qemu-block] [PATCH 7/8] block: Use blk_aio_prwv() for aio_read/write/write_zeroes

2016-03-08 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/block-backend.c | 104 +++--- 1 file changed, 91 insertions(+), 13 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 579cc09..2947e8c 100644 --- a/block/block-backend.c

[Qemu-block] [PATCH 1/8] block: Use BdrvChild in BlockBackend

2016-03-08 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block.c | 47 ++--- block/block-backend.c | 254 -- include/block/block_int.h | 5 + 3 files changed, 192 insertions(+), 114 deletions(-) diff --git a/block.c b/block.c index

[Qemu-block] [PATCH 4/8] block: Pull up blk_read_unthrottled() implementation

2016-03-08 Thread Kevin Wolf
Use blk_read(), so that it goes through blk_co_preadv() like all read requests from the BB to the BDS. Signed-off-by: Kevin Wolf --- block/block-backend.c | 12 ++-- block/io.c| 14 -- include/block/block.h | 2 -- 3 files changed, 10

[Qemu-block] [PATCH 2/8] block: Use blk_co_preadv() for blk_read()

2016-03-08 Thread Kevin Wolf
This patch introduces blk_co_preadv() as a central function on the BlockBackend level that is supposed to handle all read requests from the BB to its root BDS eventually. Signed-off-by: Kevin Wolf --- block/block-backend.c | 64

[Qemu-block] [PATCH 3/8] block: Use blk_co_pwritev() for blk_write()

2016-03-08 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/block-backend.c | 39 ++- block/io.c| 5 + include/block/block_int.h | 3 +++ 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/block/block-backend.c

[Qemu-block] [PATCH 0/8] block: Introduce common read/write function

2016-03-08 Thread Kevin Wolf
BlockBackends support a few different interfaces for reads and writes. Until now they used to forward the requests directly to the BDS layer, which implemented wrappers around one central common read/write function that contained the actual implementation of features provided by the block layer.

Re: [Qemu-block] [PATCH v2 0/3] vmdk: Move descriptor buffers to heap

2016-03-08 Thread Paolo Bonzini
On 08/03/2016 09:24, Fam Zheng wrote: > All three functions are not in hot path (all run once for the BDS lifecycle), > so it's okay to convert to g_malloc0. > > Fam > > > Fam Zheng (3): > vmdk: Switch to heap arrays for vmdk_write_cid > vmdk: Switch to heap arrays for vmdk_read_cid >

Re: [Qemu-block] [PATCH] block/gluster: add support for SEEK_DATA/SEEK_HOLE

2016-03-08 Thread Jeff Cody
On Tue, Mar 08, 2016 at 05:21:48AM +0100, Niels de Vos wrote: > On Mon, Mar 07, 2016 at 01:27:38PM -0500, Jeff Cody wrote: > > On Mon, Mar 07, 2016 at 07:04:15PM +0100, Niels de Vos wrote: > > > GlusterFS 3.8 contains support for SEEK_DATA and SEEK_HOLE. This makes > > > it possible to detect

Re: [Qemu-block] [Qemu-devel] [PATCH 2/8] block: fix unbounded stack for dump_qdict

2016-03-08 Thread Paolo Bonzini
On 08/03/2016 09:12, Markus Armbruster wrote: > I'm afraid this isn't a good idea. It relies on the non-local argument > that nobody will ever put a key longer than 255 into a qdict that gets > dumped. That may even be the case, but you need to *prove* it, not just > assert it. The weakest

Re: [Qemu-block] strange crash in tracked_request_begin

2016-03-08 Thread Stefan Hajnoczi
On Mon, Mar 07, 2016 at 08:00:49PM +0100, Christian Borntraeger wrote: > On 03/07/2016 06:01 PM, Stefan Hajnoczi wrote: > > On Mon, Mar 07, 2016 at 01:29:08PM +0100, Christian Borntraeger wrote: > >> Folks, > >> > >> I had a crash of a qemu guest in tracked_request_begin. > >> The testcase was a

Re: [Qemu-block] [PATCH] qed: fix bdrv_qed_drain

2016-03-08 Thread Stefan Hajnoczi
On Mon, Mar 07, 2016 at 10:22:58PM +0100, Paolo Bonzini wrote: > On 07/03/2016 21:56, Stefan Hajnoczi wrote: > > I think the timer concept itself is troublesome. A radical approach but > > limited to changing QED itself is to drop the timer and instead keep a > > timestamp for the last allocating

Re: [Qemu-block] [PATCH] block: Fix snapshot=on cache modes

2016-03-08 Thread Kevin Wolf
Am 07.03.2016 um 19:24 hat Max Reitz geschrieben: > On 07.03.2016 13:26, Kevin Wolf wrote: > > Since commit 91a097e, we end up with a somewhat weird cache mode > > configuration with snapshot=on: The commit broke the cache mode > > inheritance for the snapshot overlay so that it is opened as > >

Re: [Qemu-block] [Qemu-devel] [PATCH 2/8] block: fix unbounded stack for dump_qdict

2016-03-08 Thread Fam Zheng
On Tue, 03/08 09:12, Markus Armbruster wrote: > Peter Xu writes: > > > Suggested-by: Paolo Bonzini > > CC: Markus Armbruster > > CC: Kevin Wolf > > CC: qemu-block@nongnu.org > > Signed-off-by: Peter Xu

[Qemu-block] [PATCH v2 3/3] vmdk: Switch to heap arrays for vmdk_parent_open

2016-03-08 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/vmdk.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index c68f456..03be7f0 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -343,15 +343,16 @@ static int

[Qemu-block] [PATCH v2 0/3] vmdk: Move descriptor buffers to heap

2016-03-08 Thread Fam Zheng
All three functions are not in hot path (all run once for the BDS lifecycle), so it's okay to convert to g_malloc0. Fam Fam Zheng (3): vmdk: Switch to heap arrays for vmdk_write_cid vmdk: Switch to heap arrays for vmdk_read_cid vmdk: Switch to heap arrays for vmdk_parent_open

[Qemu-block] [PATCH v2 1/3] vmdk: Switch to heap arrays for vmdk_write_cid

2016-03-08 Thread Fam Zheng
It is only called once for each opened image, so we can do it the easy way. Reviewed-by: Peter Xu Signed-off-by: Fam Zheng --- block/vmdk.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/block/vmdk.c

Re: [Qemu-block] [Qemu-devel] [PATCH 2/8] block: fix unbounded stack for dump_qdict

2016-03-08 Thread Markus Armbruster
Peter Xu writes: > Suggested-by: Paolo Bonzini > CC: Markus Armbruster > CC: Kevin Wolf > CC: qemu-block@nongnu.org > Signed-off-by: Peter Xu > --- > block/qapi.c | 5 - > 1 file changed, 4