[Qemu-block] [PATCH] virtio-blk: fix comment for virtio_blk_rw_complete

2018-07-27 Thread Yaowei Bai
Here should be submit_requests, there is no submit_merged_requests function. Signed-off-by: Yaowei Bai --- hw/block/virtio-blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 50b5c86..91cbede 100644 --- a/hw/block/virt

Re: [Qemu-block] [Qemu-devel] [RFC PATCH] rbd: Don't convert keypairs to JSON and back

2018-07-27 Thread Jeff Cody
On Wed, Jul 25, 2018 at 05:01:44PM +0100, Daniel P. Berrangé wrote: > On Wed, Jul 25, 2018 at 10:56:48AM -0500, Eric Blake wrote: > > On 07/25/2018 10:10 AM, Markus Armbruster wrote: > > > qemu_rbd_parse_filename() builds a keypairs QList, converts it to JSON, > > > and > > > stores the resulting

Re: [Qemu-block] [Qemu-devel] [RFC PATCH] rbd: Don't convert keypairs to JSON and back

2018-07-27 Thread Jeff Cody
On Wed, Jul 25, 2018 at 10:56:48AM -0500, Eric Blake wrote: > On 07/25/2018 10:10 AM, Markus Armbruster wrote: > >qemu_rbd_parse_filename() builds a keypairs QList, converts it to JSON, and > >stores the resulting QString in a QDict. > > > >qemu_rbd_co_create_opts() and qemu_rbd_open() get the QStr

Re: [Qemu-block] [PATCH v3] block/gluster: Handle changed glfs_ftruncate signature

2018-07-27 Thread Jeff Cody
On Fri, Jul 27, 2018 at 08:24:05AM -0500, Eric Blake wrote: > On 07/27/2018 03:19 AM, Niels de Vos wrote: > >From: Prasanna Kumar Kalever > > > >New versions of Glusters libgfapi.so have an updated glfs_ftruncate() > >function that returns additional 'struct stat' structures to enable > >advanced

Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device

2018-07-27 Thread Nir Soffer
On Fri, Jul 27, 2018 at 10:36 PM Richard W.M. Jones wrote: > On Fri, Jul 27, 2018 at 09:53:32PM +0300, Nir Soffer wrote: > > I think performance is pretty good now, after I added efficient zeroing: > > https://gerrit.ovirt.org/c/92901/ > > This should be available in 4.2.6. > > This is great, tha

Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device

2018-07-27 Thread Richard W.M. Jones
On Fri, Jul 27, 2018 at 09:53:32PM +0300, Nir Soffer wrote: > I think performance is pretty good now, after I added efficient zeroing: > https://gerrit.ovirt.org/c/92901/ > This should be available in 4.2.6. This is great, thanks. ... > I also tested uploading to raw disk using qemu-nbd on my dev

Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device

2018-07-27 Thread Nir Soffer
On Fri, Jul 27, 2018 at 5:07 PM Richard W.M. Jones wrote: > On Fri, Jul 27, 2018 at 02:20:29PM +0100, Stefan Hajnoczi wrote: > > On Thu, Jul 19, 2018 at 01:56:34PM +0300, Nir Soffer wrote: > > > Having HTTP API makes it easy to integrate with. This is also the > protocol > > > Kubrvirt CDI[1] is

Re: [Qemu-block] [PATCH for-3.0 3/3] qemu-iotests: Test query-blockstats with -drive and -blockdev

2018-07-27 Thread Kevin Wolf
Am 27.07.2018 um 17:12 hat Eric Blake geschrieben: > On 07/27/2018 09:15 AM, Kevin Wolf wrote: > > Make sure that query-blockstats returns information for every > > BlockBackend that is named or attached to a device model (or both). > > Needed for libvirt switching over to -blockdev, so even thoug

Re: [Qemu-block] [PATCH for-3.0 1/3] block/qapi: Add 'qdev' field to query-blockstats result

2018-07-27 Thread Kevin Wolf
Am 27.07.2018 um 17:07 hat Eric Blake geschrieben: > On 07/27/2018 09:15 AM, Kevin Wolf wrote: > > Like for query-block, the client needs to identify which BlockBackend > > the returned data is for. Anonymous BlockBackends are identified by the > > device model they are attached to. Add a 'qdev' fi

Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device

