[Qemu-block] [PATCH 13/34] qemu-io: Add command 'reopen'

2015-05-08 Thread Kevin Wolf
Signed-off-by: Kevin Wolf kw...@redhat.com --- qemu-io-cmds.c | 71 ++ 1 file changed, 71 insertions(+) diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 1afcfc0..ef8f3fd 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -1978,6 +1978,76

[Qemu-block] [PATCH 24/34] block: Keep driver in bs-options

2015-05-08 Thread Kevin Wolf
of the blockdev-add QMP command). Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 54 ++ 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/block.c b/block.c index 7c0c9db..ef39c74 100644 --- a/block.c +++ b/block.c @@ -795,6

[Qemu-block] [PATCH 22/34] block: Exclude nested options only for children in append_open_options()

2015-05-08 Thread Kevin Wolf
Some drivers have nested options (e.g. blkdebug rule arrays), which don't belong to a child node and shouldn't be removed. Don't remove all options with . in their name, but check for the complete prefixes of actually existing child nodes. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c

Re: [Qemu-block] [PATCH v2 3/5] raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT

2015-05-11 Thread Kevin Wolf
Am 08.05.2015 um 19:47 hat Dimitris Aragiorgis geschrieben: Building the QEMU tools fails if we #define DEBUG_BLOCK inside block/raw-posix.c. Here instead of adding qemu-log.o in block-obj-y so that DEBUG_BLOCK_PRINT can be used, we substitute the latter with a simple DPRINTF().

Re: [Qemu-block] [Qemu-devel] [PATCH 01/34] qdict: Add qdict_array_entries()

2015-05-11 Thread Kevin Wolf
Am 08.05.2015 um 22:06 hat Eric Blake geschrieben: On 05/08/2015 11:21 AM, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- Might want to include mention of what it will be used for in the commit body. You're right. This is the new commit message: This counts

Re: [Qemu-block] [PATCH 05/34] block: Use macro for cache option names

2015-05-11 Thread Kevin Wolf
Am 11.05.2015 um 16:40 hat Max Reitz geschrieben: On 08.05.2015 19:21, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- blockdev.c| 24 include/block/block.h | 8 2 files changed, 20 insertions(+), 12 deletions(-) Any

Re: [Qemu-block] [Qemu-devel] [PATCH 02/34] qdict: Add qdict_{set, copy}_default()

2015-05-11 Thread Kevin Wolf
Am 08.05.2015 um 23:30 hat Eric Blake geschrieben: On 05/08/2015 11:21 AM, Kevin Wolf wrote: In the block layer functions that determine options for a child block device, it's a common pattern to either copy options from the parent's options or to set a default string if the option isn't

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols

2015-05-07 Thread Kevin Wolf
Am 07.05.2015 um 16:16 hat Paolo Bonzini geschrieben: On 07/05/2015 16:07, Kevin Wolf wrote: This is not right for two reasons: The first is that this is BlockBackend code I think it would take effect for the qemu-nbd case though. Oh, you want to change the server code rather than

Re: [Qemu-block] [PATCH 1/6] qcow2: use one single memory block for the L2/refcount cache tables

