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

2015-11-06 Thread Kevin Wolf
Am 05.11.2015 um 20:01 hat Peter Maydell geschrieben: > On 5 November 2015 at 18:17, Kevin Wolf wrote: > > The following changes since commit 8835b9df3bddf332c883c861d6a1defc12c4ebe9: > > > > Merge remote-tracking branch > > 'remotes/mdroth/tags/qga-pull-2015-11-04-tag' into

[Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-06 Thread Fam Zheng
The "pnum < nb_sectors" condition in deciding whether to actually copy data is unnecessarily strict, and the qiov initialization is unnecessarily too, for both bdrv_aio_write_zeroes and bdrv_aio_discard branches. Reorganize mirror_iteration flow so that we: 1) Find the contiguous

Re: [Qemu-block] [PATCH] virtio-blk: trivial code optimization

2015-11-06 Thread Stefan Hajnoczi
On Fri, Nov 06, 2015 at 09:04:57AM +0800, arei.gong...@huawei.com wrote: > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > index 093e475..752586d 100644 > --- a/hw/block/virtio-blk.c > +++ b/hw/block/virtio-blk.c > @@ -409,18 +409,20 @@ void virtio_blk_submit_multireq(BlockBackend

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

2015-11-06 Thread Peter Lieven
Signed-off-by: Peter Lieven --- 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 ---

[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 --- 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(IDEState *s)

Re: [Qemu-block] [PATCH v4 0/3] qemu-io: clean up cvtnum usage

2015-11-06 Thread Kevin Wolf
Am 06.11.2015 um 00:53 hat John Snow geschrieben: > cvtnum returns an int64_t, not an int, so correct the lvalue types > wherever it is used. While we're at it, make the error messages more > meaningful and hopefully less confusing. > > v4: > - Now missing ALL sweaters > > v3: > - pulled a lot

[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 --- hw/ide/pci.c

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

2015-11-06 Thread Peter Lieven
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 and then forget to eject that CDROM afterwards. As a consequence this mounted CD is able to

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

2015-11-06 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. Note: Due to

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

2015-11-06 Thread Peter Lieven
Signed-off-by: Peter Lieven --- 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

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

2015-11-06 Thread Peter Lieven
this patch adds a new aio readv compatible function which copies all data through a bounce buffer. These buffered requests can be flagged as orphaned which means that their original callback has already been invoked and the request has just not been completed by the backend storage. The bounce

Re: [Qemu-block] [PATCH v6 03/15] block: Release dirty bitmaps in bdrv_close()

2015-11-06 Thread John Snow
On 11/04/2015 01:57 PM, Max Reitz wrote: > bdrv_delete() is not very happy about deleting BlockDriverStates with > dirty bitmaps still attached to them. In the past, we got around that > very easily by relying on bdrv_close_all() bypassing bdrv_delete(), and > bdrv_close() simply ignoring that

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

2015-11-06 Thread Max Reitz
On 06.11.2015 09:17, Kevin Wolf wrote: > Am 05.11.2015 um 20:01 hat Peter Maydell geschrieben: >> On 5 November 2015 at 18:17, Kevin Wolf wrote: >>> The following changes since commit 8835b9df3bddf332c883c861d6a1defc12c4ebe9: >>> >>> Merge remote-tracking branch >>>

[Qemu-block] [PATCH v9 00/15] blockdev: BlockBackend and media

2015-11-06 Thread Max Reitz
Patch 11 of the last series broke the OS X build due to ui/cocoa.m directly referencing qmp_change_blockdev() (which was an internal function not directly mapped to any QMP command before, now it becomes an "external" function and is renamed qmp_blockdev_change_medium()). This v9 consists only of

[Qemu-block] [PATCH v9 11/15] qmp: Introduce blockdev-change-medium

2015-11-06 Thread Max Reitz
Introduce a new QMP command 'blockdev-change-medium' which is intended to replace the 'change' command for block devices. The existing function qmp_change_blockdev() is accordingly renamed to qmp_blockdev_change_medium(). Signed-off-by: Max Reitz --- blockdev.c

Re: [Qemu-block] [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-06 Thread Eduardo Habkost
As this patch affects raw_getlength(), CCing the raw block driver maintainer and the qemu-block mailing list. On Mon, Nov 02, 2015 at 05:13:14PM +0800, Xiao Guangrong wrote: > lseek can not work for all block devices as the man page says: > | Some devices are incapable of seeking and POSIX does

Re: [Qemu-block] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-06 Thread Eduardo Habkost
As this patch affects raw_getlength(), CCing the raw block driver maintainer and the qemu-block mailing list. On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: > It is used to get the size of the specified file, also qemu_fd_getlength() > is introduced to unify the code with

Re: [Qemu-block] [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-06 Thread Eduardo Habkost
On Mon, Nov 02, 2015 at 05:13:14PM +0800, Xiao Guangrong wrote: > lseek can not work for all block devices as the man page says: > | Some devices are incapable of seeking and POSIX does not specify > | which devices must support lseek(). > > This patch tries to add the support on Linux by using

Re: [Qemu-block] [Qemu-devel] [PATCH v10 12/14] block: add transactional properties

2015-11-06 Thread Stefan Hajnoczi
On Fri, Nov 06, 2015 at 09:32:19AM +0100, Kevin Wolf wrote: > Am 05.11.2015 um 19:52 hat John Snow geschrieben: > > > > > > On 11/05/2015 05:47 AM, Stefan Hajnoczi wrote: > > > On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote: > > >> > > >> > > >> On 11/03/2015 10:17 AM, Stefan Hajnoczi

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 nfs://127.0.0.1/iso/my.iso?debug=2 >> ---

Re: [Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-06 Thread Max Reitz
On 06.11.2015 11:22, Fam Zheng wrote: > The "pnum < nb_sectors" condition in deciding whether to actually copy > data is unnecessarily strict, and the qiov initialization is > unnecessarily too, for both bdrv_aio_write_zeroes and bdrv_aio_discard > branches. > > Reorganize mirror_iteration flow

Re: [Qemu-block] [Qemu-devel] [PATCH v10 12/14] block: add transactional properties

2015-11-06 Thread John Snow
On 11/06/2015 03:32 AM, Kevin Wolf wrote: > Am 05.11.2015 um 19:52 hat John Snow geschrieben: >> >> >> On 11/05/2015 05:47 AM, Stefan Hajnoczi wrote: >>> On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote: On 11/03/2015 10:17 AM, Stefan Hajnoczi wrote: > On Fri, Oct 23,

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

2015-11-06 Thread 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 nfs://127.0.0.1/iso/my.iso?debug=2 > --- > v3->v4: revert to the initial version, but limit max

[Qemu-block] BlockDeviceInfo's backing_file and ImageInfo's backing-filename

2015-11-06 Thread Alberto Garcia
Hi all, I noticed that query-named-block-nodes (and HMP 'info block') returns odd results when the effective backing image of a BlockDriverState is different from the string that is stored on the file. There are two fields exposed on the API that show this information: BlockDeviceInfo's

Re: [Qemu-block] [PATCH] virtio-blk: trivial code optimization

2015-11-06 Thread Paolo Bonzini
On 06/11/2015 11:35, Stefan Hajnoczi wrote: >> > if (niov + req->qiov.niov > IOV_MAX) { >> > merge = false; >> > +goto unmerge; >> > } >> > >> > /* merge would exceed maximum transfer length of backend >> > device */ >> >