2018-07-27 Thread Eric Blake
On 07/27/2018 10:07 AM, Richard W.M. Jones wrote: Does it work also for running vms? I've not actually tried, but it's built into the qemu raw-format block driver (see qemu.git/block/raw-format.c) so it should work. Note AIUI it'll only work for raw format drives, not qcow2 which is probably

Re: [Qemu-block] [PATCH for-3.0 1/3] block/qapi: Add 'qdev' field to query-blockstats result

2018-07-27 Thread Eric Blake
On 07/27/2018 09:15 AM, Kevin Wolf wrote: Like for query-block, the client needs to identify which BlockBackend the returned data is for. Anonymous BlockBackends are identified by the device model they are attached to. Add a 'qdev' field that contains the qdev ID or QOM path of the attached devic

Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device

2018-07-27 Thread Richard W.M. Jones
On Fri, Jul 27, 2018 at 05:48:32PM +0300, Nir Soffer wrote: > On Fri, Jul 27, 2018 at 5:41 PM Richard W.M. Jones > wrote: > > > On Fri, Jul 27, 2018 at 05:29:56PM +0300, Nir Soffer wrote: > > > Do we support specifying an offset in qemu? > > > > Yes. virt-v2v uses this functionality to access fi

Re: [Qemu-block] [PATCH for-3.0 2/3] block/qapi: Include anonymous BBs in query-blockstats

2018-07-27 Thread Eric Blake
On 07/27/2018 09:15 AM, Kevin Wolf wrote: Consistent with query-block, query-blockstats should not only include named BlockBackends, but also those that are anonmyous, but belong to a s/anonmyous/anonymous/ device model. Signed-off-by: Kevin Wolf --- block/qapi.c | 6 +- 1 file chang

Re: [Qemu-block] [PATCH for-3.0 3/3] qemu-iotests: Test query-blockstats with -drive and -blockdev

2018-07-27 Thread Eric Blake
On 07/27/2018 09:15 AM, Kevin Wolf wrote: Make sure that query-blockstats returns information for every BlockBackend that is named or attached to a device model (or both). Needed for libvirt switching over to -blockdev, so even though we're rather late in the 3.0 cycle, I can understand it goi

Re: [Qemu-block] [PATCH] block/file-posix: add bdrv_attach_aio_context callback for host dev and cdrom

2018-07-27 Thread Farhan Ali
On 07/27/2018 09:26 AM, Stefan Hajnoczi wrote: On Mon, Jul 23, 2018 at 12:42:02PM -0400, Farhan Ali wrote: On 07/23/2018 12:30 PM, Stefan Hajnoczi wrote: On Fri, Jul 20, 2018 at 03:11:14PM -0400, Farhan Ali wrote: I am seeing another issue pop up, in a different test. Even though it's a d

Re: [Qemu-block] [PATCH RFC for-3.0-rc3 0/3] qemu-img: Disable copy offloading by default

2018-07-27 Thread Kevin Wolf
Am 27.07.2018 um 14:14 hat Fam Zheng geschrieben: > On Fri, Jul 27, 2018 at 6:29 PM Kevin Wolf wrote: > > > > Am 27.07.2018 um 05:33 hat Fam Zheng geschrieben: > > > Kevin pointed out that both glibc and kernel provides a slow fallback of > > > copy_file_range which hurts thin provisioning. This i

Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device

2018-07-27 Thread Nir Soffer
On Fri, Jul 27, 2018 at 5:41 PM Richard W.M. Jones wrote: > On Fri, Jul 27, 2018 at 05:29:56PM +0300, Nir Soffer wrote: > > Do we support specifying an offset in qemu? > > Yes. virt-v2v uses this functionality to access files inside > tarballs (written by Tomas): > > > https://github.com/libgues

Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device

2018-07-27 Thread Richard W.M. Jones
On Fri, Jul 27, 2018 at 05:29:56PM +0300, Nir Soffer wrote: > Do we support specifying an offset in qemu? Yes. virt-v2v uses this functionality to access files inside tarballs (written by Tomas): https://github.com/libguestfs/libguestfs/blob/67c36779c3bd383f8c550d9c43b0884d1a108c4d/v2v/input_ova

Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device