2015-05-05 Thread Kevin Wolf
Am 05.05.2015 um 12:28 hat Stefan Hajnoczi geschrieben: On Mon, May 04, 2015 at 12:58:13PM +0200, Kevin Wolf wrote: Am 01.05.2015 um 16:23 hat Stefan Hajnoczi geschrieben: On Thu, Apr 30, 2015 at 01:11:40PM +0300, Alberto Garcia wrote: Qcow2Cache *qcow2_cache_create(BlockDriverState *bs

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols

2015-05-07 Thread Kevin Wolf
Am 07.05.2015 um 14:20 hat Paolo Bonzini geschrieben: On 06/05/2015 19:23, Max Reitz wrote: The guest sees whatever has been written into reply-error, and that field hasn't been written by this function in that case. It has been written by nbd_receive_reply() in nbd.c, and that value

Re: [Qemu-block] [PATCH v3] block/vdi: Use bdrv_flush after metadata updates

2015-05-08 Thread Kevin Wolf
Am 08.05.2015 um 13:50 hat phoeagon geschrieben: In case of correctness, lacking a sync here does not introduce data corruption I can think of. But this reduces the volatile window during which the metadata changes are NOT guaranteed on disk. Without a barrier, in case of power loss you may

Re: [Qemu-block] [Qemu-devel] [PATCH 20/34] qcow2: Support updating driver-specific options in reopen

2015-05-13 Thread Kevin Wolf
Am 12.05.2015 um 23:47 hat Eric Blake geschrieben: On 05/08/2015 11:21 AM, Kevin Wolf wrote: For updating the cache sizes or disabling lazy refcounts there is a bit more to do than just changing the variables, but otherwise we're all set for changing options during bdrv_reopen(). Just

Re: [Qemu-block] [Qemu-devel] [PATCH 14/34] qcow2: Factor out qcow2_update_options()

2015-05-13 Thread Kevin Wolf
Am 12.05.2015 um 22:04 hat Eric Blake geschrieben: On 05/08/2015 11:21 AM, Kevin Wolf wrote: Eventually we want to be able to change options at runtime. As a first step towards that goal, separate some option handling code from the general initialisation code in qcow2_open(). Signed

Re: [Qemu-block] [PATCH] qemu-io: Use getopt() correctly

2015-05-13 Thread Kevin Wolf
Am 12.05.2015 um 17:10 hat Eric Blake geschrieben: POSIX says getopt() returns -1 on completion. While Linux happens to define EOF as -1, this definition is not required by POSIX, and there may be platforms where checking for EOF instead of -1 would lead to an infinite loop. Signed-off-by:

Re: [Qemu-block] [PATCH v8 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-13 Thread Kevin Wolf
...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Kevin Wolf kw...@redhat.com

Re: [Qemu-block] [PATCH 1/2] block: minimal bounce buffer alignment

2015-05-12 Thread Kevin Wolf
...@redhat.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Kevin Wolf kw...@redhat.com

Re: [Qemu-block] [PATCH v3 0/8] qcow2 L2/refcount cache improvements

2015-05-12 Thread Kevin Wolf
Am 11.05.2015 um 14:54 hat Alberto Garcia geschrieben: New version of the qcow2 cache patches: v3: - Removed a dead comment in patch #3 - New document explaining how to configure the cache sizes v2: https://lists.nongnu.org/archive/html/qemu-devel/2015-05/msg00833.html - Don't do pointer

Re: [Qemu-block] [Qemu-devel] [PATCH v3 01/10] qapi: Add transaction support to block-dirty-bitmap operations

2015-05-18 Thread Kevin Wolf
Am 11.05.2015 um 15:10 hat Stefan Hajnoczi geschrieben: On Fri, May 08, 2015 at 08:29:09AM -0600, Eric Blake wrote: On 05/08/2015 07:14 AM, Stefan Hajnoczi wrote: No it doesn't. Actions have to appear atomic to the qmp_transaction caller. Both approaches achieve that so they are both

Re: [Qemu-block] [PATCH v2 0/2] block: Fix error code for bdrv_getlength when the image is too big

2015-05-18 Thread Kevin Wolf
Am 15.05.2015 um 10:36 hat Fam Zheng geschrieben: v2: Correct detection of overflow. [Markus, Berto] If the image has a huge enough virtual size, $ qemu-img info afl9.img qemu-img: Can't get size of device 'image': Unknown error -512 It's because of the multiplication overflow in

Re: [Qemu-block] [PATCH v2] qemu-iotests: Make debugging python tests easier

2015-05-18 Thread Kevin Wolf
Am 18.05.2015 um 03:39 hat Fam Zheng geschrieben: Adding -d option. The output goes to tee so it appears in your console. Also, raise the verbosity of unnitest runner. When testing a topic branch, it's possible that a bug introduced by a code change makes the python test case hang, with

Re: [Qemu-block] [PATCH 0/5] Misc fixes and testing of qcow[2] encryption

2015-05-18 Thread Kevin Wolf
Am 12.05.2015 um 18:09 hat Daniel P. Berrange geschrieben: I realize that qcow[2] encryption is a feature we have deprecated and will remove support for running it with the QEMU system emulators in this cycle. We do still need to make sure it continues to work for the sake of letting people

Re: [Qemu-block] [PATCH 27/34] block: Add infrastructure for option inheritance

2015-05-13 Thread Kevin Wolf
Am 13.05.2015 um 17:10 hat Max Reitz geschrieben: On 08.05.2015 19:21, Kevin Wolf wrote: Options are not actually inherited from the parent node yet, but this commit lays the grounds for doing so. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 51

Re: [Qemu-block] [PATCH v6 1/3] Revert block: Fix unaligned zero write

2015-05-12 Thread Kevin Wolf
reverted. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Kevin Wolf kw...@redhat.com

Re: [Qemu-block] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Kevin Wolf
Am 12.05.2015 um 12:36 hat Denis V. Lunev geschrieben: On 12/05/15 13:27, Kevin Wolf wrote: Am 12.05.2015 um 07:47 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd

Re: [Qemu-block] [PATCH v6 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-12 Thread Kevin Wolf
Am 12.05.2015 um 08:09 hat Fam Zheng geschrieben: For zero write, callers pass in NULL qiov (qemu-io write -z or scsi-disk write same). Commit fc3959e466 fixed bdrv_co_write_zeroes which is the common case for this bug, but it still exists in bdrv_aio_write_zeroes. A simpler fix would be in

Re: [Qemu-block] [PATCH v6 3/3] qemu-iotests: Test unaligned sub-block zero write

2015-05-12 Thread Kevin Wolf
Am 12.05.2015 um 08:09 hat Fam Zheng geschrieben: Test zero write in byte range 512~1024 for 4k alignment. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Kevin Wolf kw...@redhat.com

Re: [Qemu-block] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Kevin Wolf
qemu-img and qemu-io are affected while qemu-kvm is not. The guest does his job well and real requests comes properly aligned (to page). Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com

Re: [Qemu-block] [PATCH 08/34] block: Add list of children to BlockDriverState

2015-05-12 Thread Kevin Wolf
Am 11.05.2015 um 17:45 hat Max Reitz geschrieben: On 08.05.2015 19:21, Kevin Wolf wrote: This allows iterating over all children of a given BDS, not only including bs-file and bs-backing_hd, but also driver-specific ones like VMDK extents or Quorum children. Signed-off-by: Kevin Wolf kw

Re: [Qemu-block] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Kevin Wolf
Am 12.05.2015 um 16:20 hat Denis V. Lunev geschrieben: On 12/05/15 17:08, Kevin Wolf wrote: Am 12.05.2015 um 15:41 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd

Re: [Qemu-block] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Kevin Wolf
qemu-img and qemu-io are affected while qemu-kvm is not. The guest does his job well and real requests comes properly aligned (to page). Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com

[Qemu-block] [PATCH 0/2] Fix VHDX qemu-iotests 033 failure

2015-04-15 Thread Kevin Wolf
Kevin Wolf (2): blkdebug: Add bdrv_truncate() vhdx: Fix zero-fill iov length block/blkdebug.c | 6 ++ block/vhdx.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) -- 1.8.3.1

Re: [Qemu-block] [PATCH for-2.3] qcow2: Fix header update with overridden backing file

2015-04-07 Thread Kevin Wolf
Am 07.04.2015 um 14:51 hat Kevin Wolf geschrieben: In recent qemu versions, it is possible to override the backing file name and format that is stored in the image file with values given at runtime. In such cases, the temporary override could end up in the image header if the qcow2 header

[Qemu-block] [PATCH for-2.3 v2] qcow2: Fix header update with overridden backing file

2015-04-07 Thread Kevin Wolf
be to leave the on-disk backing file path/format unchanged. Fix this and add a test case for it. Reported-by: Michael Tokarev m...@tls.msk.ru Signed-off-by: Kevin Wolf kw...@redhat.com --- v2: - Now freeing instead of leaking the new strings in qcow2_close() block/qcow2.c | 29

Re: [Qemu-block] [Qemu-devel] [PATCH 7/8] fdc: Fix MSR.RQM flag

2015-05-20 Thread Kevin Wolf
Am 19.05.2015 um 22:40 hat John Snow geschrieben: On 05/19/2015 11:36 AM, Kevin Wolf wrote: The RQM bit in MSR should be set whenever the guest is supposed to access the FIFO, and it should be cleared in all other cases. This is important so the guest can't continue writing/reading

[Qemu-block] [PATCH 5/8] fdc: Code cleanup in fdctrl_write_data()

2015-05-19 Thread Kevin Wolf
Factor out a few common lines of code, reformat, improve comments. Signed-off-by: Kevin Wolf kw...@redhat.com --- hw/block/fdc.c | 62 +++--- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index

[Qemu-block] [PATCH 2/8] fdc: Rename fdctrl_set_fifo() to fdctrl_to_result_phase()

2015-05-19 Thread Kevin Wolf
What callers really do with this function is to switch from execution phase (including data transfers) to result phase where the guest can read out one or more status bytes from the FIFO (the number depends on the command). Rename the function accordingly. Signed-off-by: Kevin Wolf kw

[Qemu-block] [PATCH 6/8] fdc: Disentangle phases in fdctrl_read_data()

2015-05-19 Thread Kevin Wolf
This commit makes similar improvements as have already been made to the write function: Instead of relying on a flag in the MSR to distinguish controller phases, use the explicit phase that we store now. Assertions of the right MSR flags are added. Signed-off-by: Kevin Wolf kw...@redhat.com

[Qemu-block] [PATCH 0/8] fdc: Clean up and fix command processing

2015-05-19 Thread Kevin Wolf
This series fixes the real bug that caused CVE-2015-3456, and does some cleanup in the FIFO access functions to make the command processing more obvious. Kevin Wolf (8): fdc: Rename fdctrl_reset_fifo() to fdctrl_to_command_phase() fdc: Rename fdctrl_set_fifo() to fdctrl_to_result_phase

[Qemu-block] [PATCH 4/8] fdc: Use phase in fdctrl_write_data()

2015-05-19 Thread Kevin Wolf
Instead of relying on a flag in the MSR to distinguish controller phases, use the explicit phase that we store now. Assertions of the right MSR flags are added. Signed-off-by: Kevin Wolf kw...@redhat.com --- hw/block/fdc.c | 67 ++ 1 file

[Qemu-block] [PATCH 7/8] fdc: Fix MSR.RQM flag

2015-05-19 Thread Kevin Wolf
to be set explicitly there. This alone should have been enough to fix the CVE, but now we have two lines of defense - even better. Signed-off-by: Kevin Wolf kw...@redhat.com --- hw/block/fdc.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/block/fdc.c b/hw

[Qemu-block] [PATCH 8/8] fdc-test: Test state for existing cases more thoroughly

2015-05-19 Thread Kevin Wolf
This just adds a few additional checks of the MSR and interrupt pin to the already existing test cases. Signed-off-by: Kevin Wolf kw...@redhat.com --- tests/fdc-test.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/tests/fdc-test.c b/tests/fdc-test.c

Re: [Qemu-block] [Qemu-devel] [PATCH 6/8] fdc: Disentangle phases in fdctrl_read_data()

2015-05-20 Thread Kevin Wolf
Am 19.05.2015 um 22:40 hat John Snow geschrieben: On 05/19/2015 11:36 AM, Kevin Wolf wrote: This commit makes similar improvements as have already been made to the write function: Instead of relying on a flag in the MSR to distinguish controller phases, use the explicit phase that we

Re: [Qemu-block] [Qemu-devel] [PATCH 3/8] fdc: Introduce fdctrl-phase

2015-05-20 Thread Kevin Wolf
Am 20.05.2015 um 10:06 hat Peter Maydell geschrieben: On 20 May 2015 at 08:54, Kevin Wolf kw...@redhat.com wrote: Am 19.05.2015 um 22:57 hat Peter Maydell geschrieben: Yeah, if there's genuinely an underlying state machine that's not completely visible in registers you need to actually

[Qemu-block] [PATCH] MAINTAINERS: Add header files to Block Layer Core section

2015-05-20 Thread Kevin Wolf
Suggested-by: Markus Armbruster arm...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index b3552b2..9ff7c36 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -785,6 +785,7 @@ S: Supported F: block

Re: [Qemu-block] [PATCH] sheepdog: Fix error message if failed to load vmstate

2015-06-02 Thread Kevin Wolf
[ CC to Sheepdog maintainers ] Am 02.06.2015 um 11:32 hat Fam Zheng geschrieben: Signed-off-by: Fam Zheng f...@redhat.com --- block/sheepdog.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index bd7cbed..a22f838 100644 ---

Re: [Qemu-block] [PATCH] block: record new size in bdrv_dirty_bitmap_truncate

2015-06-09 Thread Kevin Wolf
Am 08.06.2015 um 22:49 hat John Snow geschrieben: ce1ffea8 neglected to update the BdrvDirtyBitmap structure itself for internal consistency. It's currently not an issue, but for migration and persistence series this will cause headaches. Signed-off-by: John Snow js...@redhat.com I know

Re: [Qemu-block] [PATCH v2 0/2] block: driver should override flags in bdrv_open()

2015-06-09 Thread Kevin Wolf
Am 09.06.2015 um 10:41 hat Stefan Hajnoczi geschrieben: On Thu, Mar 19, 2015 at 6:53 PM, Max Reitz mre...@redhat.com wrote: BDRV_O_PROTOCOL is an internal qemu flag which a user should be able to override by explicitly specifying a block driver. This series implements this and adds two

Re: [Qemu-block] [PATCH v2 0/2] block: driver should override flags in bdrv_open()

2015-06-09 Thread Kevin Wolf
Am 09.06.2015 um 12:19 hat Stefan Hajnoczi geschrieben: On Tue, Jun 09, 2015 at 10:59:42AM +0200, Kevin Wolf wrote: Am 09.06.2015 um 10:41 hat Stefan Hajnoczi geschrieben: Please resend and CC Kevin (for qemu-iotests and block.c). It's only you who dropped me from CC. :-) For sanity

Re: [Qemu-block] [PATCH 1/2] block-backend: Introduce blk_drain() and replace blk_drain_all()

2015-06-08 Thread Kevin Wolf
blk_drain_all() on it in virtio_blk_reset(). Cc: Christian Borntraeger borntrae...@de.ibm.com Cc: Cornelia Huck cornelia.h...@de.ibm.com Cc: Kevin Wolf kw...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Alexander Yarygin yary

Re: [Qemu-block] [PATCH 0/2] vmdk: Fix vmdk_co_get_block_status

2015-06-08 Thread Kevin Wolf
Am 04.06.2015 um 08:02 hat Fam Zheng geschrieben: The buggy index_in_cluster was missed in b1649fae49a8. Fix that and dedup the calculation. Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [Qemu-devel] [PATCH] block: allow write-threshold on device name

2015-06-10 Thread Kevin Wolf
Am 10.06.2015 um 00:35 hat Eric Blake geschrieben: On 06/06/2015 07:38 PM, Eric Blake wrote: Commit e2462113 allowed the ability to fire an event if a BDS node exceeds a threshold during a write, but limited the option to only work on node names. For convenience, expand this to allow a

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/2] block: driver should override flags in bdrv_open()

2015-06-10 Thread Kevin Wolf
Am 09.06.2015 um 17:21 hat Eric Blake geschrieben: On 06/09/2015 08:48 AM, Stefan Hajnoczi wrote: I guess my @redhat.com email was received directly from Max because I was in CC list. It didn't pass through Mailman. I saw the original, unmodified list of CCs with Kevin included. The

Re: [Qemu-block] [Qemu-devel] [PATCH] block: record new size in bdrv_dirty_bitmap_truncate

2015-06-10 Thread Kevin Wolf
Am 09.06.2015 um 17:46 hat John Snow geschrieben: On 06/09/2015 05:24 AM, Kevin Wolf wrote: Am 08.06.2015 um 22:49 hat John Snow geschrieben: ce1ffea8 neglected to update the BdrvDirtyBitmap structure itself for internal consistency. It's currently not an issue, but for migration

[Qemu-block] [PATCH v2 03/13] check-qdict: Test cases for new functions

2015-06-10 Thread Kevin Wolf
This adds test cases for the following new QDict functions: * qdict_array_entries() * qdict_set_default_str() * qdict_copy_default() Signed-off-by: Kevin Wolf kw...@redhat.com --- tests/check-qdict.c | 67 + 1 file changed, 67 insertions

[Qemu-block] [PATCH v2 01/13] qdict: Add qdict_array_entries()

2015-06-10 Thread Kevin Wolf
. Quorum) and are to be converted to using bdrv_open_image() as the standard interface for opening child nodes. Signed-off-by: Kevin Wolf kw...@redhat.com --- include/qapi/qmp/qdict.h | 1 + qobject/qdict.c | 78 +--- 2 files changed, 75 insertions

