Re: [Qemu-block] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-10-25 Thread Peter Lieven
Am 25.10.2016 um 14:09 schrieb Paolo Bonzini: On 25/10/2016 14:03, Peter Lieven wrote: Am 01.08.2016 um 11:22 schrieb Paolo Bonzini: On 28/07/2016 04:39, Eric Blake wrote: On 07/27/2016 01:25 AM, Fam Zheng wrote: On Thu, 07/21 13:34, Eric Blake wrote: +max_write_zeroes

Re: [Qemu-block] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-10-25 Thread Peter Lieven
Am 01.08.2016 um 11:22 schrieb Paolo Bonzini: On 28/07/2016 04:39, Eric Blake wrote: On 07/27/2016 01:25 AM, Fam Zheng wrote: On Thu, 07/21 13:34, Eric Blake wrote: +max_write_zeroes = max_write_zeroes / alignment * alignment; Not using QEMU_ALIGN_DOWN despite patch 3? Looks like I

Re: [Qemu-block] VMDK file unable to open in Qemu but ESXi

2016-09-27 Thread Peter Lieven
Am 27.09.2016 um 10:16 schrieb Kevin Wolf: Am 27.09.2016 um 04:02 hat Fam Zheng geschrieben: On Mon, 09/26 16:30, Peter Lieven wrote: So it looks like this file is not compliant to the specfication. Is it recognized and imported by VMware? Yes, VMware ESXi imports it flawlessly. The only

Re: [Qemu-block] VMDK file unable to open in Qemu but ESXi

2016-09-26 Thread Peter Lieven
Am 26.09.2016 um 13:34 schrieb Fam Zheng: On Mon, 09/26 12:56, Peter Lieven wrote: Hi, i have a VMDK file for a Cisco Prime software appliance that I cannot open in Qemu, Virtualbox or any other tool except for ESXi. Qemu exits with an invalid footer message. At the expected position

[Qemu-block] VMDK file unable to open in Qemu but ESXi

2016-09-26 Thread Peter Lieven
Hi, i have a VMDK file for a Cisco Prime software appliance that I cannot open in Qemu, Virtualbox or any other tool except for ESXi. Qemu exits with an invalid footer message. At the expected position and also at the end of the file seems to be no footer. The VMDK has a -flex in the

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

2016-09-16 Thread Peter Lieven
6f712b (pid=52939) /basic/order:FAIL GTester: last random seed: R02S4261fe2d21feaee583cdd9f2a2433f5a (pid=52940) FAIL: tests/test-coroutine Peter (Lieven), this is yours. I'll drop the coroutine series from the pull request and send a v2

[Qemu-block] Quobyte Support in Qemu?

2016-08-23 Thread Peter Lieven
Hi, we at KAMP are currently looking into Quobyte Software Storage to extend our capacity. As they are going to release a POSIX compliant AIO API soon I wonder how the policy would be to include a native driver for a proprietary software into Qemu? Thanks, Peter

[Qemu-block] [PATCH V5 2/2] block/iscsi: allow caching of the allocation map

2016-07-18 Thread Peter Lieven
get_block_status for known to be unallocated blocks. Signed-off-by: Peter Lieven <p...@kamp.de> --- block/iscsi.c | 250 -- 1 file changed, 192 insertions(+), 58 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 22330e1..2

[Qemu-block] [PATCH V5 0/2] block/iscsi: allow caching of the allocation map

2016-07-18 Thread Peter Lieven
- free allocmap if allocation of allocmap_valid fails [Fam] - fix indent and whitespace errors [Fam] - account for cache mode changes on reopen Peter Lieven (2): block/iscsi: fix rounding in iscsi_allocationmap_set block/iscsi: allow caching of the allocation map b

[Qemu-block] [PATCH V5 1/2] block/iscsi: fix rounding in iscsi_allocationmap_set

2016-07-18 Thread Peter Lieven
;pbonz...@redhat.com> Signed-off-by: Peter Lieven <p...@kamp.de> --- block/iscsi.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index cf1e9e7..22330e1 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -432,12 +432,14 @@ static un

Re: [Qemu-block] [PATCH] block/iscsi: precache the allocation status of a target

2016-07-07 Thread Peter Lieven
Am 30.06.2016 um 17:59 schrieb Paolo Bonzini: On 30/06/2016 13:08, Peter Lieven wrote: this fills up the allocationmap at iscsi_open. This helps to reduce the number of get_block_status requests during runtime significantly. Signed-off-by: Peter Lieven <p...@kamp.de> --- block/iscsi.

[Qemu-block] [PATCH] block/iscsi: precache the allocation status of a target

2016-06-30 Thread Peter Lieven
this fills up the allocationmap at iscsi_open. This helps to reduce the number of get_block_status requests during runtime significantly. Signed-off-by: Peter Lieven <p...@kamp.de> --- block/iscsi.c | 16 1 file changed, 16 insertions(+) diff --git a/block/iscsi.c b

[Qemu-block] [PATCH V4] block/iscsi: allow caching of the allocation map

