Re: [Qemu-block] [PATCH v6 0/4] qapi: child add/delete support

2015-10-29 Thread Wen Congyang
Ping... On 10/16/2015 04:57 PM, Wen Congyang wrote: > If quorum's child is broken, we can use mirror job to replace it. > But sometimes, the user only need to remove the broken child, and > add it later when the problem is fixed. > > It is based on the Kevin's bdrv_swap() related patch: > http://

Re: [Qemu-block] [PATCH v10 01/10] allow writing to the backing file

2015-10-29 Thread Wen Congyang
On 10/10/2015 03:07 AM, Eric Blake wrote: > On 09/25/2015 12:17 AM, Wen Congyang wrote: >> For block replication, we have such backing chain: >> secondary disk <-- hidden disk <-- active disk >> secondary disk is top BDS(use bacing reference), so it can be opened in > > s/BDS(use bacing/BDS (u

[Qemu-block] [PATCH v4 3/3] aio: Introduce aio-epoll.c

2015-10-29 Thread Fam Zheng
To minimize code duplication, epoll is hooked into aio-posix's aio_poll() instead of rolling its own. This approach also has both compile-time and run-time switchability. 1) When QEMU starts with a small number of fds in the event loop, ppoll is used. 2) When QEMU starts with a big number of fds,

[Qemu-block] [PATCH v4 1/3] aio: Introduce aio_external_disabled

2015-10-29 Thread Fam Zheng
This allows AioContext users to check the enable/disable state of external clients. Signed-off-by: Fam Zheng --- include/block/aio.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/block/aio.h b/include/block/aio.h index bcc7d43..dcf74be 100644 --- a/include/block/aio.h

[Qemu-block] [PATCH v4 0/3] aio: Use epoll in aio_poll()

2015-10-29 Thread Fam Zheng
v4: Rebase onto master (with aio_disable_external): Don't use epoll if aio_external_disabled(ctx); Change assert on epoll_ctl return code to disable epoll; Rerun benchmark; v3: Remove the redundant check in aio_epoll_try_enable. [Stefan] v2: Merge aio-epoll.c into aio-posix.c. [Paolo]

[Qemu-block] [PATCH v4 2/3] aio: Introduce aio_context_setup

2015-10-29 Thread Fam Zheng
This is the place to initialize platform specific bits of AioContext. Signed-off-by: Fam Zheng --- aio-posix.c | 4 aio-win32.c | 4 async.c | 13 +++-- include/block/aio.h | 8 4 files changed, 27 insertions(+), 2 deletions(-) diff --gi

Re: [Qemu-block] [PATCH 1/2] iotests: Do not suppress segfaults in bash tests

2015-10-29 Thread Jeff Cody
On Thu, Oct 29, 2015 at 03:57:17PM +0100, Kevin Wolf wrote: > Am 31.08.2015 um 21:05 hat Max Reitz geschrieben: > > Currently, if a qemu/qemu-io/qemu-img/qemu-nbd invocation receives a > > segmentation fault, that message is invisible in most cases since the > > output is generally filtered and bas

[Qemu-block] [PATCH] qemu-iotests: fix -valgrind option for check

2015-10-29 Thread Jeff Cody
Commit 934659c switched the iotests to run qemu-io from a bash subshell, in order to catch segfaults. This method is incompatible with the current valgrind_qemu_io() bash function. Move the valgrind usage into the exec subshell in _qemu_io_wrapper(), while making sure the original return value is

Re: [Qemu-block] [PATCH v3 0/2] aio: Use epoll in aio_poll()

2015-10-29 Thread Stefan Hajnoczi
On Mon, Oct 26, 2015 at 02:39:40PM +0800, Fam Zheng wrote: > v3: Remove the redundant check in aio_epoll_try_enable. [Stefan] > > v2: Merge aio-epoll.c into aio-posix.c. [Paolo] > Capture some benchmark data in commit log. > > This series adds the ability to use epoll in aio_poll() on Linux.

Re: [Qemu-block] [PATCH v3 0/2] aio: Use epoll in aio_poll()

2015-10-29 Thread Stefan Hajnoczi
On Mon, Oct 26, 2015 at 02:39:40PM +0800, Fam Zheng wrote: > v3: Remove the redundant check in aio_epoll_try_enable. [Stefan] > > v2: Merge aio-epoll.c into aio-posix.c. [Paolo] > Capture some benchmark data in commit log. > > This series adds the ability to use epoll in aio_poll() on Linux.

Re: [Qemu-block] [PATCH 1/2] iotests: Do not suppress segfaults in bash tests

2015-10-29 Thread Kevin Wolf
Am 31.08.2015 um 21:05 hat Max Reitz geschrieben: > Currently, if a qemu/qemu-io/qemu-img/qemu-nbd invocation receives a > segmentation fault, that message is invisible in most cases since the > output is generally filtered and bash suppresses the segmentation fault > notice for any but the last el

[Qemu-block] [PATCH 0/2] Don't allow snapshots if the overlay has parent nodes

2015-10-29 Thread Alberto Garcia
There are several sanity checks for the 'blockdev-snapshot' command, but none covers the use of a file BDS as the overlay node. { 'execute': 'blockdev-add', 'arguments': { 'options': { 'driver': 'qcow2', 'node-name': 'new0', 'file': { 'dr

[Qemu-block] [PATCH 1/2] block: Don't allow snapshots if the overlay has parent nodes

2015-10-29 Thread Alberto Garcia
This addresses scenarios where the overlay node of the 'blockdev-snapshot' parameter is a child of an existing node, such as this one: { 'execute': 'blockdev-add', 'arguments': { 'options': { 'driver': 'qcow2', 'node-name': 'new0', 'file': { 'driver': 'f

[Qemu-block] [PATCH 2/2] block: test 'blockdev-snapshot' using a file BDS as the overlay

2015-10-29 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- tests/qemu-iotests/085 | 12 +++- tests/qemu-iotests/085.out | 4 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085 index 9484117..ccde2ae 100755 --- a/tests/qemu-iotests/085 +++ b/tes

[Qemu-block] [PATCH v2 0/1] qemu-iotests: fix cleanup of background processes

2015-10-29 Thread Jeff Cody
Changes from v1: * use 'read' instead of 'cat' (thanks Eric) * quote variable in variable test (thanks Eric) Jeff Cody (1): qemu-iotests: fix cleanup of background processes tests/qemu-iotests/common.config | 14 -- tests/qemu-iotests/common.qemu | 17 +++-- tests/qe

[Qemu-block] [PATCH v2 1/1] qemu-iotests: fix cleanup of background processes

2015-10-29 Thread Jeff Cody
Commit 934659c switched the iotests to run qemu and qemu-nbd from a bash subshell, in order to catch segfaults. Unfortunately, this means the process PID cannot be captured via '$!'. We stopped killing qemu and qemu-nbd processes, leaving a lot of orphaned, running qemu processes after executing i

Re: [Qemu-block] [PATCH 28/34] block: Introduce bs->explicit_options

2015-10-29 Thread Kevin Wolf
Am 15.05.2015 um 19:47 hat Max Reitz geschrieben: > 3) In bdrv_open(): > The QDict is just the one given to bdrv_open(). > > 3a) bdrv_open() call from bdrv_append_temp_snapshot(): > "file.driver" and "file.filename" are set, and these are the only > options in the whole QDict. Well... I'd argue th

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-iotests: fix cleanup of background processes

2015-10-29 Thread Jeff Cody
On Wed, Oct 28, 2015 at 10:08:42PM -0600, Eric Blake wrote: > On 10/28/2015 07:15 PM, Jeff Cody wrote: > > Commit 934659c switched the iotests to run qemu and qemu-nbd from a bash > > subshell, in order to catch segfaults. Unfortunately, this means the > > process PID cannot be captured via '$!'.

Re: [Qemu-block] [PATCH 2/2] dataplane: support non-contigious s/g

2015-10-29 Thread Igor Mammedov
On Wed, 28 Oct 2015 17:48:04 +0200 "Michael S. Tsirkin" wrote: > bring_map currently fails if one of the entries it's mapping is > contigious in GPA but not HVA address space. Introduce a mapped_len > parameter so it can handle this, returning the actual mapped length. > > This will still fail

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] dataplane: simplify indirect descriptor read

2015-10-29 Thread Igor Mammedov
On Wed, 28 Oct 2015 17:48:02 +0200 "Michael S. Tsirkin" wrote: > Use address_space_read to make sure we handle the case of an indirect > descriptor crossing DIMM boundary correctly. > > Signed-off-by: Michael S. Tsirkin Tested-by: Igor Mammedov > --- > > Warning: compile-tested only. > > h

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] dataplane: simplify indirect descriptor read

2015-10-29 Thread Igor Mammedov
On Wed, 28 Oct 2015 17:48:02 +0200 "Michael S. Tsirkin" wrote: > Use address_space_read to make sure we handle the case of an indirect > descriptor crossing DIMM boundary correctly. > > Signed-off-by: Michael S. Tsirkin > --- > > Warning: compile-tested only. > > hw/virtio/dataplane/vring.c

[Qemu-block] [PULL 08/16] virtio-blk: convert to virtqueue_map

2015-10-29 Thread Michael S. Tsirkin
Drop deprecated use of virtqueue_map_sg. Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- hw/block/virtio-blk.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 8beb26b..3e230de 100644 --- a/hw/block/virt

Re: [Qemu-block] How to specify the full block driver tree on the CLI ?

2015-10-29 Thread Kevin Wolf
Am 29.10.2015 um 09:15 hat Daniel P. Berrange geschrieben: > On Thu, Oct 29, 2015 at 09:11:15AM +0100, Kevin Wolf wrote: > > In qemu proper, you can use a dot syntax for -drive instead: > > > > qemu-system-x86_64 -drive \ > > driver=luks,\ > > secret=x,\ > > file.driver=file,\ > >

Re: [Qemu-block] How to specify the full block driver tree on the CLI ?

2015-10-29 Thread Daniel P. Berrange
On Thu, Oct 29, 2015 at 09:11:15AM +0100, Kevin Wolf wrote: > Am 29.10.2015 um 00:58 hat Daniel P. Berrange geschrieben: > > As previously mentioned, I'm working on support for LUKS full disk > > encryption in QEMU. I have a simple driver implemented that works > > on top of plain files. eg I can l

Re: [Qemu-block] How to specify the full block driver tree on the CLI ?

2015-10-29 Thread Kevin Wolf
Am 29.10.2015 um 00:58 hat Daniel P. Berrange geschrieben: > As previously mentioned, I'm working on support for LUKS full disk > encryption in QEMU. I have a simple driver implemented that works > on top of plain files. eg I can launch qemu-io thus: > > $ qemu-io /home/berrange/VirtualMachines/d