2018-07-27 Thread Nir Soffer
On Fri, Jul 27, 2018 at 4:20 PM Stefan Hajnoczi wrote: > On Thu, Jul 19, 2018 at 01:56:34PM +0300, Nir Soffer wrote: > > On Wed, Jul 18, 2018 at 6:35 PM Stefan Hajnoczi > wrote: > > > > > On Wed, Jul 11, 2018 at 08:28:38PM +0300, Nir Soffer wrote: > > > > On Wed, Jul 11, 2018 at 3:40 PM Stefan H

[Qemu-block] [PATCH for-3.0 3/3] qemu-iotests: Test query-blockstats with -drive and -blockdev

2018-07-27 Thread Kevin Wolf
Make sure that query-blockstats returns information for every BlockBackend that is named or attached to a device model (or both). Signed-off-by: Kevin Wolf --- tests/qemu-iotests/227 | 101 + tests/qemu-iotests/227.out | 42 +++ te

[Qemu-block] [PATCH for-3.0 2/3] block/qapi: Include anonymous BBs in query-blockstats

2018-07-27 Thread Kevin Wolf
Consistent with query-block, query-blockstats should not only include named BlockBackends, but also those that are anonmyous, but belong to a device model. Signed-off-by: Kevin Wolf --- block/qapi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/qapi.c b/block/qap

[Qemu-block] [PATCH for-3.0 0/3] Fix query-blockstats with -blockdev

2018-07-27 Thread Kevin Wolf
Kevin Wolf (3): block/qapi: Add 'qdev' field to query-blockstats result block/qapi: Include anonymous BBs in query-blockstats qemu-iotests: Test query-blockstats with -drive and -blockdev qapi/block-core.json | 5 ++- block/qapi.c | 16 ++- tests/qemu-iotests/227

[Qemu-block] [PATCH for-3.0 1/3] block/qapi: Add 'qdev' field to query-blockstats result

2018-07-27 Thread Kevin Wolf
Like for query-block, the client needs to identify which BlockBackend the returned data is for. Anonymous BlockBackends are identified by the device model they are attached to. Add a 'qdev' field that contains the qdev ID or QOM path of the attached device model. Signed-off-by: Kevin Wolf --- qa

Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device

2018-07-27 Thread Richard W.M. Jones
On Fri, Jul 27, 2018 at 02:20:29PM +0100, Stefan Hajnoczi wrote: > On Thu, Jul 19, 2018 at 01:56:34PM +0300, Nir Soffer wrote: > > Having HTTP API makes it easy to integrate with. This is also the protocol > > Kubrvirt CDI[1] is using for importing images: > > https://github.com/kubevirt/containeri

Re: [Qemu-block] [PATCH RFC for-3.0-rc3 0/3] qemu-img: Disable copy offloading by default

2018-07-27 Thread Nir Soffer
On Fri, Jul 27, 2018 at 3:15 PM Fam Zheng wrote: > On Fri, Jul 27, 2018 at 6:29 PM Kevin Wolf wrote: > > > > Am 27.07.2018 um 05:33 hat Fam Zheng geschrieben: > > > Kevin pointed out that both glibc and kernel provides a slow fallback > of > > > copy_file_range which hurts thin provisioning. Thi

Re: [Qemu-block] [PATCH] block/file-posix: add bdrv_attach_aio_context callback for host dev and cdrom

2018-07-27 Thread Stefan Hajnoczi
On Mon, Jul 23, 2018 at 12:42:02PM -0400, Farhan Ali wrote: > > > On 07/23/2018 12:30 PM, Stefan Hajnoczi wrote: > > On Fri, Jul 20, 2018 at 03:11:14PM -0400, Farhan Ali wrote: > > > I am seeing another issue pop up, in a different test. Even though it's a > > > different assertion, it might be r

Re: [Qemu-block] [PATCH v3] block/gluster: Handle changed glfs_ftruncate signature

2018-07-27 Thread Eric Blake
On 07/27/2018 03:19 AM, Niels de Vos wrote: From: Prasanna Kumar Kalever New versions of Glusters libgfapi.so have an updated glfs_ftruncate() function that returns additional 'struct stat' structures to enable advanced caching of attributes. This is useful for file servers, not so much for QEM

Re: [Qemu-block] [PATCH v3 for-3.0] block/gluster: Handle changed glfs_ftruncate signature