2016-06-30 Thread Peter Lieven
get_block_status for known to be unallocated blocks. Signed-off-by: Peter Lieven <p...@kamp.de> --- v3->v4: - added comment to iscsi_allocmap_set_unallocated [Paolo] - rebased to current master v2->v3: - fix wording errors [Fam] - reinit allocmap only if allocma

Re: [Qemu-block] [PATCH] iscsi: fix assertion in is_sector_request_lun_aligned

2016-06-23 Thread Peter Lieven
Am 23.06.2016 um 17:50 schrieb Paolo Bonzini: On 20/06/2016 11:24, Peter Lieven wrote: Commit 94d047a added an assertion the the request alignment check. This introduced 2 issues: a) A off-by-one error since a request of BDRV_REQUEST_MAX_SECTORS is actually allowed. b

[Qemu-block] [PATCH] iscsi: fix assertion in is_sector_request_lun_aligned

2016-06-20 Thread Peter Lieven
sectors which triggers the assertion. Fixes: 94d047a35bf663e28f8fef137544d8ea78165add Signed-off-by: Peter Lieven <p...@kamp.de> --- block/iscsi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 7e78ade..9bb5ff6 100644 --- a/block/i

Re: [Qemu-block] [Qemu-devel] [PATCH V3] block/iscsi: allow caching of the allocation map

