[Qemu-block] [PATCH V2 5/5] virtio-blk: set VIRTIO_F_ANY_LAYOUT when 1.0 is supported

2015-07-14 Thread Jason Wang
Chapter 6.3 of spec said " Transitional devices MUST offer, and if offered by the device transitional drivers MUST accept the following: VIRTIO_F_ANY_LAYOUT (27) " So this patch sets VIRTIO_F_ANY_LAYOUT when 1.0 is supported. Cc: Stefan Hajnoczi Cc: Kevin Wolf Cc: qemu-block@nongnu.org Signed

[Qemu-block] [PATCH V2 3/5] virtio-blk: disable scsi passthrough by default

2015-07-14 Thread Jason Wang
Disable scsi passthrough by default since it was incompatible with virtio 1.0. For legacy machine types, keep this on by default. Cc: Stefan Hajnoczi Cc: Kevin Wolf Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang --- hw/block/virtio-blk.c | 2 +- include/hw/compat.h | 6 +- 2 files c

[Qemu-block] [PATCH V2 4/5] virtio-blk: fail the init when both 1.0 and scsi is set

2015-07-14 Thread Jason Wang
Scsi passthrough was no longer supported in 1.0, so fail the initialization when user want both features. Cc: Stefan Hajnoczi Cc: Kevin Wolf Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang --- hw/block/virtio-blk.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/block/virtio-blk

[Qemu-block] [PATCH V2 2/5] virtio-blk: advertise scsi only when scsi is set

2015-07-14 Thread Jason Wang
Cc: Stefan Hajnoczi Cc: Kevin Wolf Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang --- hw/block/virtio-blk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 4c27974..761d763 100644 --- a/hw/block/virtio-blk.c +++ b/h

[Qemu-block] [PULL for-2.4 4/5] mirror: correct buf_size

2015-07-14 Thread Jeff Cody
From: Wen Congyang If bus_size is less than 0, the command fails. If buf_size is 0, use DEFAULT_MIRROR_BUF_SIZE. If buf_size % granularity is not 0, mirror_free_init() will do dangerous things. Signed-off-by: Wen Congyang Reviewed-by: Fam Zheng Message-id: a588.3080...@cn.fujitsu.com Signe

[Qemu-block] [PULL for-2.4 5/5] block/curl: Don't lose original error when a connection fails.

2015-07-14 Thread Jeff Cody
From: "Richard W.M. Jones" Currently if qemu is connected to a curl source (eg. web server), and the web server fails / times out / dies, you always see a bogus EIO "Input/output error". For example, choose a large file located on any local webserver which you control: $ qemu-img convert -p h

[Qemu-block] [PULL for-2.4 1/5] block/mirror: Sleep periodically during bitmap scanning

2015-07-14 Thread Jeff Cody
From: Fam Zheng Before, we only yield after initializing dirty bitmap, where the QMP command would return. That may take very long, and guest IO will be blocked. Add sleep points like the later mirror iterations. Signed-off-by: Fam Zheng Reviewed-by: Wen Congyang Reviewed-by: Paolo Bonzini R

[Qemu-block] [PULL for-2.4 0/5] Block layer patches for 2.4.0-rc1

2015-07-14 Thread Jeff Cody
The following changes since commit 661725da09f47eb92d356fac10a4cf3b7ad1f61d: Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20150714' into staging (2015-07-14 18:50:17 +0100) are available in the git repository at: g...@github.com:codyprime/qemu-kvm-jtc.git tags/jtc-fo

[Qemu-block] [PULL for-2.4 3/5] block: keep bitmap if incremental backup job is cancelled

2015-07-14 Thread Jeff Cody
From: Stefan Hajnoczi Reclaim the dirty bitmap if an incremental backup block job is cancelled. The ret variable may be 0 when the job is cancelled so it's not enough to check ret < 0. Reviewed-by: John Snow Signed-off-by: Stefan Hajnoczi Message-id: 1434380534-7680-1-git-send-email-stefa...@

[Qemu-block] [PULL for-2.4 2/5] blockdev: no need to drain in qmp_block_commit

2015-07-14 Thread Jeff Cody
From: Paolo Bonzini Draining is not necessary, I/O can happen as soon as the commit coroutine yields. Draining can be necessary before reopening the file for read/write, or while modifying the backing file chain, but that is done separately in bdrv_reopen_multiple or bdrv_close; this particular

[Qemu-block] [Qemu-devel][PATCH]block/truncate: qcow2’s resize status is not showed to

2015-07-14 Thread 김태하
Hello,To put it briefly, when resize qcow2 image, the "file" tool detected increased size. However, the "ls", “stat”, and “du” utility still don't know increased size. The following patch enables to let userland tools - ls, du, stat - know and apply changed size after resizing qcow2 image created b

