[Qemu-devel] [PATCH v2 6/9] block: Inactivate BDS when migration completes

2016-01-13 Thread Kevin Wolf
So far, live migration with shared storage meant that the image is in a not-really-ready don't-touch-me state on the destination while the source is still actively using it, but after completing the migration, the image was fully opened on both sides. This is bad. This patch adds a block driver

[Qemu-devel] [PATCH v2 8/9] qcow2: Fix BDRV_O_INACTIVE handling in qcow2_invalidate_cache()

2016-01-13 Thread Kevin Wolf
What qcow2_invalidate_cache() should do is close the image with BDRV_O_INACTIVE set and reopen it with the flag cleared. In fact, it used to do exactly the opposite: qcow2_close() relied on bs->open_flags, which is already updated to have cleared BDRV_O_INACTIVE at this point, whereas qcow2_open()

[Qemu-devel] [PATCH v2 9/9] qcow2: Make image inaccessible after failed qcow2_invalidate_cache()

2016-01-13 Thread Kevin Wolf
If qcow2_invalidate_cache() fails, we are in a state where qcow2_close() has already been completed, but the image hasn't been reopened yet. Calling into any qcow2 function for an image in this state will cause crashes. The real solution would be to get rid of the close/open pair and instead do

Re: [Qemu-devel] [PATCH 1/5] block: added lock image option and callback

2016-01-13 Thread Eric Blake
On 01/12/2016 05:10 PM, Fam Zheng wrote: >> If we will switch default in my patch from 'nolock' to 'lock' then >> pour guys which are calling qemu-img etc stuff will see the lock >> as necessary while 'proper management software' aka libvirt >> will be able to call qemu/qemu-img etc with proper

Re: [Qemu-devel] [Qemu-block] [PATCH v1 07/15] block: add flag to indicate that no I/O will be performed

2016-01-13 Thread Kevin Wolf
Am 12.01.2016 um 19:56 hat Daniel P. Berrange geschrieben: > When opening an image it is useful to know whether the caller > intends to perform I/O on the image or not. In the case of > encrypted images this will allow the block driver to avoid > having to prompt for decryption keys when we merely

Re: [Qemu-devel] [PATCH v3 0/6] virtio/vhost cross-endian cleanup

2016-01-13 Thread Greg Kurz
On Tue, 12 Jan 2016 18:21:05 +0100 Greg Kurz wrote: > This series brings some improvements to the cross-endian support in the > virtio and vhost code: > - use qemu_set_vnet_be() and qemu_set_vnet_le() directly from virtio-net, > so that backend cross-endian

Re: [Qemu-devel] [Qemu-block] [PATCH v1 07/15] block: add flag to indicate that no I/O will be performed

2016-01-13 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 06:44:41PM +0100, Kevin Wolf wrote: > Am 12.01.2016 um 19:56 hat Daniel P. Berrange geschrieben: > > When opening an image it is useful to know whether the caller > > intends to perform I/O on the image or not. In the case of > > encrypted images this will allow the block

<    1   2   3