Re: [Qemu-block] [PATCH] Report error when opening device with locked tray

2016-06-08 Thread Kevin Wolf
Am 07.06.2016 um 22:00 hat John Snow geschrieben: > > > On 06/07/2016 06:28 AM, Kevin Wolf wrote: > > Am 06.06.2016 um 21:40 hat Colin Lord geschrieben: > >> This commit causes qmp_blockdev_change_medium to report an error if an > >> attempt is made to open a device with a locked tray. > > > > T

Re: [Qemu-block] [PATCH v2 1/3] block: Allow replacement of a BDS by its overlay

2016-06-08 Thread Kevin Wolf
Am 06.06.2016 um 16:42 hat Max Reitz geschrieben: > change_parent_backing_link() asserts that the BDS to be replaced is not > used as a backing file. However, we may want to replace a BDS by its > overlay in which case that very link should not be redirected. > > Signed-off-by: Max Reitz So the

[Qemu-block] [PULL 07/31] block: Track write zero limits in bytes

2016-06-08 Thread Kevin Wolf
From: Eric Blake Another step towards removing sector-based interfaces: convert the maximum write and minimum alignment values from sectors to bytes. Rename the variables to let the compiler check that all users are converted to the new semantics. The maximum remains an int as long as BDRV_REQU

[Qemu-block] [PULL 00/31] Block layer patches

2016-06-08 Thread Kevin Wolf
The following changes since commit 6ed5546fa7bf12c5b87ef76bafb86e1d77ed6e85: Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2016-06-07' into staging (2016-06-07 16:34:45 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream

[Qemu-block] [PULL 06/31] iscsi: Use block size as minimum zero/discard alignment

2016-06-08 Thread Kevin Wolf
From: Eric Blake If hardware does not advertise a minimum zero/discard alignment, we still want to guarantee that the block layer will align requests to our blocks, rather than the arbitrary 512-byte BDRV sector size. Signed-off-by: Eric Blake Signed-off-by: Kevin Wolf --- block/iscsi.c | 5 +

[Qemu-block] [PULL 10/31] iscsi: Convert to bdrv_co_pwrite_zeroes()

2016-06-08 Thread Kevin Wolf
From: Eric Blake Another step on our continuing quest to switch to byte-based interfaces. As this is the first byte-based iscsi interface, convert is_request_lun_aligned() into two versions, one for sectors and one for bytes. Also, change from outright -EINVAL failure on an unaligned request, t

[Qemu-block] [PULL 02/31] qcow2: simplify logic in qcow2_co_write_zeroes