Re: [Qemu-block] [Qemu-devel] [PATCH 0/4] rbd cleanup and settings precedence fixes

2015-07-14 Thread Josh Durgin
On 07/14/2015 07:20 AM, Kevin Wolf wrote: Am 09.07.2015 um 11:59 hat Stefan Hajnoczi geschrieben: On Tue, Jun 30, 2015 at 11:28:18AM -0700, Josh Durgin wrote: Ping On 06/10/2015 08:28 PM, Josh Durgin wrote: Patches 1 and 2 are simple cleanups. 3 and 4 fix the precedence of cache options and c

Re: [Qemu-block] [Qemu-devel] [PULL 00/11] Block layer patches for 2.4.0-rc1

2015-07-14 Thread Peter Maydell
On 14 July 2015 at 16:39, Kevin Wolf wrote: > The following changes since commit f3a1b5068cea303a55e2a21a97e66d057eaae638: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2015-07-13 13:35:51 +0100) > > are available in the git repository at: > > > git://repo.o

Re: [Qemu-block] [Qemu-devel] [PATCH 2/5] virtio-blk: disable scsi passthrough for 1.0 device

2015-07-14 Thread Cornelia Huck
On Mon, 13 Jul 2015 18:35:53 +0300 "Michael S. Tsirkin" wrote: > On Mon, Jul 13, 2015 at 03:20:59PM +0200, Cornelia Huck wrote: > > On Mon, 13 Jul 2015 15:36:00 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Jul 13, 2015 at 02:30:24PM +0200, Cornelia Huck wrote: > > > > On Mon, 13 Jul

[Qemu-block] [PULL 01/11] nvme: implement the Flush command

2015-07-14 Thread Kevin Wolf
From: Christoph Hellwig Implement a real flush instead of faking it. This is especially important as Qemu assume Write back cashing by default and thus requires a working cache flush operation for data integrity. Signed-off-by: Christoph Hellwig Acked-by: Keith Busch Signed-off-by: Kevin Wolf

[Qemu-block] [PULL 07/11] block: Fix backing file child when modifying graph