[Qemu-block] [PATCH v2 04/13] quorum: Use bdrv_open_image()

2015-06-10 Thread Kevin Wolf
Besides standardising on a single interface for opening child nodes, this simplifies the .bdrv_open() implementation of the quorum block driver by using block layer functionality for handling BlockdevRefs. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com

[Qemu-block] [PATCH v2 07/13] block: Use QemuOpts in bdrv_open_common()

2015-06-10 Thread Kevin Wolf
Instead of manually parsing options and then deleting them from the options QDict, just use QemuOpts like most other places that deal with block device options. More options will be added there and then QemuOpts is a lot more managable than open-coding everything. Signed-off-by: Kevin Wolf kw

Re: [Qemu-block] [Qemu-devel] [PATCH] block: allow write-threshold on device name

2015-06-10 Thread Kevin Wolf
Am 10.06.2015 um 15:07 hat Eric Blake geschrieben: On 06/10/2015 01:57 AM, Kevin Wolf wrote: The statistic I'm interested in is the allocation of the block device (the host offset, aka wr_highest_offset 72482304 above), and NOT the usage pattern of the guest (the qcow2 protocol

[Qemu-block] [PATCH v2 09/13] block: Drain requests before swapping nodes in bdrv_swap()

2015-06-10 Thread Kevin Wolf
() instead of relying on callers to do the right thing. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block.c b/block.c index 7ba0edd..f1ceb26 100644 --- a/block.c +++ b/block.c @@ -1947,6 +1947,9 @@ void bdrv_swap(BlockDriverState

[Qemu-block] [PATCH v2 10/13] queue.h: Add QLIST_FIX_HEAD_PTR()

2015-06-10 Thread Kevin Wolf
If the head of a list has been moved to a different memory location, the le_prev link in the first list entry has to be fixed up. Provide a macro that implements this fixup. Signed-off-by: Kevin Wolf kw...@redhat.com --- include/qemu/queue.h | 6 ++ 1 file changed, 6 insertions(+) diff

[Qemu-block] [PATCH v2 06/13] block: Use macro for cache option names

2015-06-10 Thread Kevin Wolf
Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Reviewed-by: Jeff Cody jc...@redhat.com Reviewed-by: Alberto Garcia be...@igalia.com --- blockdev.c| 24 include/block/block.h | 8

[Qemu-block] [PATCH v2 12/13] block: Add BlockDriverState.inherits_from

2015-06-10 Thread Kevin Wolf
be created separately and not inherit flags from any parent. To handle reopens correctly, a node must know from which parent it inherited options. This patch adds the information to BlockDriverState. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Max

[Qemu-block] [PATCH v2 11/13] block: Add list of children to BlockDriverState

2015-06-10 Thread Kevin Wolf
-by: Kevin Wolf kw...@redhat.com --- block.c | 37 + include/block/block_int.h | 8 2 files changed, 45 insertions(+) diff --git a/block.c b/block.c index f1ceb26..e2236c3 100644 --- a/block.c +++ b/block.c @@ -1314,6 +1314,19 @@ out

Re: [Qemu-block] RFC cdrom in own thread?

2015-06-18 Thread Kevin Wolf
Am 18.06.2015 um 10:30 hat Peter Lieven geschrieben: Am 18.06.2015 um 09:45 schrieb Kevin Wolf: Am 18.06.2015 um 09:12 hat Peter Lieven geschrieben: Thread 2 (Thread 0x75550700 (LWP 2636)): #0 0x75d87aa3 in ppoll () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info

Re: [Qemu-block] [Qemu-devel] [PATCH v7 00/11] Support streaming to an intermediate layer

2015-06-18 Thread Kevin Wolf
Am 16.06.2015 um 10:51 hat Alberto Garcia geschrieben: Ping... https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg02580.html I believe our conclusion from an earlier version of the series was that we need QAPI introspection so that libvirt can detect the presence of the feature. Markus

Re: [Qemu-block] RFC cdrom in own thread?

2015-06-17 Thread Kevin Wolf
Am 16.06.2015 um 17:34 hat Stefan Hajnoczi geschrieben: On Tue, Jun 16, 2015 at 3:44 PM, Peter Lieven p...@kamp.de wrote: I wonder how difficult it would be to have the IDE CDROM run in its own thread? We usually have ISOs mounted on an NFS share as CDROM. Problem: If the NFS Share goes

Re: [Qemu-block] [PATCH v2 3/6] opts: do not print separator before first item in qemu_opts_print

2015-06-17 Thread Kevin Wolf
from a block layer perspective, so: Acked-by: Kevin Wolf kw...@redhat.com

[Qemu-block] [PULL 01/25] iotests: remove assertIsNotNone call

2015-06-12 Thread Kevin Wolf
From: John Snow js...@redhat.com RHEL6 doesn't have Python 2.7, so replace this call with assertNotEqual(x, None) which will work just as well. Reported-by: Kevin Wolf kw...@redhat.com Signed-off-by: John Snow js...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Kevin

[Qemu-block] [PULL 07/25] vmdk: Use vmdk_find_index_in_cluster everywhere

2015-06-12 Thread Kevin Wolf
From: Fam Zheng f...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block/vmdk.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 3e4d84b

[Qemu-block] [PULL 03/25] qcow2: Set MIN_L2_CACHE_SIZE to 2

2015-06-12 Thread Kevin Wolf
...@suse.de Reviewed-by: Alberto Garcia be...@igalia.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/qcow2.h b/block/qcow2.h index 0076512..aa20022 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -62,7

[Qemu-block] [PULL 06/25] vmdk: Fix index_in_cluster calculation in vmdk_co_get_block_status

2015-06-12 Thread Kevin Wolf
From: Fam Zheng f...@redhat.com It has the similar issue with b1649fae49a8. Since the calculation is repeated for a few times already, introduce a function so it can be reused. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Signed-off-by: Kevin Wolf kw

[Qemu-block] [PULL 15/25] check-qdict: Test cases for new functions

2015-06-12 Thread Kevin Wolf
This adds test cases for the following new QDict functions: * qdict_array_entries() * qdict_set_default_str() * qdict_copy_default() Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- tests/check-qdict.c | 67

[Qemu-block] [PULL 13/25] qdict: Add qdict_array_entries()

2015-06-12 Thread Kevin Wolf
. Quorum) and are to be converted to using bdrv_open_image() as the standard interface for opening child nodes. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- include/qapi/qmp/qdict.h | 1 + qobject/qdict.c | 78

