Re: [Qemu-block] [PATCH 2/6] hw/m68k/mcf5206: Convert away from old_mmio

2018-06-01 Thread Thomas Huth
On 01.06.2018 16:12, Peter Maydell wrote: > Convert the mcf5206 device away from using the old_mmio field > of MemoryRegionOps. This device is used by the an5206 board. > > Signed-off-by: Peter Maydell > --- > hw/m68k/mcf5206.c | 48 +++ > 1 file chang

Re: [Qemu-block] [Qemu-devel] [PATCH 1/6] ahci: move PIO Setup FIS before transfer, fix it for ATAPI commands

2018-06-01 Thread John Snow
On 04/17/2018 11:39 AM, Paolo Bonzini wrote: > The PIO Setup FIS is written in the PIO:Entry state, which comes before > the ATA and ATAPI data transfer states. As a result, the PIO Setup FIS > interrupt is now raised before DMA ends for ATAPI commands, and tests have > to be adjusted. > Yes,

Re: [Qemu-block] [Qemu-devel] [PATCH 6/6] ide: introduce ide_transfer_start_norecurse

2018-06-01 Thread John Snow
On 04/17/2018 11:39 AM, Paolo Bonzini wrote: > For the case where the end_transfer_func is also the caller of > ide_transfer_start, the mutual recursion can lead to unlimited > stack usage. Introduce a new version that can be used to change > tail recursion into a loop, and use it in trace_ide_

Re: [Qemu-block] [Qemu-devel] [PATCH 5/6] atapi: call ide_set_irq before ide_transfer_start

2018-06-01 Thread John Snow
On 04/17/2018 11:39 AM, Paolo Bonzini wrote: > The ATAPI_INT_REASON_IO interrupt is raised when I/O starts, but in the This one is benefit of the doubt for me. (I still can't quite track down our usage of the nsector register for this, it doesn't seem supported by cmd_packet in ATA8 ... It say

Re: [Qemu-block] [Qemu-devel] [PATCH 4/6] ide: make ide_transfer_stop idempotent

2018-06-01 Thread John Snow
On 04/17/2018 11:39 AM, Paolo Bonzini wrote: > There is code checking s->end_transfer_func and it was not taught about > ide_transfer_cancel. We can just use ide_transfer_stop because > s->end_transfer_func is only ever called in the DRQ phase. > > ide_transfer_cancel can then be removed, sinc

Re: [Qemu-block] [Qemu-devel] [PATCH 3/6] ide: call ide_cmd_done from ide_transfer_stop

2018-06-01 Thread John Snow
On 04/17/2018 11:39 AM, Paolo Bonzini wrote: > The code can simply be moved to the sole caller that has notify == true. > > Signed-off-by: Paolo Bonzini Reviewed-by: John Snow

Re: [Qemu-block] [Qemu-devel] [PATCH 2/6] ide: push end_transfer_func out of start_transfer callback, rename callback

2018-06-01 Thread John Snow
On 04/17/2018 11:39 AM, Paolo Bonzini wrote: > Now that end_transfer_func is a tail call in ahci_start_transfer, > formalize the fact that the callback (of which ahci_start_transfer is > the sole implementation) takes care of the transfer too: rename it to > pio_transfer and, if it is present, c

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: Fix 219's timing

2018-06-01 Thread Eric Blake
On 06/01/2018 07:32 AM, Max Reitz wrote: 219 has two issues that may lead to sporadic failure, both of which are the result of issuing query-jobs too early after a job has been modified. This can then lead to different results based on whether the modification has taken effect already or not. F

Re: [Qemu-block] [Qemu-devel] [PATCH v2 00/16] block: Make blockdev-create a job and stable API

2018-06-01 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180529203910.7615-1-kw...@redhat.com Subject: [Qemu-devel] [PATCH v2 00/16] block: Make blockdev-create a job and stable API === TEST SCRIPT BEGIN === #!/bin/bash BASE=ba

[Qemu-block] [PULL 23/31] migration: use local path for local headers

2018-06-01 Thread Michael S. Tsirkin
When pulling in headers that are in the same directory as the C file (as opposed to one in include/), we should use its relative path, without a directory. Signed-off-by: Michael S. Tsirkin Reviewed-by: Juan Quintela --- migration/block-dirty-bitmap.c | 2 +- migration/page_cache.c | 2

[Qemu-block] [PULL 09/31] block: use local path for local headers

2018-06-01 Thread Michael S. Tsirkin
When pulling in headers that are in the same directory as the C file (as opposed to one in include/), we should use its relative path, without a directory. Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- block/crypto.c | 2 +-

[Qemu-block] [PULL 03/31] vhost-user: introduce shared vhost-user state

2018-06-01 Thread Michael S. Tsirkin
From: Tiwei Bie When multi queue is enabled e.g. for a virtio-net device, each queue pair will have a vhost_dev, and the only thing shared between vhost devs currently is the chardev. This patch introduces a vhost-user state structure which will be shared by all vhost devs of the same virtio devi

[Qemu-block] [PULL 31/31] vhost-blk: turn on pre-defined RO feature bit

2018-06-01 Thread Michael S. Tsirkin
From: Changpeng Liu Read only feature shouldn't be negotiable, because if the backend device reported Read only feature supported, QEMU host driver shouldn't change backend's RO attribute. While here, also enable the vhost-user-blk test utility to test RO feature. Signed-off-by: Changpeng Liu R

[Qemu-block] [PULL 15/31] ide: use local path for local headers

2018-06-01 Thread Michael S. Tsirkin
When pulling in headers that are in the same directory as the C file (as opposed to one in include/), we should use its relative path, without a directory. Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/ide/ahci-allwinner.c | 2 +-

Re: [Qemu-block] [Qemu-devel] [RFC PATCH V4] qemu-img: make convert async

2018-06-01 Thread Vladimir Sementsov-Ogievskiy
Hi! 20.02.2017 17:59, Peter Lieven wrote: Am 20.02.2017 um 15:50 schrieb Stefan Hajnoczi: On Fri, Feb 17, 2017 at 05:00:24PM +0100, Peter Lieven wrote: this is something I have been thinking about for almost 2 years now. we heavily have the following two use cases when using qemu-img convert.

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] block: Add blklogwrites