2016-06-08 Thread Kevin Wolf
From: "Denis V. Lunev" Unaligned requests will occupy only one cluster. This is true since the previous commit. Simplify the code taking this consideration into account. In other words, the caller is now buggy if it ever passes us an unaligned request that crosses cluster boundaries (the only re

[Qemu-block] [PULL 01/31] block: split write_zeroes always

2016-06-08 Thread Kevin Wolf
From: "Denis V. Lunev" We should split requests even if they are less than write_zeroes_alignment. For example we can have the following request: offset 62k size 4k write_zeroes_alignment 64k The original code sent 1 request covering 2 qcow2 clusters, and resulted in both clusters being a

[Qemu-block] [PULL 17/31] vmdk: Convert to bdrv_co_pwrite_zeroes()

2016-06-08 Thread Kevin Wolf
From: Eric Blake Another step on our continuing quest to switch to byte-based interfaces. Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vmdk.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c

[Qemu-block] [PULL 09/31] block: Switch bdrv_write_zeroes() to byte interface

2016-06-08 Thread Kevin Wolf
From: Eric Blake Rename to bdrv_pwrite_zeroes() to let the compiler ensure we cater to the updated semantics. Do the same for bdrv_co_write_zeroes(). Signed-off-by: Eric Blake Signed-off-by: Kevin Wolf --- block/blkreplay.c | 4 +++- block/io.c | 34 +---

[Qemu-block] [PULL 05/31] qcow2: Catch more unaligned write_zero into zero cluster

2016-06-08 Thread Kevin Wolf
From: Eric Blake is_zero_cluster() and is_zero_cluster_top_locked() are used only by qcow2_co_write_zeroes(). The former is too broad (we don't care if the sectors we are about to overwrite are non-zero, only that all other sectors in the cluster are zero), so it needs to be called up to twice b

[Qemu-block] [PULL 03/31] qcow2: add tracepoints for qcow2_co_write_zeroes

2016-06-08 Thread Kevin Wolf
From: "Denis V. Lunev" This patch follows guidelines of all other tracepoints in qcow2, like ones in qcow2_co_writev. I think that they should dump values in the same quantities or be changed all together. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Kevin Wolf Message-Id: <1463476543-308

[Qemu-block] [PULL 04/31] qemu-iotests: Test one more spot for optimizing write_zeroes

2016-06-08 Thread Kevin Wolf
From: Eric Blake Add another test to 154, showing that we currently allocate a data cluster in the top layer if any sector of the backing file was allocated. The next patch will optimize this case. Signed-off-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/154 | 40 ++

[Qemu-block] [PULL 16/31] raw_bsd: Convert to bdrv_co_pwrite_zeroes()

2016-06-08 Thread Kevin Wolf
From: Eric Blake Another step on our continuing quest to switch to byte-based interfaces. Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/raw_bsd.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/block/raw_bsd.c b/block/ra

[Qemu-block] [PULL 08/31] block: Add .bdrv_co_pwrite_zeroes()

2016-06-08 Thread Kevin Wolf
From: Eric Blake Update bdrv_co_do_write_zeroes() to be byte-based, and select between the new byte-based bdrv_co_pwrite_zeroes() or the old bdrv_co_write_zeroes(). The next patches will convert drivers, then remove the old interface. Signed-off-by: Eric Blake Signed-off-by: Kevin Wolf --- b

[Qemu-block] [PULL 20/31] migration/block: Convert saving to BlockBackend

2016-06-08 Thread Kevin Wolf
This creates a new BlockBackend for copying data from an images to the migration stream on the source host. All I/O for block migration goes through BlockBackend now. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- migration/block.c | 124 ++---

[Qemu-block] [PULL 19/31] migration/block: Convert load to BlockBackend

2016-06-08 Thread Kevin Wolf
This converts the loading part of block migration to use BlockBackend interfaces rather than accessing the BlockDriverState directly. Note that this takes a lazy shortcut. We should really use a separate BlockBackend that is configured for the migration rather than for the guest (e.g. writethrough

[Qemu-block] [PULL 12/31] blkreplay: Convert to bdrv_co_pwrite_zeroes()

2016-06-08 Thread Kevin Wolf
From: Eric Blake Another step on our continuing quest to switch to byte-based interfaces. Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/blkreplay.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/block/blkreplay.c b/block

[Qemu-block] [PULL 18/31] block: Kill bdrv_co_write_zeroes()

2016-06-08 Thread Kevin Wolf
From: Eric Blake Now that all drivers have been converted to a byte interface, we no longer need a sector interface. Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/io.c| 15 ++- include/block/block_int.h | 2 -- 2 files chan

[Qemu-block] [PULL 13/31] gluster: Convert to bdrv_co_pwrite_zeroes()

2016-06-08 Thread Kevin Wolf
From: Eric Blake Another step on our continuing quest to switch to byte-based interfaces. Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/gluster.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/block/gluster.c b/block

[Qemu-block] [PULL 11/31] qcow2: Convert to bdrv_co_pwrite_zeroes()

2016-06-08 Thread Kevin Wolf
From: Eric Blake Another step on our continuing quest to switch to byte-based interfaces. Signed-off-by: Eric Blake Signed-off-by: Kevin Wolf --- block/qcow2.c | 37 +++-- trace-events | 4 ++-- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a

[Qemu-block] [PULL 25/31] blockdev: clean up error handling in do_open_tray

2016-06-08 Thread Kevin Wolf
From: Colin Lord Returns negative error codes and accompanying error messages in cases where the device has no tray or the tray is locked and isn't forced open. This extra information should result in better flexibility in functions that call do_open_tray. Suggested by: Markus Armbruster Signed

[Qemu-block] [PULL 21/31] block: assert that bs->request_alignment is a power of 2

2016-06-08 Thread Kevin Wolf
From: Peter Lieven at least bdrv_co_preadv/pwritev expect this. Signed-off-by: Peter Lieven Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index 736432f..f54bc25 100644 --- a/block.c +++ b/bl

[Qemu-block] [PULL 27/31] qemu-img bench

2016-06-08 Thread Kevin Wolf
This adds a qemu-img command that allows doing some simple benchmarks for the block layer without involving guest devices and a real VM. For the start, this implements only a test of sequential reads. Signed-off-by: Kevin Wolf Reviewed-by: Denis V. Lunev Reviewed-by: Stefan Hajnoczi --- qemu-

[Qemu-block] [PULL 28/31] qemu-img bench: Sequential writes

2016-06-08 Thread Kevin Wolf
This extends qemu-img bench with an option that makes it use sequential writes instead of reads for the test run. Signed-off-by: Kevin Wolf Reviewed-by: Denis V. Lunev Reviewed-by: Stefan Hajnoczi --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 38 +- qem

[Qemu-block] [PULL 14/31] qed: Convert to bdrv_co_pwrite_zeroes()

2016-06-08 Thread Kevin Wolf
From: Eric Blake Another step on our continuing quest to switch to byte-based interfaces. Kill an abuse of the comma operator while at it (fortunately, the semantics were still right). Also, the test for requests not aligned to clusters should be applied always, not just when a backing file is

[Qemu-block] [PULL 24/31] block: Fix bdrv_all_delete_snapshot() error handling

2016-06-08 Thread Kevin Wolf
The code to exit the loop after bdrv_snapshot_delete_by_id_or_name() returned failure was duplicated. The first copy of it was too early so that the AioContext lock would not be freed. This patch removes it so that only the second, correct copy remains. Signed-off-by: Kevin Wolf Reviewed-by: Max

[Qemu-block] [PULL 29/31] qemu-img bench: Make start offset configurable

2016-06-08 Thread Kevin Wolf
This patch adds an option the specify the offset of the first request made by qemu-img bench. This allows to benchmark misaligned requests. Signed-off-by: Kevin Wolf Reviewed-by: Denis V. Lunev Reviewed-by: Stefan Hajnoczi --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 23 +

[Qemu-block] [PULL 31/31] qemu-img bench: Add --flush-interval

2016-06-08 Thread Kevin Wolf
This options allows to flush the image periodically during write tests. Signed-off-by: Kevin Wolf Reviewed-by: Denis V. Lunev Reviewed-by: Stefan Hajnoczi --- qemu-img-cmds.hx | 4 +-- qemu-img.c | 95 ++-- qemu-img.texi| 8 -

[Qemu-block] [PULL 15/31] raw-posix: Convert to bdrv_co_pwrite_zeroes()

2016-06-08 Thread Kevin Wolf
From: Eric Blake Another step on our continuing quest to switch to byte-based interfaces. Signed-off-by: Eric Blake [ kwolf: Fixed up trace_paio_submit_co() call for qiov == NULL ] Signed-off-by: Kevin Wolf --- block/raw-posix.c | 34 +- trace-events | 2

[Qemu-block] [PULL 23/31] qcow2: avoid extra flushes in qcow2

2016-06-08 Thread Kevin Wolf
From: "Denis V. Lunev" The problem with excessive flushing was found by a couple of performance tests: - parallel directory tree creation (from 2 processes) - 32 cached writes + fsync at the end in a loop For the first one results improved from 2.6 loops/sec to 3.5 loops/sec. Each loop creat

[Qemu-block] [PULL 22/31] raw-posix: Fetch max sectors for host block device

2016-06-08 Thread Kevin Wolf
From: Fam Zheng This is sometimes a useful value we should count in. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/raw-posix.c | 24 1 file changed, 24 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index ce1c

[Qemu-block] [PULL 30/31] qemu-img bench: Implement -S (step size)

2016-06-08 Thread Kevin Wolf
With this new option, qemu-img bench can be told to advance the current offset after each request by a different value than the buffer size. This is useful for controlling the conditions for cluster allocation in image formats (e.g. qcow2 cluster allocation with COW in front of the request, or COW

[Qemu-block] [PULL 26/31] block: Don't emulate natively supported pwritev flags

2016-06-08 Thread Kevin Wolf
Drivers that implement .bdrv_co_pwritev() get the flags passed as an argument to said function, but we also unconditionally emulate the flags anyway. We shouldn't do that. Fix this by clearing all flags that the driver supports natively after it returns from .bdrv_co_pwritev(). Fixes: 4df863f3 ('

Re: [Qemu-block] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-08 Thread Kevin Wolf
Am 06.06.2016 um 16:42 hat Max Reitz geschrieben: > Currently, we are trying to move the backing BDS from the source to the > target in bdrv_replace_in_backing_chain() which is called from > mirror_exit(). However, mirror_complete() already tries to open the > target's backing chain with a call to

Re: [Qemu-block] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-08 Thread Paolo Bonzini
- Original Message - > From: "Kevin Wolf" > To: "Max Reitz" > Cc: qemu-block@nongnu.org, qemu-de...@nongnu.org, "Fam Zheng" > , nsof...@redhat.com, > ebl...@redhat.com, pbonz...@redhat.com > Sent: Wednesday, June 8, 2016 11:32:29 AM > Subject: Re: [PATCH v2 2/3] block/mirror: Fix targe

Re: [Qemu-block] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-08 Thread Kevin Wolf
Am 08.06.2016 um 13:28 hat Paolo Bonzini geschrieben: > > > - Original Message - > > From: "Kevin Wolf" > > To: "Max Reitz" > > Cc: qemu-block@nongnu.org, qemu-de...@nongnu.org, "Fam Zheng" > > , nsof...@redhat.com, > > ebl...@redhat.com, pbonz...@redhat.com > > Sent: Wednesday, June 8

Re: [Qemu-block] [PATCH v5 00/11] Provide a QOM-based authorization API

2016-06-08 Thread Daniel P. Berrange
On Thu, Jun 02, 2016 at 05:46:16PM +0100, Daniel P. Berrange wrote: > This is a followup of previously posted work in 2.6 cycle: > > v1: https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg04618.html > v2: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg01454.html > v3: https://li

Re: [Qemu-block] [PATCH v5 02/11] qapi: allow QmpInputVisitor to auto-cast types

2016-06-08 Thread Paolo Bonzini
On 02/06/2016 18:46, Daniel P. Berrange wrote: > Currently the QmpInputVisitor assumes that all scalar > values are directly represented as their final types. > ie it assumes an 'int' is using QInt, and a 'bool' is > using QBool. > > This extends it so that QString is optionally permitted > for

Re: [Qemu-block] [PATCH v20 00/10] Block replication for continuous checkpoints

2016-06-08 Thread Eric Blake
On 06/07/2016 07:11 PM, Changlong Xie wrote: > Block replication is a very important feature which is used for > continuous checkpoints(for example: COLO). > Side note: Including qemu-trivial in CC: on a patch series at v20 feels wrong. Obviously it is not trivial to be ten patches with this muc

Re: [Qemu-block] [PATCH v20 07/10] Introduce new APIs to do replication operation

2016-06-08 Thread Eric Blake
On 06/07/2016 07:11 PM, Changlong Xie wrote: > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > Signed-off-by: Changlong Xie No mention of the API names in the commit message? Grepping 'git log' is easier if there is something useful to grep for. > --- >

[Qemu-block] [PATCH 0/6] block: Enable byte granularity I/O

2016-06-08 Thread Kevin Wolf
Previous series have already converted some block drivers to byte-based rather than sector-based interfaces. However, the common I/O path as well as raw-posix still enforced a minimum alignment of 512 bytes because some sector-based logic was involved. This patch series removes these limitations a

[Qemu-block] [PATCH 4/6] raw-posix: Switch to bdrv_co_* interfaces

2016-06-08 Thread Kevin Wolf
In order to use the modern byte-based .bdrv_co_preadv/pwritev() interface, this patch switches raw-posix to coroutine-based interfaces as a first step. In terms of semantics and performance, it doesn't make a difference with the existing code whether we go from a coroutine to a callback-based inter

[Qemu-block] [PATCH 5/6] raw-posix: Implement .bdrv_co_preadv/pwritev

2016-06-08 Thread Kevin Wolf
The raw-posix block driver actually supports byte-aligned requests now on non-O_DIRECT images, like it already (and previously incorrectly) claimed in bs->request_alignment. For some block drivers this means that a RMW cycle can be avoided when they write sub-sector metadata e.g. for cluster alloc

Re: [Qemu-block] [PATCH 1/6] block: Byte-based bdrv_co_do_copy_on_readv()

2016-06-08 Thread Eric Blake
On 06/08/2016 08:10 AM, Kevin Wolf wrote: > In a first step to convert the common I/O path to work on bytes rather > than sectors, this converts the copy-on-read logic that is used by > bdrv_aligned_preadv(). > > Signed-off-by: Kevin Wolf > --- > block/io.c| 63 > +++

Re: [Qemu-block] [PATCH 2/6] block: Prepare bdrv_aligned_preadv() for byte-aligned requests

2016-06-08 Thread Eric Blake
On 06/08/2016 08:10 AM, Kevin Wolf wrote: > This patch makes bdrv_aligned_preadv() ready to accept byte-aligned > requests. Note that this doesn't mean that such requests are actually > made. The caller still ensures that all requests are aligned to at least > 512 bytes. > > Signed-off-by: Kevin W

Re: [Qemu-block] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-08 Thread Max Reitz
On 08.06.2016 16:40, Max Reitz wrote: > On 08.06.2016 13:28, Paolo Bonzini wrote: >> >> >> - Original Message - >>> From: "Kevin Wolf" >>> To: "Max Reitz" >>> Cc: qemu-block@nongnu.org, qemu-de...@nongnu.org, "Fam Zheng" >>> , nsof...@redhat.com, >>> ebl...@redhat.com, pbonz...@redhat.co

[Qemu-block] [PATCH 2/6] block: Prepare bdrv_aligned_preadv() for byte-aligned requests

2016-06-08 Thread Kevin Wolf
This patch makes bdrv_aligned_preadv() ready to accept byte-aligned requests. Note that this doesn't mean that such requests are actually made. The caller still ensures that all requests are aligned to at least 512 bytes. Signed-off-by: Kevin Wolf --- block/io.c | 41 +---

[Qemu-block] [PATCH 3/6] block: Prepare bdrv_aligned_pwritev() for byte-aligned requests

2016-06-08 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/block/io.c b/block/io.c index 2fd88cb..4af9c59 100644 --- a/block/io.c +++ b/block/io.c @@ -1241,11 +1241,9 @@ static int coroutine_fn bdrv_aligned_pwritev(BlockDriverState

[Qemu-block] [PATCH 1/6] block: Byte-based bdrv_co_do_copy_on_readv()

2016-06-08 Thread Kevin Wolf
In a first step to convert the common I/O path to work on bytes rather than sectors, this converts the copy-on-read logic that is used by bdrv_aligned_preadv(). Signed-off-by: Kevin Wolf --- block/io.c| 63 +++ block/mirror.c| 1

[Qemu-block] [PATCH 6/6] block: Don't enforce 512 byte minimum alignment

2016-06-08 Thread Kevin Wolf
If block drivers say that they can do an alignment < 512 bytes, let's just suppose they mean it. raw-posix used to be an offender with respect to this, but it can actually deal with byte-aligned requests now. The default is still 512 bytes for any drivers that only implement sector-based interface

Re: [Qemu-block] [PATCH] block: Don't emulate natively supported pwritev flags

2016-06-08 Thread Stefan Hajnoczi
On Tue, Jun 07, 2016 at 03:56:37PM +0200, Kevin Wolf wrote: > Drivers that implement .bdrv_co_pwritev() get the flags passed as an > argument to said function, but we also unconditionally emulate the flags > anyway. We shouldn't do that. > > Fix this by clearing all flags that the driver supports

Re: [Qemu-block] [PATCH] block: Don't emulate natively supported pwritev flags

2016-06-08 Thread Stefan Hajnoczi
On Tue, Jun 07, 2016 at 03:56:37PM +0200, Kevin Wolf wrote: > Drivers that implement .bdrv_co_pwritev() get the flags passed as an > argument to said function, but we also unconditionally emulate the flags > anyway. We shouldn't do that. > > Fix this by clearing all flags that the driver supports

Re: [Qemu-block] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-08 Thread Max Reitz
On 08.06.2016 11:32, Kevin Wolf wrote: > Am 06.06.2016 um 16:42 hat Max Reitz geschrieben: >> Currently, we are trying to move the backing BDS from the source to the >> target in bdrv_replace_in_backing_chain() which is called from >> mirror_exit(). However, mirror_complete() already tries to open

Re: [Qemu-block] [PATCH 3/6] block: Prepare bdrv_aligned_pwritev() for byte-aligned requests

2016-06-08 Thread Eric Blake
On 06/08/2016 08:10 AM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/io.c | 13 + > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/block/io.c b/block/io.c > index 2fd88cb..4af9c59 100644 > --- a/block/io.c > +++ b/block/io.c > @@ -1241,11 +1241,9 @@ s

Re: [Qemu-block] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-08 Thread Max Reitz
On 08.06.2016 13:28, Paolo Bonzini wrote: > > > - Original Message - >> From: "Kevin Wolf" >> To: "Max Reitz" >> Cc: qemu-block@nongnu.org, qemu-de...@nongnu.org, "Fam Zheng" >> , nsof...@redhat.com, >> ebl...@redhat.com, pbonz...@redhat.com >> Sent: Wednesday, June 8, 2016 11:32:29 AM

Re: [Qemu-block] [Qemu-devel] [PATCH v5 00/11] Provide a QOM-based authorization API

2016-06-08 Thread Markus Armbruster
"Daniel P. Berrange" writes: > Ping, does anyone have any feedback on these first 3 patches > in particular. If we get agreement on those and get them merged, > then we can feed the rest of this series to the individual > subsystem maintainers that are affected, and also unblock > Max's patch ser

Re: [Qemu-block] [PATCH v2 1/3] block: Allow replacement of a BDS by its overlay

2016-06-08 Thread Max Reitz
On 08.06.2016 10:58, Kevin Wolf wrote: > Am 06.06.2016 um 16:42 hat Max Reitz geschrieben: >> change_parent_backing_link() asserts that the BDS to be replaced is not >> used as a backing file. However, we may want to replace a BDS by its >> overlay in which case that very link should not be redirec

Re: [Qemu-block] [PATCH 4/6] raw-posix: Switch to bdrv_co_* interfaces

2016-06-08 Thread Eric Blake
On 06/08/2016 08:10 AM, Kevin Wolf wrote: > In order to use the modern byte-based .bdrv_co_preadv/pwritev() > interface, this patch switches raw-posix to coroutine-based interfaces > as a first step. In terms of semantics and performance, it doesn't make > a difference with the existing code whethe

Re: [Qemu-block] [Qemu-devel] coroutines: block: Co-routine re-entered recursively when migrating disk with iothreads

2016-06-08 Thread Stefan Hajnoczi
On Tue, Jun 7, 2016 at 1:42 PM, Jason J. Herne wrote: > On 06/06/2016 10:44 PM, Fam Zheng wrote: >> >> On Mon, 06/06 14:55, Jason J. Herne wrote: I'll see if I can reproduce it here. Fam >>> >>> Hi Fam, >>> Have you had any luck reproducing this? >> >> >> No I cannot repro

Re: [Qemu-block] [PATCH 5/6] raw-posix: Implement .bdrv_co_preadv/pwritev

2016-06-08 Thread Eric Blake
On 06/08/2016 08:10 AM, Kevin Wolf wrote: > The raw-posix block driver actually supports byte-aligned requests now > on non-O_DIRECT images, like it already (and previously incorrectly) > claimed in bs->request_alignment. > > For some block drivers this means that a RMW cycle can be avoided when >

Re: [Qemu-block] [Qemu-devel] coroutines: block: Co-routine re-entered recursively when migrating disk with iothreads

2016-06-08 Thread Paolo Bonzini
On 08/06/2016 17:30, Stefan Hajnoczi wrote: > This needs to be fixed. I believe Paolo has a patch to continue using > dataplane during savevm but that's a workaround rather than a solution > to this problem. That is already in. Dataplane during migration has been enabled since we've gotten rid

Re: [Qemu-block] [PATCH 6/6] block: Don't enforce 512 byte minimum alignment

2016-06-08 Thread Eric Blake
On 06/08/2016 08:10 AM, Kevin Wolf wrote: > If block drivers say that they can do an alignment < 512 bytes, let's > just suppose they mean it. raw-posix used to be an offender with respect > to this, but it can actually deal with byte-aligned requests now. > > The default is still 512 bytes for an

Re: [Qemu-block] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-08 Thread Max Reitz
On 08.06.2016 16:38, Max Reitz wrote: > On 08.06.2016 11:32, Kevin Wolf wrote: >> Am 06.06.2016 um 16:42 hat Max Reitz geschrieben: >>> Currently, we are trying to move the backing BDS from the source to the >>> target in bdrv_replace_in_backing_chain() which is called from >>> mirror_exit(). Howev

Re: [Qemu-block] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-08 Thread Nir Soffer
On Wed, Jun 8, 2016 at 12:32 PM, Kevin Wolf wrote: > Am 06.06.2016 um 16:42 hat Max Reitz geschrieben: >> Currently, we are trying to move the backing BDS from the source to the >> target in bdrv_replace_in_backing_chain() which is called from >> mirror_exit(). However, mirror_complete() already t

Re: [Qemu-block] [Qemu-devel] [PULL 00/31] Block layer patches

2016-06-08 Thread Peter Maydell
On 8 June 2016 at 10:16, Kevin Wolf wrote: > The following changes since commit 6ed5546fa7bf12c5b87ef76bafb86e1d77ed6e85: > > Merge remote-tracking branch > 'remotes/mjt/tags/pull-trivial-patches-2016-06-07' into staging (2016-06-07 > 16:34:45 +0100) > > are available in the git repository at:

[Qemu-block] [PATCH v2] blockdev: clarify error on attempt to open locked tray

2016-06-08 Thread Colin Lord
When opening a device with a locked tray, gives an error explaining the device tray is locked and that the user should wait and try again. This is less confusing than the previous error, which simply stated that the tray was locked. Signed-off-by: Colin Lord --- Reworded commit message to hopeful