2015-07-14 Thread Kevin Wolf
This patch moves bdrv_attach_child() from the individual places that add a backing file to a BDS to bdrv_set_backing_hd(), which is called by all of them. It also adds bdrv_detach_child() there. For normal operation (starting with one backing file chain and not changing it until the topmost image

[Qemu-block] [PULL 10/11] rbd: make qemu's cache setting override any ceph setting

2015-07-14 Thread Kevin Wolf
From: Josh Durgin To be safe, when cache=none is used ceph settings should not be able to override it to turn on caching. This was previously possible with rbd_cache=true in the rbd device configuration or a ceph configuration file. Similarly, rbd settings could have turned off caching when qemu

Re: [Qemu-block] [Qemu-devel] [PATCH] ide: coverity touchups

2015-07-14 Thread John Snow
On 07/14/2015 04:30 AM, Paolo Bonzini wrote: > > > On 13/07/2015 21:41, John Snow wrote: >> s->ports should never exceed 32, but coverity doesn't know that. >> ncq_tfs->sector_count should also never exceed 64K. Personally I tend to mark that kind of thing as a false posi

[Qemu-block] [PULL 08/11] rbd: remove unused constants and fields

2015-07-14 Thread Kevin Wolf
From: Josh Durgin RBDAIOCB.status was only used for cancel, which was removed in 7691e24dbebb46658e89b3f950fda6ec78bbb823. RBDAIOCB.sector_num was never used. RADOSCB.done and rcbid were never used. RBD_FD* are obsolete since the pipe was removed in e04fb07fd1676e9facd7f3f878c1bbe03bccd26b. S

[Qemu-block] [PULL 05/11] block: Introduce bdrv_unref_child()

2015-07-14 Thread Kevin Wolf
This is the counterpart for bdrv_open_child(). It decreases the reference count of the child BDS and removes it from the list of children of the given parent BDS. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c | 23 +-- include/block/block.h | 1

[Qemu-block] [PULL 04/11] block: Introduce bdrv_open_child()

2015-07-14 Thread Kevin Wolf
It is the same as bdrv_open_image(), except that it doesn't only return success or failure, but the newly created BdrvChild object for the new child node. As the BdrvChild object already contains a BlockDriverState pointer (and this is supposed to become the only pointer so that bdrv_append() and

[Qemu-block] [PULL 06/11] block: Reorder cleanups in bdrv_close()

2015-07-14 Thread Kevin Wolf
Block drivers may still want to access their child nodes in their .bdrv_close handler. If they unref and/or detach a child by themselves, this should not result in a double free. There is additional code for backing files, which are just a special case of child nodes. The same applies for them. S

[Qemu-block] [PULL 02/11] nvme: properly report volatile write caches

2015-07-14 Thread Kevin Wolf
From: Christoph Hellwig Implement support in Identify and Get/Set Features to properly report and allow to change the Volatile Write Cache status reported by the virtual NVMe device. Signed-off-by: Christoph Hellwig Acked-by: Keith Busch Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 19 +++

[Qemu-block] [PULL 03/11] block: Move bdrv_attach_child() calls up the call chain

2015-07-14 Thread Kevin Wolf
Let the callers of bdrv_open_inherit() call bdrv_attach_child(). It needs to be called in all cases where bdrv_open_inherit() succeeds (i.e. returns 0) and a child_role is given. bdrv_attach_child() is moved upwards to avoid a forward declaration. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz

[Qemu-block] [PULL 09/11] MAINTAINERS: update email address

2015-07-14 Thread Kevin Wolf
From: Josh Durgin The old one still works for now, but will not work indefinitely. Signed-off-by: Josh Durgin Reviewed-by: Jeff Cody Signed-off-by: Kevin Wolf --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 411da3c..978b717

[Qemu-block] [PULL 11/11] rbd: fix ceph settings precedence

2015-07-14 Thread Kevin Wolf
From: Josh Durgin Apply the ceph settings from a config file before any ceph settings from the command line. Since the ceph config file location may be specified on the command line, parse it once to read the config file, and do a second pass to apply the rest of the command line ceph options. S

[Qemu-block] [PULL 00/11] Block layer patches for 2.4.0-rc1

2015-07-14 Thread Kevin Wolf
The following changes since commit f3a1b5068cea303a55e2a21a97e66d057eaae638: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-07-13 13:35:51 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch cha

Re: [Qemu-block] [PATCH v4] block/curl: Don't lose original error when a connection fails.

2015-07-14 Thread Stefan Hajnoczi
On Wed, Jul 08, 2015 at 02:37:48PM +0100, Richard W.M. Jones wrote: > Currently if qemu is connected to a curl source (eg. web server), and > the web server fails / times out / dies, you always see a bogus EIO > "Input/output error". > > For example, choose a large file located on any local webser

Re: [Qemu-block] [Qemu-devel] [PATCH 0/4] rbd cleanup and settings precedence fixes

2015-07-14 Thread Kevin Wolf
Am 09.07.2015 um 11:59 hat Stefan Hajnoczi geschrieben: > On Tue, Jun 30, 2015 at 11:28:18AM -0700, Josh Durgin wrote: > > Ping > > > > On 06/10/2015 08:28 PM, Josh Durgin wrote: > > >Patches 1 and 2 are simple cleanups. 3 and 4 fix the precedence of > > >cache options and ceph settings. The cache

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] mirror: Speed up bitmap initial scanning

2015-07-14 Thread Stefan Hajnoczi
On Thu, Jul 09, 2015 at 11:47:58AM +0800, Fam Zheng wrote: > Limiting to sectors_per_chunk for each bdrv_is_allocated_above is slow, > because the underlying protocol driver would issue much more queries > than necessary. We should coalesce the query. > > Signed-off-by: Fam Zheng > --- > block/m

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] mirror: Fix guest responsiveness during bitmap scan

2015-07-14 Thread Stefan Hajnoczi
On Mon, Jul 13, 2015 at 01:08:37PM +0800, Fam Zheng wrote: > On Fri, 07/10 14:16, Alexandre DERUMIER wrote: > > So, I think patch 3/3 is enough. (could be great to have it for qemu 2.4) > > Stefan, are you happy with this series? I'll take Patch 3 for QEMU 2.4. This series should go via Jeff Cod

Re: [Qemu-block] [Qemu-devel] [PATCH 1/3] blockjob: Introduce block_job_relax_cpu

2015-07-14 Thread Stefan Hajnoczi
On Fri, Jul 10, 2015 at 05:42:48AM +0200, Alexandre DERUMIER wrote: > >>By the way, why did you choose 10 milliseconds? That is quite long. > >> > >>If this function is called once per 10 ms disk I/O operations then we > >>lose 50% utilization. 1 ms or less would be reasonable. > > From my tests

Re: [Qemu-block] [Qemu-devel] [PATCH] ide: coverity touchups

2015-07-14 Thread Paolo Bonzini
On 13/07/2015 21:41, John Snow wrote: >>> >> s->ports should never exceed 32, but coverity doesn't know that. >>> >> ncq_tfs->sector_count should also never exceed 64K. >> > >> > Personally I tend to mark that kind of thing as a false >> > positive in the coverity UI and move on... >> > >> > --