[Qemu-block] [PULL 14/25] qdict: Add qdict_{set,copy}_default()

2015-06-12 Thread Kevin Wolf
for each option. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- include/qapi/qmp/qdict.h | 3 +++ qobject/qdict.c | 33 + 2 files changed, 36 insertions(+) diff --git a/include

[Qemu-block] [PULL 25/25] block: Fix reopen flag inheritance

2015-06-12 Thread Kevin Wolf
. because it was created separately and then only referenced, it must not inherit flags on reopen either, so check the inherited_from field before propagation the reopen down. VMDK already reopened its extents manually; this code can now be dropped. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed

[Qemu-block] [PULL 00/25] Block layer core and image format patches

2015-06-12 Thread Kevin Wolf
in bdrv_dirty_bitmap_truncate block: Change bitmap truncate conditional to assertion Kevin Wolf (14): raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size qdict: Add qdict_array_entries() qdict: Add qdict_{set,copy}_default() check-qdict: Test cases for new functions quorum

[Qemu-block] [PULL 02/25] qemu-iotests: Fix 128 if sudo required

2015-06-12 Thread Kevin Wolf
From: Fam Zheng f...@redhat.com If passwordless sudo works, use it in the qemu-io cmd. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- tests/qemu-iotests/128 | 4 +++- 1 file changed, 3 insertions(+), 1