2018-06-01 Thread Eric Blake
On 06/01/2018 10:15 AM, Ari Sundholm wrote: Thank you. I'll try to get a new, more proper version of the patchset out for review/comments next week. Sorry for the sloppiness in this first version! Looking forward to it, even if, as Stefan pointed out, we can already do everything by use of t

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] block: Add blklogwrites

2018-06-01 Thread Ari Sundholm
On 06/01/2018 06:05 PM, Eric Blake wrote: On 06/01/2018 08:31 AM, Ari Sundholm wrote: +++ b/block/blklogwrites.c @@ -0,0 +1,441 @@ +/* + * Write logging blk driver based on blkverify and blkdebug. + * + * Copyright (c) 2017 Tuomas Tynkkynen + * Copyright (c) 2018 Aapo Vienamo + * Copyright (c)

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] block: Add blklogwrites

2018-06-01 Thread Eric Blake
On 06/01/2018 08:31 AM, Ari Sundholm wrote: +++ b/block/blklogwrites.c @@ -0,0 +1,441 @@ +/* + * Write logging blk driver based on blkverify and blkdebug. + * + * Copyright (c) 2017 Tuomas Tynkkynen + * Copyright (c) 2018 Aapo Vienamo + * Copyright (c) 2018 Ari Sundholm + * + * This work is li

[Qemu-block] [PATCH 3/6] hw/block/pflash_cfi02: Convert away from old_mmio

2018-06-01 Thread Peter Maydell
Convert the pflash_cfi02 device away from using the old_mmio field of MemoryRegionOps. Signed-off-by: Peter Maydell --- hw/block/pflash_cfi02.c | 97 - 1 file changed, 18 insertions(+), 79 deletions(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflas

[Qemu-block] [PATCH 2/6] hw/m68k/mcf5206: Convert away from old_mmio

2018-06-01 Thread Peter Maydell
Convert the mcf5206 device away from using the old_mmio field of MemoryRegionOps. This device is used by the an5206 board. Signed-off-by: Peter Maydell --- hw/m68k/mcf5206.c | 48 +++ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/hw/m

Re: [Qemu-block] [PATCH 1/5] block: Add blklogwrites

2018-06-01 Thread Ari Sundholm
On 06/01/2018 04:32 PM, Stefan Hajnoczi wrote: On Fri, Jun 01, 2018 at 12:17:19AM +0300, Ari Sundholm wrote: From: Aapo Vienamo Thanks for the patch! Implements a block device write logging system, similar to Linux kernel device mapper dm-log-writes. The write operations that are performed

Re: [Qemu-block] [Qemu-devel] [PATCH] file-posix: Consolidate the locking error message

2018-06-01 Thread Fam Zheng
On Fri, 06/01 15:00, Daniel P. Berrangé wrote: > On Fri, Jun 01, 2018 at 09:33:59PM +0800, Fam Zheng wrote: > > On Fri, 06/01 13:43, Daniel P. Berrangé wrote: > > > On Fri, Jun 01, 2018 at 05:18:35PM +0800, Fam Zheng wrote: > > > > When hot-plugging a block device fails due to image locking errors,

[Qemu-block] [PATCH 1/6] hw/sh/sh7750: Convert away from old_mmio

2018-06-01 Thread Peter Maydell
Convert the sh7750 device away from using the old_mmio field of MemoryRegionOps. This device is used by the sh4 r2d board. Signed-off-by: Peter Maydell --- hw/sh4/sh7750.c | 44 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/hw/sh4/sh7

[Qemu-block] [PATCH 6/6] hw/char/parallel: Convert away from old_mmio

2018-06-01 Thread Peter Maydell
Convert the parallel device away from using the old_mmio field of MemoryRegionOps. This change only affects the memory-mapped variant, which is used by the MIPS Jazz boards 'magnum' and 'pica61'. Signed-off-by: Peter Maydell --- hw/char/parallel.c | 50 ++-

[Qemu-block] [PATCH 4/6] hw/watchdog/wdt_i6300esb: Convert away from old_mmio

2018-06-01 Thread Peter Maydell
Convert the wdt_i6300esb device away from using the old_mmio field of MemoryRegionOps. Signed-off-by: Peter Maydell --- hw/watchdog/wdt_i6300esb.c | 48 -- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/hw/watchdog/wdt_i6300esb.c b/hw/watchdog

[Qemu-block] [PATCH 5/6] hw/input/pckbd: Convert away from old_mmio

2018-06-01 Thread Peter Maydell
Convert the pckbd device away from using the old_mmio field of MemoryRegionOps. This change only affects the memory-mapped variant of the i8042, which is used by the Unicore32 'puv3' board and the MIPS Jazz boards 'magnum' and 'pica61'. Signed-off-by: Peter Maydell --- hw/input/pckbd.c | 14

[Qemu-block] [PATCH 0/6] More conversions away from old_mmio

2018-06-01 Thread Peter Maydell
Half a dozen miscellaneous conversions away from old_mmio usage in the MemoryRegionOps struct. This leaves us with only 10 remaining in the tree. NB: mips parts tested only via 'make check'. thanks -- PMM Peter Maydell (6): hw/sh/sh7750: Convert away from old_mmio hw/m68k/mcf5206: Convert aw

Re: [Qemu-block] [Qemu-devel] [PATCH] file-posix: Consolidate the locking error message

2018-06-01 Thread Daniel P . Berrangé
On Fri, Jun 01, 2018 at 09:33:59PM +0800, Fam Zheng wrote: > On Fri, 06/01 13:43, Daniel P. Berrangé wrote: > > On Fri, Jun 01, 2018 at 05:18:35PM +0800, Fam Zheng wrote: > > > When hot-plugging a block device fails due to image locking errors, > > > users won't see the helpful 'Is another process

Re: [Qemu-block] [Qemu-devel] [PATCH] file-posix: Consolidate the locking error message

2018-06-01 Thread Fam Zheng
On Fri, 06/01 07:32, Eric Blake wrote: > On 06/01/2018 04:18 AM, Fam Zheng wrote: > > When hot-plugging a block device fails due to image locking errors, > > users won't see the helpful 'Is another process using the image?' > > message in QMP because currently the error hint is not carried over > >

Re: [Qemu-block] [Qemu-devel] [PATCH] file-posix: Consolidate the locking error message

2018-06-01 Thread Fam Zheng
On Fri, 06/01 13:43, Daniel P. Berrangé wrote: > On Fri, Jun 01, 2018 at 05:18:35PM +0800, Fam Zheng wrote: > > When hot-plugging a block device fails due to image locking errors, > > users won't see the helpful 'Is another process using the image?' > > message in QMP because currently the error hi

Re: [Qemu-block] [PATCH 1/5] block: Add blklogwrites

2018-06-01 Thread Stefan Hajnoczi
On Fri, Jun 01, 2018 at 12:17:19AM +0300, Ari Sundholm wrote: > From: Aapo Vienamo Thanks for the patch! > Implements a block device write logging system, similar to Linux kernel > device mapper dm-log-writes. The write operations that are performed > on a block device are logged to a file or an

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] block: Add blklogwrites

2018-06-01 Thread Ari Sundholm
On 06/01/2018 03:26 PM, Eric Blake wrote: On 05/31/2018 04:17 PM, Ari Sundholm wrote: From: Aapo Vienamo Implements a block device write logging system, similar to Linux kernel [meta-comment] Your patch threading is awkward - you forgot a cover letter, and then you did deep threading (ever

Re: [Qemu-block] [ovirt-users] Re: Debugging ceph access

2018-06-01 Thread Stefan Hajnoczi
On Thu, May 31, 2018 at 11:02:01PM +0300, Nir Soffer wrote: > On Thu, May 31, 2018 at 1:55 AM Bernhard Dick wrote: > > > Hi, > > > > I found the reason for my timeout problems: It is the version of librbd1 > > (which is 0.94.5) in conjunction with my CEPH test-environment which is > > running the

Re: [Qemu-block] [Qemu-devel] [PATCH] file-posix: Consolidate the locking error message

2018-06-01 Thread Daniel P . Berrangé
On Fri, Jun 01, 2018 at 05:18:35PM +0800, Fam Zheng wrote: > When hot-plugging a block device fails due to image locking errors, > users won't see the helpful 'Is another process using the image?' > message in QMP because currently the error hint is not carried over > there. > > Even though extend

Re: [Qemu-block] [PATCH] iotests: improve pause_job

2018-06-01 Thread Max Reitz
On 2018-06-01 13:59, Vladimir Sementsov-Ogievskiy wrote: > It's possible, that job was finished during waiting. In this case we > will see error message "Timeout waiting for job to pause" which is not > very informative. So, let's check during waiting iteration that the job > exists. > > Signed-of

Re: [Qemu-block] [Qemu-devel] [PATCH] file-posix: Consolidate the locking error message

2018-06-01 Thread Eric Blake
On 06/01/2018 04:18 AM, Fam Zheng wrote: When hot-plugging a block device fails due to image locking errors, users won't see the helpful 'Is another process using the image?' message in QMP because currently the error hint is not carried over there. Even though extending QMP to include hint is a

[Qemu-block] [PATCH] iotests: Fix 219's timing

2018-06-01 Thread Max Reitz
219 has two issues that may lead to sporadic failure, both of which are the result of issuing query-jobs too early after a job has been modified. This can then lead to different results based on whether the modification has taken effect already or not. First, query-jobs is issued right after the

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] block: Add blklogwrites

2018-06-01 Thread Eric Blake
On 05/31/2018 04:17 PM, Ari Sundholm wrote: From: Aapo Vienamo Implements a block device write logging system, similar to Linux kernel [meta-comment] Your patch threading is awkward - you forgot a cover letter, and then you did deep threading (every message in-reply-to the previous) instead

[Qemu-block] [PATCH] iotests: improve pause_job

2018-06-01 Thread Vladimir Sementsov-Ogievskiy
It's possible, that job was finished during waiting. In this case we will see error message "Timeout waiting for job to pause" which is not very informative. So, let's check during waiting iteration that the job exists. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.p

Re: [Qemu-block] Problem with data miscompare using scsi-hd, cache=none and io=threads

2018-06-01 Thread Stefan Hajnoczi
On Thu, May 24, 2018 at 06:30:10PM -0300, Daniel Henrique Barboza wrote: > > > On 05/24/2018 11:04 AM, Stefan Hajnoczi wrote: > > On Tue, May 15, 2018 at 06:25:46PM -0300, Daniel Henrique Barboza wrote: > > > This means that the test executed a write at  LBA 0x94fa and, after > > > confirming tha

Re: [Qemu-block] [PATCH 0/2] qemu-img: Special post-backing convert handle

2018-06-01 Thread Max Reitz
On 2018-05-01 18:57, Max Reitz wrote: > This is the issue: > > $ qemu-img create -f qcow2 base.qcow2 512M > Formatting 'base.qcow2', fmt=qcow2 size=536870912 cluster_size=65536 > lazy_refcounts=off refcount_bits=16 > $ qemu-img create -f qcow2 -b base.qcow2 source.qcow2 1G > Formatting 'source.qc

Re: [Qemu-block] [PATCH v2 0/2] qemu-img: Resolve relative backing paths in rebase

2018-06-01 Thread Max Reitz
On 2018-05-09 20:20, Max Reitz wrote: > v1 of the cover letter here (no change necessary there): > http://lists.nongnu.org/archive/html/qemu-block/2018-05/msg00243.html > > v2: Fixed a leaked buffer in an error path in patch 1 [Eric] > > > git-backport-diff against v1: > > Key: > [] : patch

Re: [Qemu-block] [PATCH v2 0/5] qemu-io: Exit with error when a command failed

2018-06-01 Thread Max Reitz
On 2018-05-09 21:42, Max Reitz wrote: > Right now, qemu-io's exit code is rather useless as it is usually 0. > Except sometimes, then it's 1 in case of an error (mostly when you > specify a filename as an argument and it cannot open that). > > At the same time, most command functions' return value

Re: [Qemu-block] [PATCH v2 0/2] qcow2: Repair OFLAG_COPIED when fixing leaks

2018-06-01 Thread Max Reitz
On 2018-05-09 22:00, Max Reitz wrote: > Suppose you have an image with consistent OFLAG_COPIED and refcounts. > Now further suppose that image has leaked clusters (single reference, > but refcount 2). When checking such an image with qemu-img check, it > will notify you of the leakage, and that's

Re: [Qemu-block] [PATCH v2 0/7] qemu-img: Improve option help for amend

2018-06-01 Thread Max Reitz
On 2018-05-09 23:00, Max Reitz wrote: > [Unchanged text from v1 ahead] > > Currently, "qemu-img amend -f $format -o help" prints many things which > it claims to be supported, but most of the time it's wrong. Usually > that starts with the format already: No format but qcow2 supports option > ame

Re: [Qemu-block] [PATCH v2 0/3] block/file-posix: File locking during creation

2018-06-01 Thread Max Reitz
On 2018-05-09 23:53, Max Reitz wrote: > [Unchanged text from v1 ahead] > > Currently we do not take permissions on a file while it is being > created. That is a bit sad. The simplest way to test this is the > following: > > $ qemu-img create -f qcow2 foo.qcow2 64M > Formatting 'foo.qcow

Re: [Qemu-block] [RFC] Intermediate block mirroring

2018-06-01 Thread Alberto Garcia
On Thu 03 May 2018 02:22:41 PM CEST, Kevin Wolf wrote: >> > Were the (more or less) exact requirements of QMP blockdev-reopen >> > discussed? How is it different from qemu-io's "reopen" command? >> > What are the options that you can and can not change? >> >> I can't quite remember, I'm afraid. I

Re: [Qemu-block] [PATCH 2/2] backup: Use copy offloading

2018-06-01 Thread Stefan Hajnoczi
On Thu, May 31, 2018 at 10:34:45AM +0800, Fam Zheng wrote: > The implementation is similar to the 'qemu-img convert'. In the > beginning of the job, offloaded copy is attempted. If it fails, further > I/O will go through the existing bounce buffer code path. > > Signed-off-by: Fam Zheng > --- >

Re: [Qemu-block] [Qemu-devel] [PATCH v8 00/11] qemu-img convert with copy offloading

2018-06-01 Thread Fam Zheng
On Fri, 06/01 10:37, Stefan Hajnoczi wrote: > On Thu, May 31, 2018 at 11:45:17PM -0700, no-re...@patchew.org wrote: > > /var/tmp/patchew-tester-tmp-2l7s8dte/src/block/iscsi.c: In function > > ‘iscsi_populate_target_desc’: > > /var/tmp/patchew-tester-tmp-2l7s8dte/src/block/iscsi.c:2242:15: error:

Re: [Qemu-block] [PATCH v8 06/11] file-posix: Implement bdrv_co_copy_range

2018-06-01 Thread Stefan Hajnoczi
On Fri, Jun 01, 2018 at 02:28:44PM +0800, Fam Zheng wrote: > With copy_file_range(2), we can implement the bdrv_co_copy_range > semantics. > > Signed-off-by: Fam Zheng > --- > block/file-posix.c | 98 +++-- > configure | 17 +++ > includ

Re: [Qemu-block] [Qemu-devel] [PATCH v8 00/11] qemu-img convert with copy offloading

2018-06-01 Thread Stefan Hajnoczi
On Thu, May 31, 2018 at 11:45:17PM -0700, no-re...@patchew.org wrote: > /var/tmp/patchew-tester-tmp-2l7s8dte/src/block/iscsi.c: In function > ‘iscsi_populate_target_desc’: > /var/tmp/patchew-tester-tmp-2l7s8dte/src/block/iscsi.c:2242:15: error: > ‘IDENT_DESCR_TGT_DESCR’ undeclared (first use in t

[Qemu-block] [PATCH v9 10/10] qemu-img: Convert with copy offloading

2018-06-01 Thread Fam Zheng
The new blk_co_copy_range interface offers a more efficient way in the case of network based storage. Make use of it to allow faster convert operation. Since copy offloading cannot do zero detection ('-S') and compression (-c), only try it when these options are not used. Signed-off-by: Fam Zheng

[Qemu-block] [PATCH v9 09/10] block-backend: Add blk_co_copy_range

2018-06-01 Thread Fam Zheng
It's a BlockBackend wrapper of the BDS interface. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/block-backend.c | 18 ++ include/sysemu/block-backend.h | 4 2 files changed, 22 insertions(+) diff --git a/block/block-backend.c b/block/block-backe

Re: [Qemu-block] [PATCH v8 01/11] docker: Update fedora image to 28

2018-06-01 Thread Stefan Hajnoczi
On Fri, Jun 01, 2018 at 02:28:39PM +0800, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > tests/docker/dockerfiles/fedora.docker | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Seems reasonable, Fedora is a cutting-edge distro. Unlike stable distros like CentOS and Debian where we a

[Qemu-block] [PATCH v9 08/10] iscsi: Implement copy offloading

2018-06-01 Thread Fam Zheng
Issue EXTENDED COPY (LID1) command to implement the copy_range API. The parameter data construction code is modified from libiscsi's iscsi-dd.c. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/iscsi.c| 219 +++ include/scsi/consta

[Qemu-block] [PATCH v9 04/10] qcow2: Implement copy offloading

2018-06-01 Thread Fam Zheng
The two callbacks are implemented quite similarly to the read/write functions: bdrv_co_copy_range_from maps for read and calls into bs->file or bs->backing depending on the allocation status; bdrv_co_copy_range_to maps for write and calls into bs->file. Reviewed-by: Stefan Hajnoczi Signed-off-by:

[Qemu-block] [PATCH v9 07/10] iscsi: Create and use iscsi_co_wait_for_task

2018-06-01 Thread Fam Zheng
This loop is repeated a growing number times. Make a helper. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- block/iscsi.c | 54 --- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/block/iscsi.c b

[Qemu-block] [PATCH v9 06/10] iscsi: Query and save device designator when opening

2018-06-01 Thread Fam Zheng
The device designator data returned in INQUIRY command will be useful to fill in source/target fields during copy offloading. Do this when connecting to the target and save the data for later use. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/iscsi.c | 41 +

[Qemu-block] [PATCH v9 05/10] file-posix: Implement bdrv_co_copy_range

2018-06-01 Thread Fam Zheng
With copy_file_range(2), we can implement the bdrv_co_copy_range semantics. Signed-off-by: Fam Zheng --- block/file-posix.c | 98 +++-- configure | 17 +++ include/block/raw-aio.h | 10 - 3 files changed, 120 insertions(+), 5 deletio

[Qemu-block] [PATCH v9 02/10] raw: Check byte range uniformly

2018-06-01 Thread Fam Zheng
We don't verify the request range against s->size in the I/O callbacks except for raw_co_pwritev. This is inconsistent (especially for raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them, in the meanwhile make the helper reusable by the coming new callbacks. Note that in most cases the block la

[Qemu-block] [PATCH v9 03/10] raw: Implement copy offloading

2018-06-01 Thread Fam Zheng
Just pass down to ->file. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/raw-format.c | 32 1 file changed, 32 insertions(+) diff --git a/block/raw-format.c b/block/raw-format.c index b69a0674b3..f2e468df6f 100644 --- a/block/raw-format.c +++ b

[Qemu-block] [PATCH v9 00/10] qemu-img convert with copy offloading

2018-06-01 Thread Fam Zheng
v9: Don't break older libiscsi. [patchew] v8: Fix compiling against new glibc and libiscsi on Fedora 28 where v7 had conflict definitions. [Stefan, myself] - Add HAVE_COPY_FILE_RANGE in configure. - Drop IDENT_DESCR_TGT_DESCR from scsi constants header. v7: Fix qcow2. v6: Pick up rev

[Qemu-block] [PATCH v9 01/10] block: Introduce API for copy offloading

2018-06-01 Thread Fam Zheng
Introduce the bdrv_co_copy_range() API for copy offloading. Block drivers implementing this API support efficient copy operations that avoid reading each block from the source device and writing it to the destination devices. Examples of copy offload primitives are SCSI EXTENDED COPY and Linux co

Re: [Qemu-block] [Qemu-devel] [PATCH v8 00/11] qemu-img convert with copy offloading

2018-06-01 Thread Fam Zheng
On Thu, 05/31 23:45, no-re...@patchew.org wrote: > Hi, > > This series failed build test on s390x host. Please find the details below. > > Type: series > Message-id: 20180601062849.28641-1-f...@redhat.com > Subject: [Qemu-devel] [PATCH v8 00/11] qemu-img convert with copy offloading > > === TEST

[Qemu-block] [PATCH] file-posix: Consolidate the locking error message

2018-06-01 Thread Fam Zheng
When hot-plugging a block device fails due to image locking errors, users won't see the helpful 'Is another process using the image?' message in QMP because currently the error hint is not carried over there. Even though extending QMP to include hint is a conceivably easy task, Libvirt will need s

Re: [Qemu-block] [Qemu-devel] [PATCH v8 00/11] qemu-img convert with copy offloading

2018-06-01 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Type: series Message-id: 20180601062849.28641-1-f...@redhat.com Subject: [Qemu-devel] [PATCH v8 00/11] qemu-img convert with copy offloading === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked unde