2016-06-10 Thread Peter Lieven
Am 30.05.2016 um 08:33 schrieb Peter Lieven: > Am 25.05.2016 um 01:10 schrieb Eric Blake: >> On 05/24/2016 02:40 AM, Peter Lieven wrote: >>> until now the allocation map was used only as a hint if a cluster >>> is allocated or not. If a block was not allocated (or

[Qemu-block] [PATCH] block: assert that bs->request_alignment is a power of 2

2016-05-30 Thread Peter Lieven
at least bdrv_co_preadv/pwritev expect this. Signed-off-by: Peter Lieven <p...@kamp.de> --- 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/block.c @@ -1018,7 +1018,7 @@ static int bdrv_open_

[Qemu-block] [PATCH] block/nfs: Implement .bdrv_co_preadv/pwritev interfaces

2016-05-30 Thread Peter Lieven
the libnfs read and write functions already take byte arguments so thats an easy change. Signed-off-by: Peter Lieven <p...@kamp.de> --- block/nfs.c | 40 +++- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/block/nfs.c b/block/nfs.c

[Qemu-block] [PATCH V3] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Peter Lieven
in a read-modify-write cycle a small request might cause head and tail to fall into the same aligned block. Currently QEMU reads the same block twice in this case which is not necessary. Signed-off-by: Peter Lieven <p...@kamp.de> --- v1->v2: following Paolos suggestions to

Re: [Qemu-block] [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Peter Lieven
Am 30.05.2016 um 12:06 schrieb Kevin Wolf: Am 30.05.2016 um 11:53 hat Peter Lieven geschrieben: Am 30.05.2016 um 11:47 schrieb Kevin Wolf: Am 30.05.2016 um 11:30 hat Peter Lieven geschrieben: Am 30.05.2016 um 10:24 schrieb Kevin Wolf: Am 30.05.2016 um 08:25 hat Peter Lieven geschrieben: Am

Re: [Qemu-block] [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Peter Lieven
Am 30.05.2016 um 11:47 schrieb Kevin Wolf: Am 30.05.2016 um 11:30 hat Peter Lieven geschrieben: Am 30.05.2016 um 10:24 schrieb Kevin Wolf: Am 30.05.2016 um 08:25 hat Peter Lieven geschrieben: Am 27.05.2016 um 10:55 schrieb Kevin Wolf: Am 27.05.2016 um 02:36 hat Fam Zheng geschrieben: On Thu

Re: [Qemu-block] [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Peter Lieven
Am 30.05.2016 um 10:24 schrieb Kevin Wolf: Am 30.05.2016 um 08:25 hat Peter Lieven geschrieben: Am 27.05.2016 um 10:55 schrieb Kevin Wolf: Am 27.05.2016 um 02:36 hat Fam Zheng geschrieben: On Thu, 05/26 11:20, Paolo Bonzini wrote: On 26/05/2016 10:30, Fam Zheng wrote: This doesn't look too

Re: [Qemu-block] [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Peter Lieven
Am 27.05.2016 um 10:55 schrieb Kevin Wolf: Am 27.05.2016 um 02:36 hat Fam Zheng geschrieben: On Thu, 05/26 11:20, Paolo Bonzini wrote: On 26/05/2016 10:30, Fam Zheng wrote: This doesn't look too wrong... Should the right sequence of events be head/after_head or head/after_tail? It's

Re: [Qemu-block] Overflow in Virtio-BLK and SCSI Requests?

2016-05-30 Thread Peter Lieven
Am 27.05.2016 um 23:22 schrieb Stefan Hajnoczi: On Fri, May 20, 2016 at 11:27:02AM +0200, Peter Lieven wrote: while working at the iSCSI code in Qemu I came across the following line in iscsi_aio_ioctl memcpy(>task->cdb[0], acb->ioh->cmdp, acb->ioh->cmd_len); Is there

[Qemu-block] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-24 Thread Peter Lieven
in a read-modify-write cycle a small request might cause head and tail to fall into the same aligned block. Currently QEMU reads the same block twice in this case which is not necessary. Signed-off-by: Peter Lieven <p...@kamp.de> --- v1->v2: following Paolos suggestions to

Re: [Qemu-block] [PATCH] block/io: optimize bdrv_co_pwritev for small requests

2016-05-24 Thread Peter Lieven
Am 24.05.2016 um 15:59 schrieb Paolo Bonzini: On 24/05/2016 15:39, Peter Lieven wrote: bytes += offset & (align - 1); offset = offset & ~(align - 1); Because the low bits have been masked away from offset and added to bytes, + +/* if head and t

[Qemu-block] [PATCH] block/io: optimize bdrv_co_pwritev for small requests

2016-05-24 Thread Peter Lieven
in a read-modify-write cycle a small request might cause head and tail to fall into the same alignment. Currently QEMU reads the same block twice in this case which is not necessary. Signed-off-by: Peter Lieven <p...@kamp.de> --- block/io.c | 12 1 file changed, 12 inse

[Qemu-block] [PATCH] block/iscsi: avoid potential overflow of acb->task->cdb

2016-05-24 Thread Peter Lieven
at least in the path via virtio-blk the maximum size is not restricted. Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven <p...@kamp.de> --- block/iscsi.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 2ca8e72..e7d5f7b 100644 --- a

[Qemu-block] [PATCH V3] block/iscsi: allow caching of the allocation map

2016-05-24 Thread Peter Lieven
get_block_status for known to be unallocated blocks. Signed-off-by: Peter Lieven <p...@kamp.de> --- v2->v3: - fix wording errors [Fam] - reinit allocmap only if allocmap is present in bdrv_reopen_commit v1->v2: - add more comments [Fam] - free allocmap i

[Qemu-block] [PATCH V2] block/iscsi: allow caching of the allocation map

2016-05-20 Thread Peter Lieven
get_block_status for known to be unallocated blocks. Signed-off-by: Peter Lieven <p...@kamp.de> --- v1->v2: - add more comments [Fam] - free allocmap if allocation of allocmap_valid fails [Fam] - fix indent and whitespace errors [Fam] - account for cache mode changes

[Qemu-block] Overflow in Virtio-BLK and SCSI Requests?

2016-05-20 Thread Peter Lieven
Hi, while working at the iSCSI code in Qemu I came across the following line in iscsi_aio_ioctl memcpy(>task->cdb[0], acb->ioh->cmdp, acb->ioh->cmd_len); Is there anything to ensure that the cmd_len is valid when the requests is e.g. coming in via virtio_blk_handle_scsi ? It seems that

[Qemu-block] [PATCH V2 0/2] block/nfs: add support for libnfs pagecache

2016-05-19 Thread Peter Lieven
this adds support for the upcoming libnfs cachepage to Qemu. While at it neglect to use readahead if cache.direct is on. v1->v2: - move the readahead fix to Patch 1 and CC qemu-stable - check for changed cache settings in bdrv_reopen_prepare [Jeff] Peter Lieven (2): block/nfs: ref

[Qemu-block] [PATCH V2 2/2] block/nfs: add support for libnfs pagecache

2016-05-19 Thread Peter Lieven
in libnfs is always the NFS_BLKSIZE which is 4KB. Signed-off-by: Peter Lieven <p...@kamp.de> --- block/nfs.c | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/block/nfs.c b/block/nfs.c index 60be45e..15d6832 100644 --- a/block/nfs.c +++ b

[Qemu-block] [PATCH V2 1/2] block/nfs: refuse readahead if cache.direct is on

2016-05-19 Thread Peter Lieven
if we open a NFS export with disabled cache we should refuse the readahead feature as it will cache data inside libnfs. If a export was opened with readahead enabled it should futher not be allowed to disable the cache while running. Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven &l

Re: [Qemu-block] [Qemu-devel] [PATCH] block/iscsi: allow caching of the allocation map

2016-05-19 Thread Peter Lieven
Am 18.05.2016 um 09:41 schrieb Fam Zheng: On Tue, 05/17 15:59, Peter Lieven wrote: until now the allocation map was used only as a hint if a cluster is allocated or not. If a block was not allocated (or Qemu had no info about the allocation status) a get_block_status call was issued to check

Re: [Qemu-block] [PATCH 2/2] block/nfs: refuse readahead if cache.direct is on

2016-05-19 Thread Peter Lieven
Am 18.05.2016 um 15:28 schrieb Jeff Cody: On Tue, May 17, 2016 at 04:11:55PM +0200, Peter Lieven wrote: Signed-off-by: Peter Lieven <p...@kamp.de> --- block/nfs.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block/nfs.c b/block/nfs.c index 975510f..8b73a35 100644 --- a

Re: [Qemu-block] [PATCH for-2.6] block: add an 'iscsi-id' value to match -drive with -iscsi opts

2016-04-22 Thread Peter Lieven
Am 22.04.2016 um 12:59 schrieb Kevin Wolf: > Am 22.04.2016 um 12:24 hat Daniel P. Berrange geschrieben: >> The iSCSI block driver has ability to lookup various options, in >> particular authentication info, specified by the separate -iscsi >> argument. It currently uses the iSCSI IQN as the ID

Re: [Qemu-block] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Peter Lieven
Am 24.02.2016 um 14:07 schrieb Kevin Wolf: > Am 24.02.2016 um 13:44 hat Peter Lieven geschrieben: >> if the size is forced I would set the chs values to max. this way no >> new creator String is needed and it is even backwards compatible. this >> is what disk2vhd doe

Re: [Qemu-block] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Peter Lieven
Am 24.02.2016 um 14:40 schrieb Jeff Cody: > On Wed, Feb 24, 2016 at 02:07:18PM +0100, Kevin Wolf wrote: >> Am 24.02.2016 um 13:44 hat Peter Lieven geschrieben: >>> if the size is forced I would set the chs values to max. this way no >>> new creator String is need

Re: [Qemu-block] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create

2016-02-24 Thread Peter Lieven
if the size is forced I would set the chs values to max. this way no new creator String is needed and it is even backwards compatible. this is what disk2vhd does. Peter > Am 24.02.2016 um 13:24 schrieb Jeff Cody : > >> On Wed, Feb 24, 2016 at 11:19:37AM +0100, Kevin Wolf

Re: [Qemu-block] [PATCH V5] block/nfs: add support for setting debug level

2016-01-11 Thread Peter Lieven
Am 13.11.2015 um 10:45 schrieb Stefan Hajnoczi: > On Mon, Nov 09, 2015 at 08:09:33AM +0100, Peter Lieven wrote: >> recent libnfs versions support logging debug messages. Add >> support for it in qemu through an URL parameter. >> >> Example: >> qemu -cdrom n

Re: [Qemu-block] [Qemu-devel] [PATCH] send readcapacity10 when readcapacity16 failed

2016-01-11 Thread Peter Lieven
Am 07.01.2016 um 11:07 schrieb Paolo Bonzini: > > On 06/01/2016 18:57, John Snow wrote: >> Ronnie: Thanks for the explanation! >> >> Zhu: In light of this, can the patch be reworked slightly to explicitly >> check *why* READCAPACITY16 failed and only attempt the READCAPACITY10 as >> a fallback if

Re: [Qemu-block] [PATCH] fix:readcapacity 10 failure shown even 16 sent

2015-12-10 Thread Peter Lieven
Am 10.12.2015 um 09:55 schrieb Paolo Bonzini: On 10/12/2015 03:59, Zhu Lingshan wrote: -if (task == NULL || task->status != SCSI_STATUS_GOOD) { +if ((rc16 != NULL) && ((task == NULL) || (task->status != SCSI_STATUS_GOOD))) { +error_setg(errp, "iSCSI: failed to send

[Qemu-block] [PATCH] tests: fix cdrom_pio_impl in ide-test

2015-11-20 Thread Peter Lieven
that transfers the data. Signed-off-by: Peter Lieven <p...@kamp.de> --- tests/ide-test.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/ide-test.c b/tests/ide-test.c index d1014bb..fc1ce52 100644 --- a/tests/ide-test.c +++ b/tests/ide-test.c @@ -

Re: [Qemu-block] [Qemu-devel] [PATCH V4 0/6] ide: avoid main-loop hang on CDROM/NFS failure

2015-11-16 Thread Peter Lieven
Am 16.11.2015 um 07:17 schrieb Fam Zheng: On Fri, 11/13 17:44, John Snow wrote: On 11/12/2015 11:30 AM, Peter Lieven wrote: This series aims at avoiding a hanging main-loop if a vserver has a CDROM image mounted from a NFS share and that NFS share goes down. Typical situation is that users

Re: [Qemu-block] [PATCH V5] block/nfs: add support for setting debug level

2015-11-13 Thread Peter Lieven
Am 13.11.2015 um 10:45 schrieb Stefan Hajnoczi: > On Mon, Nov 09, 2015 at 08:09:33AM +0100, Peter Lieven wrote: >> recent libnfs versions support logging debug messages. Add >> support for it in qemu through an URL parameter. >> >> Example: >> qemu -cdrom n

Re: [Qemu-block] [Qemu-devel] [PATCH V4 1/6] ide/atapi: make PIO read requests async

2015-11-13 Thread Peter Lieven
> Am 13.11.2015 um 23:42 schrieb John Snow <js...@redhat.com>: > > > >> On 11/12/2015 11:30 AM, Peter Lieven wrote: >> PIO read requests on the ATAPI interface used to be sync blk requests. >> This has two significant drawbacks. First the main loop hangs

Re: [Qemu-block] [Qemu-devel] [PATCH V3 4/6] ide: orphan all buffered requests on DMA cancel

2015-11-12 Thread Peter Lieven
Am 12.11.2015 um 09:27 schrieb Fam Zheng: On Fri, 11/06 09:42, Peter Lieven wrote: If the guests canceles a DMA request we can prematurely invoke all callbacks of buffered requests and flag all them as orphaned. Ideally this avoids the need for draining all requests. For CDROM devices

Re: [Qemu-block] [Qemu-devel] [PATCH V3 3/6] ide: add support for IDEBufferedRequest

2015-11-12 Thread Peter Lieven
Am 12.11.2015 um 10:57 schrieb Fam Zheng: On Fri, 11/06 09:42, Peter Lieven wrote: +BlockAIOCB *ide_buffered_readv(IDEState *s, int64_t sector_num, + QEMUIOVector *iov, int nb_sectors, + BlockCompletionFunc *cb, void *opaque

Re: [Qemu-block] [Qemu-devel] [PATCH V3 5/6] ide: enable buffered requests for ATAPI devices

2015-11-12 Thread Peter Lieven
Am 12.11.2015 um 12:25 schrieb Fam Zheng: On Fri, 11/06 09:42, Peter Lieven wrote: Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/atapi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 29fd131..2f6d018

Re: [Qemu-block] [Qemu-devel] [PATCH V3 0/6] ide: avoid main-loop hang on CDROM/NFS failure

2015-11-12 Thread Peter Lieven
Am 12.11.2015 um 12:33 schrieb Fam Zheng: On Fri, 11/06 09:42, Peter Lieven wrote: This series aims at avoiding a hanging main-loop if a vserver has a CDROM image mounted from a NFS share and that NFS share goes down. Typical situation is that users mount an CDROM ISO to install something

[Qemu-block] [PATCH V4 0/6] ide: avoid main-loop hang on CDROM/NFS failure

2015-11-12 Thread Peter Lieven
improvement already. - Dropped Patch 5 because it is upstream meanwhile. Peter Lieven (6): ide/atapi: make PIO read requests async block: add blk_abort_aio_request ide: add support for IDEBufferedRequest ide: orphan all buffered requests on DMA cancel ide: enable buffe

[Qemu-block] [PATCH V4 2/6] block: add blk_abort_aio_request

2015-11-12 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- block/block-backend.c | 17 + include/sysemu/block-backend.h | 3 +++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 6f9309f..701234e 100644 --- a

[Qemu-block] [PATCH V4 4/6] ide: orphan all buffered requests on DMA cancel

2015-11-12 Thread Peter Lieven
If the guests canceles a DMA request we can prematurely invoke all callbacks of buffered requests and flag all them as orphaned. Ideally this avoids the need for draining all requests. For CDROM devices this works in 100% of all cases. Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide

[Qemu-block] [PATCH V4 6/6] ide: enable buffered requests for PIO read requests

2015-11-12 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 7ca67bc..b9b531c 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -677,8 +677,8 @@ static void ide_sector_read(IDESt

[Qemu-block] [PATCH V4 1/6] ide/atapi: make PIO read requests async

2015-11-12 Thread Peter Lieven
to possible race conditions requests during an ongoing elementary transfer are still sync. Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/atapi.c | 97 ++ 1 file changed, 85 insertions(+), 12 deletions(-) diff --git a/hw/ide/atapi.c b/

[Qemu-block] [PATCH V4 5/6] ide: enable buffered requests for ATAPI devices

2015-11-12 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/atapi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index cfd2d63..d1eaa29 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -190,8 +190,8 @@ static int cd_read_

[Qemu-block] [PATCH V4 3/6] ide: add support for IDEBufferedRequest

2015-11-12 Thread Peter Lieven
written to the storage. Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/core.c | 47 +++ hw/ide/internal.h | 14 ++ 2 files changed, 61 insertions(+) diff --git a/hw/ide/core.c b/hw/ide/core.c index 364ba21..7ca67bc 100644 --

[Qemu-block] [PATCH V3 2/6] block: add blk_abort_aio_request

2015-11-06 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- block/block-backend.c | 17 + include/sysemu/block-backend.h | 3 +++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 19fdaae..b13dc4e 100644 --- a

[Qemu-block] [PATCH V3 6/6] ide: enable buffered requests for PIO read requests

2015-11-06 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 53f9c2c..d1feae2 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -676,8 +676,8 @@ static void ide_sector_read(IDESt

[Qemu-block] [PATCH V3 4/6] ide: orphan all buffered requests on DMA cancel

2015-11-06 Thread Peter Lieven
If the guests canceles a DMA request we can prematurely invoke all callbacks of buffered requests and flag all them as orphaned. Ideally this avoids the need for draining all requests. For CDROM devices this works in 100% of all cases. Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide

[Qemu-block] [PATCH V3 0/6] ide: avoid main-loop hang on CDROM/NFS failure

2015-11-06 Thread Peter Lieven
. So I would like to start with this version as it is a big improvement already. - Dropped Patch 5 because it is upstream meanwhile. Peter Lieven (6): ide/atapi: make PIO read requests async block: add blk_abort_aio_request ide: add support for IDEBufferedRequest

[Qemu-block] [PATCH V3 1/6] ide/atapi: make PIO read requests async

2015-11-06 Thread Peter Lieven
to possible race conditions requests during an ongoing elementary transfer are still sync. Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/atapi.c | 97 ++ 1 file changed, 85 insertions(+), 12 deletions(-) diff --git a/hw/ide/atapi.c b/

[Qemu-block] [PATCH V3 5/6] ide: enable buffered requests for ATAPI devices

2015-11-06 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/atapi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 29fd131..2f6d018 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -190,8 +190,8 @@ static int cd_read_

[Qemu-block] [PATCH V3 3/6] ide: add support for IDEBufferedRequest

2015-11-06 Thread Peter Lieven
written to the storage. Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/core.c | 46 ++ hw/ide/internal.h | 14 ++ 2 files changed, 60 insertions(+) diff --git a/hw/ide/core.c b/hw/ide/core.c index 364ba21..53f9c2c 100644 --

Re: [Qemu-block] [PATCH V4] block/nfs: add support for setting debug level

2015-11-06 Thread Peter Lieven
Am 06.11.2015 um 12:23 schrieb Stefan Hajnoczi: > On Thu, Nov 05, 2015 at 11:25:34PM +0100, Peter Lieven wrote: >> recent libnfs versions support logging debug messages. Add >> support for it in qemu through an URL parameter. >> >> Example: >> qemu -cdrom n

[Qemu-block] [PATCH V4] block/nfs: add support for setting debug level

2015-11-05 Thread Peter Lieven
recent libnfs versions support logging debug messages. Add support for it in qemu through an URL parameter. Example: qemu -cdrom nfs://127.0.0.1/iso/my.iso?debug=2 --- v3->v4: revert to the initial version, but limit max debug level v2->v3: use a per-drive option instead of a global one.

Re: [Qemu-block] [PATCH v3] iscsi: Translate scsi sense into error code

2015-11-05 Thread Peter Lieven
} > > acb->ioh->driver_status = 0; > @@ -905,7 +952,7 @@ retry: > } > > if (iTask.status != SCSI_STATUS_GOOD) { > -return -EIO; > +return iTask.err_code; > } > > iscsi_allocationmap_clear(iscsilun, sector_num, nb_sectors); > @@ -999,7 +1046,7 @@ retry: > } > > if (iTask.status != SCSI_STATUS_GOOD) { > -return -EIO; > +return iTask.err_code; > } > > if (flags & BDRV_REQ_MAY_UNMAP) { Reviewed-by: Peter Lieven <p...@kamp.de>

Re: [Qemu-block] [PATCH v2] iscsi: Translate scsi sense into error code

2015-11-04 Thread Peter Lieven
Am 04.11.2015 um 02:36 schrieb Fam Zheng: > Previously we return -EIO blindly when anything goes wrong. Add a helper > function to parse sense fields and try to make the return code more > meaningful. > > This also fixes the default werror configuration (enospc) when we're > using qcow2 on an

Re: [Qemu-block] [Qemu-devel] [PATCH 1/4] ide/atapi: make PIO read requests async

2015-11-02 Thread Peter Lieven
Am 03.11.2015 um 01:48 schrieb John Snow: On 10/12/2015 08:27 AM, Peter Lieven wrote: PIO read requests on the ATAPI interface used to be sync blk requests. This has two significant drawbacks. First the main loop hangs util an I/O request is completed and secondly if the I/O request does

Re: [Qemu-block] [PATCH 3/4] ide: add support for cancelable read requests

2015-10-28 Thread Peter Lieven
Am 28.10.2015 um 12:26 schrieb Stefan Hajnoczi: > On Tue, Oct 27, 2015 at 11:58:55AM +0100, Peter Lieven wrote: >> Am 26.10.2015 um 11:39 schrieb Stefan Hajnoczi: >>> On Mon, Oct 12, 2015 at 02:27:24PM +0200, Peter Lieven wrote: >>>> +BlockAIOCB *ide_readv_c

Re: [Qemu-block] [PATCH 3/4] ide: add support for cancelable read requests

2015-10-27 Thread Peter Lieven
Am 26.10.2015 um 11:39 schrieb Stefan Hajnoczi: On Mon, Oct 12, 2015 at 02:27:24PM +0200, Peter Lieven wrote: this patch adds a new aio readv compatible function which copies all data through a bounce buffer. The benefit is that these requests can be flagged as canceled to avoid guest memory

Re: [Qemu-block] [PATCH] block/nfs: add support for setting debug level

2015-10-26 Thread Peter Lieven
Am 26.10.2015 um 11:45 schrieb Stefan Hajnoczi: On Thu, Oct 22, 2015 at 08:37:19AM +0200, Peter Lieven wrote: Am 22.09.2015 um 08:13 schrieb Peter Lieven: Am 25.06.2015 um 15:18 schrieb Stefan Hajnoczi: On Tue, Jun 23, 2015 at 10:12:15AM +0200, Peter Lieven wrote: upcoming libnfs versions

Re: [Qemu-block] [PATCH 1/4] ide/atapi: make PIO read requests async

2015-10-23 Thread Peter Lieven
Am 22.10.2015 um 18:17 schrieb Stefan Hajnoczi: > On Mon, Oct 12, 2015 at 02:27:22PM +0200, Peter Lieven wrote: >> @@ -129,9 +134,71 @@ static int cd_read_sector(IDEState *s, int lba, uint8_t >> *buf, int sector_size) >> ret = -EIO; >> break; >

Re: [Qemu-block] [PATCH 2/4] ide/atapi: blk_aio_readv may return NULL

2015-10-23 Thread Peter Lieven
Am 22.10.2015 um 18:20 schrieb Stefan Hajnoczi: > On Mon, Oct 12, 2015 at 02:27:23PM +0200, Peter Lieven wrote: >> Signed-off-by: Peter Lieven <p...@kamp.de> >> --- >> hw/ide/atapi.c | 4 >> 1 file changed, 4 insertions(+) >> >> diff --git a/hw/

Re: [Qemu-block] [PATCH] block/nfs: add support for setting debug level

2015-10-22 Thread Peter Lieven
Am 22.09.2015 um 08:13 schrieb Peter Lieven: Am 25.06.2015 um 15:18 schrieb Stefan Hajnoczi: On Tue, Jun 23, 2015 at 10:12:15AM +0200, Peter Lieven wrote: upcoming libnfs versions will support logging debug messages. Add support for it in qemu through an URL parameter. Signed-off-by: Peter

Re: [Qemu-block] [PATCH 1/2] iscsi: Translate scsi sense into error code

2015-10-22 Thread Peter Lieven
Am 22.10.2015 um 10:17 schrieb Fam Zheng: Previously we return -EIO blindly when anything goes wrong. Add a helper function to parse sense fields and try to make the return code more meaningful. Signed-off-by: Fam Zheng --- block/iscsi.c | 56

Re: [Qemu-block] [PATCH 0/2] Fix werror=enospc for qcow2 on iscsi

2015-10-22 Thread Peter Lieven
Am 22.10.2015 um 10:17 schrieb Fam Zheng: When qcow2 is created on iscsi target with a virtual size greater than physical capacity of the LUN, over time it's possible that guest fills too much data and at that point, new clusters in qcow2 will be allocated beyond the end of disk. Why would you

Re: [Qemu-block] [PATCH 1/2] iscsi: Translate scsi sense into error code

2015-10-22 Thread Peter Lieven
Am 22.10.2015 um 10:45 schrieb Paolo Bonzini: On 22/10/2015 10:31, Peter Lieven wrote: +switch (sense->key) { +case SCSI_SENSE_NO_SENSE: +return 0; +break; Isn't it dangerous to return 0 (no error) if the status is != SCSI_STATUS_GOOD? Peter

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-16 Thread Peter Lieven
Am 14.10.2015 um 20:21 schrieb John Snow: > > On 10/14/2015 02:19 PM, Peter Lieven wrote: >> Am 08.10.2015 um 18:44 schrieb John Snow: >>> On 10/08/2015 08:06 AM, Peter Lieven wrote: >>>> Hi all, >>>> >>>> short summary from my side. The

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-14 Thread Peter Lieven
Am 08.10.2015 um 18:44 schrieb John Snow: > > On 10/08/2015 08:06 AM, Peter Lieven wrote: >> Hi all, >> >> short summary from my side. The whole thing seems to get complicated, >> let me explain why: >> >> 1) During review I found that the code in ide_a

[Qemu-block] [PATCH 4/4] ide/atapi: enable cancelable requests

2015-10-12 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/atapi.c | 4 ++-- hw/ide/core.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index e0cf066..8d38b1d 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -187,7 +187,7 @@ stat

[Qemu-block] [PATCH 1/4] ide/atapi: make PIO read requests async

2015-10-12 Thread Peter Lieven
PIO read requests on the ATAPI interface used to be sync blk requests. This has two significant drawbacks. First the main loop hangs util an I/O request is completed and secondly if the I/O request does not complete (e.g. due to an unresponsive storage) Qemu hangs completely. Signed-off-by: Peter

[Qemu-block] [PATCH 2/4] ide/atapi: blk_aio_readv may return NULL

2015-10-12 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/atapi.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 2271ea2..e0cf066 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -429,6 +429,10 @@ static void ide_atapi_cmd_read_dma_cb(void *

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-08 Thread Peter Lieven
Hi all, short summary from my side. The whole thing seems to get complicated, let me explain why: 1) During review I found that the code in ide_atapi_cmd_reply_end can't work correctly if the byte_count_limit is not a divider or a multiple of cd_sector_size. The reason is that as soon as we

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-07 Thread Peter Lieven
Am 07.10.2015 um 18:42 schrieb John Snow: > > On 10/06/2015 04:46 AM, Peter Lieven wrote: >> Am 05.10.2015 um 23:15 schrieb John Snow: >>> On 09/21/2015 08:25 AM, Peter Lieven wrote: >>>> PIO read requests on the ATAPI interface used to be sync blk requests. >&g

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-06 Thread Peter Lieven
Am 05.10.2015 um 23:15 schrieb John Snow: On 09/21/2015 08:25 AM, Peter Lieven wrote: PIO read requests on the ATAPI interface used to be sync blk requests. This has to siginificant drawbacks. First the main loop hangs util an I/O request is completed and secondly if the I/O request does

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-06 Thread Peter Lieven
Am 06.10.2015 um 10:57 schrieb Kevin Wolf: Am 05.10.2015 um 23:15 hat John Snow geschrieben: On 09/21/2015 08:25 AM, Peter Lieven wrote: PIO read requests on the ATAPI interface used to be sync blk requests. This has to siginificant drawbacks. First the main loop hangs util an I/O request

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-06 Thread Peter Lieven
Am 06.10.2015 um 19:56 schrieb John Snow: > > On 10/06/2015 01:12 PM, Peter Lieven wrote: >>> Am 06.10.2015 um 19:07 schrieb John Snow <js...@redhat.com>: >>> >>> >>> >>>> On 10/06/2015 05:20 AM, Peter Lieven wrote: >>>>>

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-06 Thread Peter Lieven
Am 06.10.2015 um 10:46 schrieb Peter Lieven: Am 05.10.2015 um 23:15 schrieb John Snow: On 09/21/2015 08:25 AM, Peter Lieven wrote: PIO read requests on the ATAPI interface used to be sync blk requests. This has to siginificant drawbacks. First the main loop hangs util an I/O request

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-06 Thread Peter Lieven
> Am 06.10.2015 um 19:07 schrieb John Snow <js...@redhat.com>: > > > >> On 10/06/2015 05:20 AM, Peter Lieven wrote: >>> Am 06.10.2015 um 10:57 schrieb Kevin Wolf: >>> Am 05.10.2015 um 23:15 hat John Snow geschrieben: >>>> >>&

Re: [Qemu-block] [PATCH] block/nfs: add support for setting debug level

2015-09-22 Thread Peter Lieven
Am 25.06.2015 um 15:18 schrieb Stefan Hajnoczi: On Tue, Jun 23, 2015 at 10:12:15AM +0200, Peter Lieven wrote: upcoming libnfs versions will support logging debug messages. Add support for it in qemu through an URL parameter. Signed-off-by: Peter Lieven <p...@kamp.de> --- block/nfs

[Qemu-block] [PATCH 0/5] ide: avoid main-loop hang on CDROM/NFS failure

2015-09-21 Thread Peter Lieven
included for completeness. Peter Peter Lieven (5): ide/atapi: make PIO read requests async ide/atapi: blk_aio_readv may return NULL ide: add support for cancelable read requests ide/atapi: enable cancelable requests block/nfs: cache allocated filesize for read-only files block/nfs.c

[Qemu-block] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-09-21 Thread Peter Lieven
PIO read requests on the ATAPI interface used to be sync blk requests. This has to siginificant drawbacks. First the main loop hangs util an I/O request is completed and secondly if the I/O request does not complete (e.g. due to an unresponsive storage) Qemu hangs completely. Signed-off-by: Peter

[Qemu-block] [PATCH 2/5] ide/atapi: blk_aio_readv may return NULL

2015-09-21 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/atapi.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 9257e1c..b209ed9 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -371,6 +371,10 @@ static void ide_atapi_cmd_read_dma_cb(void *

[Qemu-block] [PATCH 3/5] ide: add support for cancelable read requests

2015-09-21 Thread Peter Lieven
this logic for read-only devices. Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/core.c | 54 ++ hw/ide/internal.h | 16 hw/ide/pci.c | 42 -- 3 files changed, 98 inse

[Qemu-block] [PATCH 4/5] ide/atapi: enable cancelable requests

2015-09-21 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- hw/ide/atapi.c | 4 ++-- hw/ide/core.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index b209ed9..ab45495 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -141,7 +141,7 @@ stat

[Qemu-block] [PATCH 5/5] block/nfs: cache allocated filesize for read-only files

2015-09-21 Thread Peter Lieven
If the file is readonly its not expected to grow so save the blocking call to nfs_fstat_async and use the value saved at connection time. Also important the monitor (and thus the main loop) will not hang if block device info is queried and the NFS share is unresponsive. Signed-off-by: Peter

Re: [Qemu-block] [Qemu-devel] [PATCH 0/5] ide: avoid main-loop hang on CDROM/NFS failure

2015-09-21 Thread Peter Lieven
> Am 21.09.2015 um 22:58 schrieb John Snow <js...@redhat.com>: > > > >> On 09/21/2015 08:25 AM, Peter Lieven wrote: >> This series aims at avoiding a hanging main-loop if a vserver has a >> CDROM image mounted from a NFS share and that NFS share goes down

Re: [Qemu-block] [Qemu-devel] [PATCH] iscsi: Add chap and "initiator-name" etc as per drive options

2015-09-14 Thread Peter Lieven
> Am 14.09.2015 um 08:38 schrieb Fam Zheng : > >> On Fri, 09/11 08:27, ronnie sahlberg wrote: >>> On Fri, Sep 11, 2015 at 8:20 AM, Eric Blake wrote: On 09/11/2015 12:00 AM, Fam Zheng wrote: Previously we use "-iscsi

<    1   2   3   4   5   6   >