[Qemu-block] [PULL 10/25] block: Change bitmap truncate conditional to assertion

2015-06-12 Thread Kevin Wolf
assert that this cannot happen. Suggested-by: Kevin Wolf kw...@redhat.com Signed-off-by: John Snow js...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/block.c b

[Qemu-block] [PULL 04/25] iotests: qcow2 COW with minimal L2 cache size

2015-06-12 Thread Kevin Wolf
...@redhat.com Reviewed-by: Alberto Garcia be...@igalia.com Signed-off-by: Kevin Wolf kw...@redhat.com --- tests/qemu-iotests/103 | 10 ++ tests/qemu-iotests/103.out | 5 + 2 files changed, 15 insertions(+) diff --git a/tests/qemu-iotests/103 b/tests/qemu-iotests/103 index ccab551..fa9a3c1

[Qemu-block] [PULL 17/25] vmdk: Use bdrv_open_image()

2015-06-12 Thread Kevin Wolf
Besides standardising on a single interface for opening child nodes, this patch allows the user to specify options to individual extent nodes. Overriding file names isn't possible with this yet, so it's of limited usefulness, but still a step forward. Signed-off-by: Kevin Wolf kw...@redhat.com

[Qemu-block] [PULL 18/25] block: Use macro for cache option names

2015-06-12 Thread Kevin Wolf
Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Reviewed-by: Jeff Cody jc...@redhat.com Reviewed-by: Alberto Garcia be...@igalia.com --- blockdev.c| 24 include/block/block.h | 8

