Re: [Qemu-block] [RFC PATCH 00/11] aio: Introduce handler type to fix nested aio_poll for dataplane

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 08:55, Fam Zheng wrote: On Fri, 07/24 09:35, Paolo Bonzini wrote: That way, aio_context_acquire can be dropped by: /* @pause_owner_thread: a callback which will be called when _main thread_ * wants exclusively operate on the AioContext, for example with a nested

[Qemu-block] [RESEND] RFC chaning zlib windowBits for QCOW2

2015-07-27 Thread Peter Lieven
Hi, I was experimenting a little with optimized zlib versions (like zlib-ng) to optimize the speed of compressed qcow2 generation. I found out that chaning the windowBits from -12 to -15 alone increases compression speed by about 15% while lowering the compressed size by about 6%. As a test

Re: [Qemu-block] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 12:30:19PM +0200, Paolo Bonzini wrote: On 27/07/2015 11:49, Jason Wang wrote: So this patch only clear VIRTIO_F_LAYOUT for legacy device. Cc: Stefan Hajnoczi stefa...@redhat.com Cc: Kevin Wolf kw...@redhat.com Cc: qemu-block@nongnu.org Signed-off-by: Jason

Re: [Qemu-block] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Cornelia Huck
On Mon, 27 Jul 2015 14:22:37 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Jul 27, 2015 at 12:30:19PM +0200, Paolo Bonzini wrote: On 27/07/2015 11:49, Jason Wang wrote: So this patch only clear VIRTIO_F_LAYOUT for legacy device. Cc: Stefan Hajnoczi stefa...@redhat.com

Re: [Qemu-block] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 13:22, Michael S. Tsirkin wrote: This patch is unnecessary, since the feature is added back below under if (__virtio_has_feature(features, VIRTIO_F_VERSION_1)). It's needed so we can apply virtio: set any_layout in virtio core Ah, okay. Paolo

[Qemu-block] [PULL for-2.4 1/1] sheepdog: serialize requests to overwrapping area

2015-07-27 Thread Jeff Cody
From: Hitoshi Mitake mitake.hito...@lab.ntt.co.jp Current sheepdog driver only serializes create requests in oid unit. This mechanism isn't enough for handling requests to overwrapping area spanning multiple oids, so it can result bugs like below:

[Qemu-block] [PULL for-2.4 0/1] block patches for 2.4-rc3

2015-07-27 Thread Jeff Cody
The following changes since commit f793d97e454a56d17e404004867985622ca1a63b: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2015-07-24 13:07:10 +0100) are available in the git repository at: https://github.com/codyprime/qemu-kvm-jtc.git

Re: [Qemu-block] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 03:28:51PM +0200, Cornelia Huck wrote: On Mon, 27 Jul 2015 14:22:37 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Jul 27, 2015 at 12:30:19PM +0200, Paolo Bonzini wrote: On 27/07/2015 11:49, Jason Wang wrote: So this patch only clear

[Qemu-block] [PULL 0/2] Block layer patches for 2.4.0-rc3

2015-07-27 Thread Kevin Wolf
The following changes since commit 122e7dab8ac549c8c5a9e1e13aa2464190e888de: Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging (2015-07-27 14:53:42 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to

[Qemu-block] [PATCH v9 08/10] qcow2: Invoke refcount order amendment function

2015-07-27 Thread Max Reitz
Make use of qcow2_change_refcount_order() to support changing the refcount order with qemu-img amend. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/block/qcow2.c

Re: [Qemu-block] [Qemu-devel] [PATCH COLO-BLOCK v7 02/17] quorum: implement block driver interfaces add/delete a BDS's child

2015-07-27 Thread Eric Blake
On 07/02/2015 09:21 AM, Alberto Garcia wrote: 3) I don't think it's necessary to set to NULL the pointers in s-bs[i] when i = num_children. There's no way to access those pointers anyway. Same for the ' s-bs[s-num_children] = NULL; ' bit in quorum_del_child(). I also think that using

[Qemu-block] [PATCH v9 00/10] qcow2: Support refcount order amendment

2015-07-27 Thread Max Reitz
(v1..v7 were named qcow2: Support refcount orders != 4) This series contains the final 10 patches of my qcow2 refcount order series, which add refcount order amendment functionality to qemu-img. v9: - Rebase on master - Patch 8: s/qerror_report_err/error_report_err/ git backport-diff against

[Qemu-block] [PATCH v9 04/10] qcow2: Use abort() instead of assert(false)

2015-07-27 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Alberto Garcia be...@igalia.com --- block/qcow2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c

Re: [Qemu-block] [PATCH v9 08/10] qcow2: Invoke refcount order amendment function

2015-07-27 Thread Eric Blake
On 07/27/2015 09:51 AM, Max Reitz wrote: Make use of qcow2_change_refcount_order() to support changing the refcount order with qemu-img amend. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 44 +++- 1 file changed, 35 insertions(+),

[Qemu-block] [PATCH v9 01/10] progress: Allow regressing progress

2015-07-27 Thread Max Reitz
Progress may regress; this should be displayed correctly by qemu_progress_print(). While touching that area of code, drop the redundant parentheses in the same condition. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Stefan Hajnoczi

Re: [Qemu-block] [RESEND] RFC chaning zlib windowBits for QCOW2

2015-07-27 Thread Stefan Hajnoczi
On Mon, Jul 27, 2015 at 2:58 PM, Peter Lieven p...@kamp.de wrote: I was experimenting a little with optimized zlib versions (like zlib-ng) to optimize the speed of compressed qcow2 generation. I found out that chaning the windowBits from -12 to -15 alone increases compression speed by about

[Qemu-block] [PATCH v9 10/10] iotests: Extend test 112 for qemu-img amend

2015-07-27 Thread Max Reitz
Add tests for conversion between different refcount widths. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- tests/qemu-iotests/112 | 109 + tests/qemu-iotests/112.out | 71 + 2

[Qemu-block] [PATCH] raw-posix.c: Make GetBSDPath() handle caching options

2015-07-27 Thread Programmingkid
Add support for caching options that can be specified from the command line. Signed-off-by: John Arbuckle programmingk...@gmail.com --- block/raw-posix.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index

[Qemu-block] [PATCH v5] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-07-27 Thread Programmingkid
Mac OS X can be picky when it comes to allowing the user to use physical devices in QEMU. Most mounted volumes appear to be off limits to QEMU. If an issue is detected, a message is displayed showing the user how to unmount a volume. Signed-off-by: John Arbuckle programmingk...@gmail.com ---

[Qemu-block] [PATCH] qapi: use 'type' in generated C code to match QMP union wire form

2015-07-27 Thread Eric Blake
When dealing with simple qapi unions, the code was generating a discriminator field of 'kind' even though the discriminator is sent as 'type' over QMP. Renaming things to match gets us one step closer to reusing common generator code for both simple and flat unions, without having to special case

[Qemu-block] [PATCH v9 05/10] qcow2: Split upgrade/downgrade paths for amend

2015-07-27 Thread Max Reitz
If the image version should be upgraded, that is the first we should do; if it should be downgraded, that is the last we should do. So split the version change block into an upgrade part at the start and a downgrade part at the end. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric

[Qemu-block] [PATCH v9 06/10] qcow2: Use intermediate helper CB for amend

2015-07-27 Thread Max Reitz
If there is more than one time-consuming operation to be performed for qcow2_amend_options(), we need an intermediate CB which coordinates the progress of the individual operations and passes the result to the original status callback. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric

[Qemu-block] [PATCH v9 07/10] qcow2: Add function for refcount order amendment

2015-07-27 Thread Max Reitz
Add a function qcow2_change_refcount_order() which allows changing the refcount order of a qcow2 image. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block/qcow2-refcount.c | 447 + block/qcow2.h

[Qemu-block] [PATCH v9 03/10] qcow2: Use error_report() in qcow2_amend_options()

2015-07-27 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Alberto Garcia be...@igalia.com --- block/qcow2.c | 14 ++ tests/qemu-iotests/061.out | 14 +++--- 2 files changed,

[Qemu-block] [PATCH v5 10/17] qcow2/overlaps: Protect inactive L1 tables

2015-07-27 Thread Max Reitz
Keep track of the inactive L1 tables in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block/qcow2-snapshot.c | 25 + 1 file changed, 25 insertions(+) diff --git

[Qemu-block] [PATCH v5 02/17] qcow2: Pull up overlap check option evaluation

2015-07-27 Thread Max Reitz
Pull up the absorption of the qcow2-relevant command line options and the evaluation of the overlap check options in qcow2_open(). Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block/qcow2.c | 96

[Qemu-block] [PATCH v5 13/17] qcow2/overlaps: Add memory limit reached event

2015-07-27 Thread Max Reitz
Later, a mechanism to set a limit on how much memory may be used for the overlap prevention structures will be introduced. If that limit is about to be exceeded, a QMP event should be emitted. This very event is specified by this patch. Signed-off-by: Max Reitz mre...@redhat.com ---

[Qemu-block] [PATCH v5 12/17] qcow2: Use new metadata overlap check function

2015-07-27 Thread Max Reitz
Make the static new overlap check function global and drop the old function. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-overlap.c | 8 +--- block/qcow2-refcount.c | 120 - 2 files changed, 2 insertions(+), 126 deletions(-) diff

[Qemu-block] [PATCH v5 11/17] qcow2/overlaps: Protect inactive L2 tables

2015-07-27 Thread Max Reitz
Keep track of the inactive L2 tables in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-refcount.c | 20 block/qcow2-snapshot.c | 43 --- 2 files changed,

Re: [Qemu-block] [Qemu-devel] [PATCH] qapi: use 'type' in generated C code to match QMP union wire form

2015-07-27 Thread Eric Blake
On 07/27/2015 11:30 AM, Eric Blake wrote: When dealing with simple qapi unions, the code was generating a discriminator field of 'kind' even though the discriminator is sent as 'type' over QMP. Renaming things to match gets us one step closer to reusing common generator code for both simple

[Qemu-block] [PATCH v5 04/17] qcow2/overlaps: Protect image header

2015-07-27 Thread Max Reitz
Enter the image header into the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block/qcow2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index

[Qemu-block] [PATCH v5 00/17] qcow2: Add new overlap check functions

2015-07-27 Thread Max Reitz
This is a continuation of previous versions of this series. v2's cover letter was the most elaborate, which you can find here (includes benchmarks): http://lists.nongnu.org/archive/html/qemu-devel/2014-11/msg03430.html See patch 1 for an explanation of why this series exists and what it does.

[Qemu-block] [PATCH v5 17/17] iotests: Test qcow2's overlap check memory limit

2015-07-27 Thread Max Reitz
This patch adds some test cases for the memory limit concerning the in-memory structures used to detect and prevent accidental metadata overlaps. Signed-off-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/060 | 222 +

[Qemu-block] [PATCH v5 07/17] qcow2/overlaps: Protect active L1 table

2015-07-27 Thread Max Reitz
Keep track of the active L1 table in the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block/qcow2-cluster.c | 11 +++ block/qcow2-snapshot.c | 10 ++ block/qcow2.c

[Qemu-block] [PATCH v5 14/17] qcow2/overlaps: Add memory usage limit

2015-07-27 Thread Max Reitz
This adds an adjustable limit for the total memory usage of the overlap prevention structures. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-overlap.c | 183 +++--- block/qcow2.c | 2 +- block/qcow2.h | 2 +- 3 files

[Qemu-block] [PATCH v5 01/17] qcow2: Add new overlap check functions

2015-07-27 Thread Max Reitz
The existing qcow2 metadata overlap detection function used existing structures to determine the location of the image metadata, from plain fields such as l1_table_offset and l1_size in the BDRVQcowState, over image structures in memory such as the L1 table for the L2 tables' positions, or it even

Re: [Qemu-block] [PATCH] megasas: Add write function to handle write access to PCI BAR 3

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 10:57, Hannes Reinecke wrote: Acked-by: Hannes Reinecke h...@suse.com Thanks, applied for 2.4. Paolo

Re: [Qemu-block] [PATCH v3] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-07-27 Thread Stefan Hajnoczi
On Fri, Jul 24, 2015 at 11:37:50AM -0400, Programmingkid wrote: On Jul 24, 2015, at 11:00 AM, Stefan Hajnoczi wrote: On Fri, Jul 17, 2015 at 08:19:16PM -0400, Programmingkid wrote: @@ -2014,7 +2015,9 @@ kern_return_t GetBSDPath( io_iterator_t mediaIterator, char *bsdPath, CFIndex ma

Re: [Qemu-block] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 11:49, Jason Wang wrote: So this patch only clear VIRTIO_F_LAYOUT for legacy device. Cc: Stefan Hajnoczi stefa...@redhat.com Cc: Kevin Wolf kw...@redhat.com Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- hw/block/virtio-blk.c | 2 +- 1 file

Re: [Qemu-block] [Qemu-devel] [PULL for-2.4 0/1] block patches for 2.4-rc3

2015-07-27 Thread Jeff Cody
On Mon, Jul 27, 2015 at 11:21:42AM -0400, Jeff Cody wrote: The following changes since commit f793d97e454a56d17e404004867985622ca1a63b: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2015-07-24 13:07:10 +0100) are available in the git repository at:

[Qemu-block] [PULL for-2.4 0/2] block patches for 2.4-rc3

2015-07-27 Thread Jeff Cody
The following changes since commit f8787f8723eaca1be99e3b1873e54de163fffa93: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20150727' into staging (2015-07-27 19:37:09 +0100) are available in the git repository at: g...@github.com:codyprime/qemu-kvm-jtc.git tags/jtc-for-upstream

Re: [Qemu-block] [PATCH v3] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-27 Thread Jeff Cody
On Wed, Jul 22, 2015 at 02:27:46PM +0100, Richard W.M. Jones wrote: v3: Same as v2 but set the return value to -EIO. Thanks, applied to my block tree: https://github.com/codyprime/qemu-kvm-jtc/tree/block Thanks, Jeff

[Qemu-block] [PULL for-2.4 1/2] sheepdog: serialize requests to overwrapping area

2015-07-27 Thread Jeff Cody
From: Hitoshi Mitake mitake.hito...@lab.ntt.co.jp Current sheepdog driver only serializes create requests in oid unit. This mechanism isn't enough for handling requests to overwrapping area spanning multiple oids, so it can result bugs like below:

Re: [Qemu-block] [RFC PATCH 00/11] aio: Introduce handler type to fix nested aio_poll for dataplane

2015-07-27 Thread Fam Zheng
On Fri, 07/24 09:35, Paolo Bonzini wrote: That way, aio_context_acquire can be dropped by: /* @pause_owner_thread: a callback which will be called when _main thread_ * wants exclusively operate on the AioContext, for example with a nested * aio_poll(). *

[Qemu-block] [PATCH] megasas: Add write function to handle write access to PCI BAR 3

2015-07-27 Thread Salva Peiró
This patch fixes a QEMU SEGFAULT when a write operation is performed on the memory region of the PCI BAR 3 (base address space). When a writeb(0xe000) is performed the .write function is invoked to handle the write access, however, since the .write is not initialised, the call to 0, causes

Re: [Qemu-block] [PATCH] megasas: Add write function to handle write access to PCI BAR 3

2015-07-27 Thread Hannes Reinecke
On 07/27/2015 10:51 AM, Salva Peiró wrote: This patch fixes a QEMU SEGFAULT when a write operation is performed on the memory region of the PCI BAR 3 (base address space). When a writeb(0xe000) is performed the .write function is invoked to handle the write access, however, since the

[Qemu-block] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Jason Wang
Chapter 6.3 of spec said Transitional devices MUST offer, and if offered by the device transitional drivers MUST accept the following: VIRTIO_F_ANY_LAYOUT (27) So this patch only clear VIRTIO_F_LAYOUT for legacy device. Cc: Stefan Hajnoczi stefa...@redhat.com Cc: Kevin Wolf kw...@redhat.com