2018-07-27 Thread Eric Blake
On 07/27/2018 03:19 AM, Niels de Vos wrote: From: Prasanna Kumar Kalever New versions of Glusters libgfapi.so have an updated glfs_ftruncate() s/Glusters/Gluster's/ function that returns additional 'struct stat' structures to enable advanced caching of attributes. This is useful for file se

Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device

2018-07-27 Thread Stefan Hajnoczi
On Thu, Jul 19, 2018 at 01:56:34PM +0300, Nir Soffer wrote: > On Wed, Jul 18, 2018 at 6:35 PM Stefan Hajnoczi wrote: > > > On Wed, Jul 11, 2018 at 08:28:38PM +0300, Nir Soffer wrote: > > > On Wed, Jul 11, 2018 at 3:40 PM Stefan Hajnoczi > > wrote: > > > > > > > On Thu, Jul 05, 2018 at 02:10:58AM

Re: [Qemu-block] [PATCH RFC for-3.0-rc3 0/3] qemu-img: Disable copy offloading by default

2018-07-27 Thread Fam Zheng
On Fri, Jul 27, 2018 at 6:29 PM Kevin Wolf wrote: > > Am 27.07.2018 um 05:33 hat Fam Zheng geschrieben: > > Kevin pointed out that both glibc and kernel provides a slow fallback of > > copy_file_range which hurts thin provisioning. This is particularly true for > > thin LVs, because host_device dr

Re: [Qemu-block] [Qemu-devel] How to generate custom fw paths for IDE devices?

2018-07-27 Thread Mark Cave-Ayland
On 27/07/18 11:47, Paolo Bonzini wrote: On 27/07/2018 12:43, Mark Cave-Ayland wrote: The issue here seems to be that according to "info qtree" there is *always* an ide-cd device plugged into the location equivalent to that of -cdrom, and so with the above command QEMU ends up adding a second id

Re: [Qemu-block] [Qemu-devel] How to generate custom fw paths for IDE devices?

2018-07-27 Thread Paolo Bonzini
On 27/07/2018 12:43, Mark Cave-Ayland wrote: > The issue here seems to be that according to "info qtree" there is > *always* an ide-cd device plugged into the location equivalent to that > of -cdrom, and so with the above command QEMU ends up adding a second > ide-cd device to the ide.1 bus which c

Re: [Qemu-block] [Qemu-devel] How to generate custom fw paths for IDE devices?

2018-07-27 Thread Mark Cave-Ayland
On 25/07/18 14:03, Paolo Bonzini wrote: It's possible as long as you don't add any members. You can add a new const char* argument to ide_bus_new, and call it from cmd646. However, another possibility is to implement the FWPathProvider interface in the sun4u machine type. See hw/ppc/spapr.c f

Re: [Qemu-block] [PATCH RFC for-3.0-rc3 0/3] qemu-img: Disable copy offloading by default

2018-07-27 Thread Kevin Wolf
Am 27.07.2018 um 05:33 hat Fam Zheng geschrieben: > Kevin pointed out that both glibc and kernel provides a slow fallback of > copy_file_range which hurts thin provisioning. This is particularly true for > thin LVs, because host_device driver cannot get allocation info from the > volume, and copy_f

Re: [Qemu-block] [Qemu-devel] [PATCH] file-posix: Handle EINTR in preallocation=full write

2018-07-27 Thread Fam Zheng
On Fri, 07/27 14:53, Fam Zheng wrote: > Cc: qemu-sta...@nongnu.org > Signed-off-by: Fam Zheng Actually cc qemu-sta...@nongnu.org

Re: [Qemu-block] [PATCH] file-posix: Handle EINTR in preallocation=full write

2018-07-27 Thread Kevin Wolf
Am 27.07.2018 um 08:53 hat Fam Zheng geschrieben: > Cc: qemu-sta...@nongnu.org > Signed-off-by: Fam Zheng Thanks, applied to the block branch. Kevin

[Qemu-block] [PATCH v3] block/gluster: Handle changed glfs_ftruncate signature

2018-07-27 Thread Niels de Vos
From: Prasanna Kumar Kalever New versions of Glusters libgfapi.so have an updated glfs_ftruncate() function that returns additional 'struct stat' structures to enable advanced caching of attributes. This is useful for file servers, not so much for QEMU. Nevertheless, the API has changed and needs