[Qemu-block] [PULL 08/25] raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size

2015-06-12 Thread Kevin Wolf
EOF must be found. Treating a hole as data is safe, so this patch rounds the calculated number of data sectors up, so that a partial sector at EOF is treated as a full data sector. This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1229394 Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed

[Qemu-block] [PULL 19/25] block: Use QemuOpts in bdrv_open_common()

2015-06-12 Thread Kevin Wolf
Instead of manually parsing options and then deleting them from the options QDict, just use QemuOpts like most other places that deal with block device options. More options will be added there and then QemuOpts is a lot more manageable than open-coding everything. Signed-off-by: Kevin Wolf kw

[Qemu-block] [PULL 23/25] block: Add list of children to BlockDriverState

2015-06-12 Thread Kevin Wolf
-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- block.c | 37 + include/block/block_int.h | 8 2 files changed, 45 insertions(+) diff --git a/block.c b/block.c index

[Qemu-block] [PULL 11/25] block: driver should override flags in bdrv_open()

2015-06-12 Thread Kevin Wolf
. Signed-off-by: Max Reitz mre...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c| 49 +- tests/qemu-iotests/051 | 1 - tests/qemu-iotests/051.out | 3 --- 3 files changed, 31 insertions(+), 22 deletions

[Qemu-block] [PULL 16/25] quorum: Use bdrv_open_image()

2015-06-12 Thread Kevin Wolf
Besides standardising on a single interface for opening child nodes, this simplifies the .bdrv_open() implementation of the quorum block driver by using block layer functionality for handling BlockdevRefs. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com

[Qemu-block] [PULL 22/25] queue.h: Add QLIST_FIX_HEAD_PTR()

2015-06-12 Thread Kevin Wolf
If the head of a list has been moved to a different memory location, the le_prev link in the first list entry has to be fixed up. Provide a macro that implements this fixup. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Max Reitz mre

[Qemu-block] [PULL 21/25] block: Drain requests before swapping nodes in bdrv_swap()

2015-06-12 Thread Kevin Wolf
() instead of relying on callers to do the right thing. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- block.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block.c b/block.c index 3c04446..9a860f1 100644

[Qemu-block] [PULL 20/25] block: Move flag inheritance to bdrv_open_inherit()

2015-06-12 Thread Kevin Wolf
Instead of letting every caller of bdrv_open() determine the right flags for its child node manually and pass them to the function, pass the parent node and the role of the newly opened child (like backing file, protocol layer, etc.). Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric

[Qemu-block] [PULL 24/25] block: Add BlockDriverState.inherits_from

2015-06-12 Thread Kevin Wolf
be created separately and not inherit flags from any parent. To handle reopens correctly, a node must know from which parent it inherited options. This patch adds the information to BlockDriverState. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Max

Re: [Qemu-block] [PATCH v6 01/13] block: Add op blocker type device IO

2015-05-27 Thread Kevin Wolf
Am 26.05.2015 um 16:24 hat Max Reitz geschrieben: On 26.05.2015 16:22, Kevin Wolf wrote: Am 21.05.2015 um 08:42 hat Fam Zheng geschrieben: It blocks device IO. What I'm missing here is a description of the case that it protects against. Blocking device I/O doesn't sound like a valid thing

Re: [Qemu-block] [PATCH 08/34] block: Add list of children to BlockDriverState

2015-05-27 Thread Kevin Wolf
Am 08.05.2015 um 19:21 hat Kevin Wolf geschrieben: This allows iterating over all children of a given BDS, not only including bs-file and bs-backing_hd, but also driver-specific ones like VMDK extents or Quorum children. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c

Re: [Qemu-block] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time

2015-05-29 Thread Kevin Wolf
Am 28.05.2015 um 21:41 hat Eric Blake geschrieben: On 05/28/2015 09:23 AM, Max Reitz wrote: Can we mark the parameter optional, and only provide it when it is non-zero? That way, qemu-img (which cannot set an interval) will not report it, and the only time it will appear is if it was set

Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/8] fdc: Introduce fdctrl-phase

2015-05-29 Thread Kevin Wolf
Am 29.05.2015 um 11:38 hat Dr. David Alan Gilbert geschrieben: * Kevin Wolf (kw...@redhat.com) wrote: Am 29.05.2015 um 10:33 hat Dr. David Alan Gilbert geschrieben: * Markus Armbruster (arm...@redhat.com) wrote: Dr. David Alan Gilbert dgilb...@redhat.com writes: * John Snow (js

Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/8] fdc: Introduce fdctrl-phase

2015-05-29 Thread Kevin Wolf
Am 29.05.2015 um 10:33 hat Dr. David Alan Gilbert geschrieben: * Markus Armbruster (arm...@redhat.com) wrote: Dr. David Alan Gilbert dgilb...@redhat.com writes: * John Snow (js...@redhat.com) wrote: On 05/21/2015 09:19 AM, Kevin Wolf wrote: The floppy controller spec

Re: [Qemu-block] [Qemu-devel] [PATCH 11/34] block: Allow references for backing files

2015-05-27 Thread Kevin Wolf
Am 21.05.2015 um 07:47 hat Wen Congyang geschrieben: On 05/09/2015 01:21 AM, Kevin Wolf wrote: For bs-file, using references to existing BDSes has been possible for a while already. This patch enables the same for bs-backing_hd. 1. We reference to an existing BDSes, and some disk uses

Re: [Qemu-block] [Qemu-devel] [PATCH 11/34] block: Allow references for backing files

2015-05-27 Thread Kevin Wolf
Am 27.05.2015 um 14:31 hat Kevin Wolf geschrieben: Am 21.05.2015 um 07:47 hat Wen Congyang geschrieben: On 05/09/2015 01:21 AM, Kevin Wolf wrote: For bs-file, using references to existing BDSes has been possible for a while already. This patch enables the same for bs-backing_hd. 1

Re: [Qemu-block] [Qemu-devel] [PATCH] i386: drop FDC in pc-q35-2.4+ if neither it nor floppy drives are wanted

2015-05-28 Thread Kevin Wolf
Copying John Snow (FDC maintainer) and the qemu-block list. Am 27.05.2015 um 23:06 hat Laszlo Ersek geschrieben: It is Very annoying to carry forward an outdatEd coNtroller with a mOdern Machine type. Hence, let us not instantiate the FDC when all of the following apply: - the machine type

Re: [Qemu-block] [Qemu-devel] [PATCH 11/34] block: Allow references for backing files

2015-05-28 Thread Kevin Wolf
Am 28.05.2015 um 02:59 hat Wen Congyang geschrieben: On 05/27/2015 08:31 PM, Kevin Wolf wrote: Am 21.05.2015 um 07:47 hat Wen Congyang geschrieben: On 05/09/2015 01:21 AM, Kevin Wolf wrote: For bs-file, using references to existing BDSes has been possible for a while already. This patch

Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type device IO

2015-05-28 Thread Kevin Wolf
Am 28.05.2015 um 04:49 hat Fam Zheng geschrieben: On Wed, 05/27 12:43, Paolo Bonzini wrote: On 27/05/2015 12:10, Kevin Wolf wrote: Am 27.05.2015 um 11:50 hat Paolo Bonzini geschrieben: On 27/05/2015 11:07, Kevin Wolf wrote: This is the first part of what's troubling me

<    1   2   3   4   5   6   7   8   9   10   >