Re: [Qemu-block] [Qemu-devel] [PATCH 05/11] block: add delayed bitmap successor cleanup

2015-03-18 Thread Max Reitz
On 2015-03-17 at 18:46, John Snow wrote: On 03/17/2015 02:44 PM, Max Reitz wrote: On 2015-03-04 at 23:15, John Snow wrote: [snip] +} +} + +BdrvDirtyBitmap *bdrv_dirty_bitmap_decref(BlockDriverState *bs, I don't know whether I'm that content with the name chosen, because you're

Re: [Qemu-block] [Qemu-devel] [PATCH 09/11] iotests: test 124 - drive object refactoring

2015-03-18 Thread Max Reitz
On 2015-03-17 at 19:40, John Snow wrote: On 03/17/2015 04:44 PM, Max Reitz wrote: On 2015-03-04 at 23:15, John Snow wrote: The original test was not particularly good about keeping the relationships between bitmaps, drives, and images very explicit, so this patch adds an explicit 'drive

Re: [Qemu-block] [Qemu-devel] [PATCH 07/11] block: drive_backup transaction callback support

2015-03-18 Thread Max Reitz
On 2015-03-17 at 19:27, John Snow wrote: On 03/17/2015 03:49 PM, Max Reitz wrote: On 2015-03-04 at 23:15, John Snow wrote: This patch actually implements the transactional callback system for the drive_backup transaction. (1) We manually pick up a reference to the bitmap if present to allow

Re: [Qemu-block] [2.4 PATCH v3 11/19] qmp: add block-dirty-bitmap-clear

2015-03-16 Thread Max Reitz
On 2015-03-13 at 14:30, John Snow wrote: Add bdrv_clear_dirty_bitmap and a matching QMP command, qmp_block_dirty_bitmap_clear that enables a user to reset the bitmap attached to a drive. This allows us to reset a bitmap in the event of a full drive backup. Signed-off-by: John Snow

[Qemu-block] [PATCH v8 08/10] qcow2: Invoke refcount order amendment function

2015-03-18 Thread Max Reitz
Make use of qcow2_change_refcount_order() to support changing the refcount order with qemu-img amend. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com --- block/qcow2.c | 44

[Qemu-block] [PATCH v8 03/10] qcow2: Use error_report() in qcow2_amend_options()

2015-03-18 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com --- block/qcow2.c | 14 ++ tests/qemu-iotests/061.out | 14 +++--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git

Re: [Qemu-block] [2.4 PATCH v3 16/19] hbitmap: truncate tests

2015-03-17 Thread Max Reitz
On 2015-03-13 at 14:30, John Snow wrote: The general approach is to set bits close to the boundaries of where we are truncating and ensure that everything appears to have gone OK. We test growing and shrinking by different amounts: - Less than the granularity - Less than the granularity, but

Re: [Qemu-block] [2.4 PATCH v3 06/19] hbitmap: cache array lengths

2015-03-16 Thread Max Reitz
js...@redhat.com --- util/hbitmap.c | 4 1 file changed, 4 insertions(+) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [Qemu-devel] [2.4 PATCH v3 04/19] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-03-16 Thread Max Reitz
On 2015-03-16 at 16:53, John Snow wrote: On 03/16/2015 04:44 PM, Max Reitz wrote: On 2015-03-13 at 14:30, John Snow wrote: The new command pair is added to manage a user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same device, but different devices

Re: [Qemu-block] [Qemu-devel] [2.4 PATCH v3 16/19] hbitmap: truncate tests

2015-03-17 Thread Max Reitz
On 2015-03-17 at 13:44, John Snow wrote: On 03/17/2015 01:28 PM, Max Reitz wrote: On 2015-03-17 at 13:21, John Snow wrote: On 03/17/2015 10:53 AM, Max Reitz wrote: On 2015-03-13 at 14:30, John Snow wrote: The general approach is to set bits close to the boundaries of where we

Re: [Qemu-block] [Qemu-devel] [2.4 PATCH v3 16/19] hbitmap: truncate tests

2015-03-17 Thread Max Reitz
On 2015-03-17 at 13:21, John Snow wrote: On 03/17/2015 10:53 AM, Max Reitz wrote: On 2015-03-13 at 14:30, John Snow wrote: The general approach is to set bits close to the boundaries of where we are truncating and ensure that everything appears to have gone OK. We test growing and shrinking

Re: [Qemu-block] [PATCH 06/11] qmp: Add an implementation wrapper for qmp_drive_backup

2015-03-17 Thread Max Reitz
.) Just call it do_drive_backup() or something. Other than that, I'm okay with a forward-declaration; if you want to move it, but I'd be fine with moving the code, too. With _drive_backup() being called do_drive_backup(): Reviewed-by: Max Reitz mre...@redhat.com + bool

Re: [Qemu-block] [PATCH 07/11] block: drive_backup transaction callback support

2015-03-17 Thread Max Reitz
On 2015-03-04 at 23:15, John Snow wrote: This patch actually implements the transactional callback system for the drive_backup transaction. (1) We manually pick up a reference to the bitmap if present to allow its cleanup to be delayed until after all drive_backup jobs launched by the

[Qemu-block] [PATCH v2 1/3] iotests: Make nested read in 072 and 089 read-only

2015-03-19 Thread Max Reitz
-off-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/072 | 2 +- tests/qemu-iotests/089 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/072 b/tests/qemu-iotests/072 index e4a723d..7bcf9f8 100755 --- a/tests/qemu-iotests/072 +++ b/tests/qemu-iotests/072

Re: [Qemu-block] [PATCH v4 16/20] hbitmap: truncate tests

2015-03-20 Thread Max Reitz
, but across a boundary - Less than sizeof(unsigned long) - Less than sizeof(unsigned long), but across a ulong boundary - More than sizeof(unsigned long) Signed-off-by: John Snow js...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- tests/test-hbitmap.c | 255

Re: [Qemu-block] [PATCH v4 17/20] iotests: add invalid input incremental backup tests

2015-03-20 Thread Max Reitz
100644 tests/qemu-iotests/124 create mode 100644 tests/qemu-iotests/124.out Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH v4 00/20] block: transactionless incremental backup series

2015-03-20 Thread Max Reitz
On 2015-03-20 at 15:16, John Snow wrote: I've run out of cheeky jokes for my cover letters. This patchset enables the in-memory part of the incremental backup feature, without transactional support. Support for transactions was separated into a separate series which is also now available

Re: [Qemu-block] [PATCH v4 20/20] iotests: add incremental backup failure recovery test

2015-03-20 Thread Max Reitz
); } - return bitmap; fail: This doesn't look like it belongs here... With that hunk removed (whether by maintainer or by you): Reviewed-by: Max Reitz mre...@redhat.com

[Qemu-block] [PATCH v8 09/10] qcow2: Point to amend function in check

2015-03-18 Thread Max Reitz
a completely new copy of the image in this case. Alternatively, we may want to give the user a way of manually removing the corrupt flag, maybe through qemu-img amend, but this is not part of this patch. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed

Re: [Qemu-block] [PATCH v3 05/10] block: add transactional callbacks feature

2015-04-23 Thread Max Reitz
, int ret), not just block job callbacks. Signed-off-by: John Snow js...@redhat.com --- blockdev.c | 183 +++-- 1 file changed, 179 insertions(+), 4 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH v3 08/10] qmp: Add an implementation wrapper for qmp_drive_backup

2015-04-23 Thread Max Reitz
the callback and closure yet. Signed-off-by: John Snow js...@redhat.com --- blockdev.c | 78 +++--- 1 file changed, 59 insertions(+), 19 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH v3 10/10] iotests: 124 - transactional failure test

2015-04-23 Thread Max Reitz
--- tests/qemu-iotests/124 | 120 - tests/qemu-iotests/124.out | 4 +- 2 files changed, 121 insertions(+), 3 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH v3 09/10] block: drive_backup transaction callback support

2015-04-23 Thread Max Reitz
...@redhat.com --- block/backup.c| 9 blockdev.c| 53 --- include/block/block_int.h | 8 +++ 3 files changed, 67 insertions(+), 3 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH v3 02/10] iotests: add transactional incremental backup test

2015-04-23 Thread Max Reitz
++-- 2 files changed, 56 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH 08/11] qemu-iotests: add no-op streaming test

2015-04-24 Thread Max Reitz
On 24.04.2015 15:55, Alberto Garcia wrote: On Fri 24 Apr 2015 03:19:54 PM CEST, Max Reitz wrote: This patch updates test_stream_partial() to test that the block-stream operation never copies data from the image specified as base. I think it would be better to add this as an own test case

Re: [Qemu-block] [PATCH 2/8] block: allow block jobs in any arbitrary node

2015-04-22 Thread Max Reitz
/qerror.h | 3 --- qapi/block-core.json | 20 ++-- 6 files changed, 35 insertions(+), 35 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH 8/8] qemu-iotests: test streaming to an intermediate layer

2015-04-22 Thread Max Reitz
++-- 2 files changed, 19 insertions(+), 3 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH 08/11] qemu-iotests: add no-op streaming test

2015-04-24 Thread Max Reitz
('-f', iotests.imgfmt, '-c', 'map', test_img) Oh, that was too obvious. :-) Reviewed-by: Max Reitz mre...@redhat.com + +# This is a no-op: no data should ever be copied from the base image +result = self.vm.qmp('block-stream', device='drive0', base=mid_img) +self.assert_qmp

Re: [Qemu-block] [PATCH v8 00/10] qcow2: Allow refcount_bits amendment

2015-04-24 Thread Max Reitz
On 18.03.2015 21:56, Max Reitz wrote: This series adds support to qemu for changing the refcount_bits option of an existing qcow2 file through the qemu-img amend command. Originally (up until v7), this series was called qcow2: Support refcount orders != 4, but by now that support has already

[Qemu-block] [PATCH v4 01/17] qcow2: Add new overlap check functions

2015-05-04 Thread Max Reitz
is kept but no longer being considered part of the cache. Therefore, the fragment list is only used as the background representation to save memory, whereas the bitmap is used whenever possible. Signed-off-by: Max Reitz mre...@redhat.com --- block/Makefile.objs | 3 +- block/qcow2-overlap.c

[Qemu-block] [PATCH v4 00/17] qcow2: Add new overlap check functions

2015-05-04 Thread Max Reitz
overlap structure memory size options' 016/17:[down] 'qapi: Expose new qcow2 overlap check options' 017/17:[down] 'iotests: Test qcow2's overlap check memory limit' Max Reitz (17): qcow2: Add new overlap check functions qcow2: Pull up overlap check option evaluation qcow2: Create metadata list

[Qemu-block] [PATCH v4 03/17] qcow2: Create metadata list

2015-05-04 Thread Max Reitz
Create and destroy the metadata list on creation and destruction of a qcow2 BDS, respectively. Skip creation if no overlap checks should be performed. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/qcow2.c b

[Qemu-block] [PATCH v4 04/17] qcow2/overlaps: Protect image header

2015-05-04 Thread Max Reitz
Enter the image header into the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block/qcow2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index b15a612

[Qemu-block] [PATCH v4 05/17] qcow2/overlaps: Protect refcount table

2015-05-04 Thread Max Reitz
Keep track of the refcount table in the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block/qcow2-refcount.c | 18 ++ block/qcow2.c | 4 2 files changed, 22

[Qemu-block] [PATCH v4 10/17] qcow2/overlaps: Protect inactive L1 tables

2015-05-04 Thread Max Reitz
Keep track of the inactive L1 tables in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block/qcow2-snapshot.c | 25 + 1 file changed, 25 insertions(+) diff --git

[Qemu-block] [PATCH v4 11/17] qcow2/overlaps: Protect inactive L2 tables

2015-05-04 Thread Max Reitz
Keep track of the inactive L2 tables in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-refcount.c | 20 block/qcow2-snapshot.c | 43 --- 2 files changed

[Qemu-block] [PATCH v4 15/17] qcow2: Add overlap structure memory size options

2015-05-04 Thread Max Reitz
Add runtime options to qcow2 to control the size of the structures used for metadata overlap prevention (one option to control the size of the bitmap cache, another one to control the total memory size limit). Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 35

[Qemu-block] [PATCH v4 13/17] qcow2/overlaps: Add memory limit reached event

2015-05-04 Thread Max Reitz
Later, a mechanism to set a limit on how much memory may be used for the overlap prevention structures will be introduced. If that limit is about to be exceeded, a QMP event should be emitted. This very event is specified by this patch. Signed-off-by: Max Reitz mre...@redhat.com --- docs/qmp/qmp

[Qemu-block] [PATCH v4 07/17] qcow2/overlaps: Protect active L1 table

2015-05-04 Thread Max Reitz
Keep track of the active L1 table in the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block/qcow2-cluster.c | 11 +++ block/qcow2-snapshot.c | 10 ++ block/qcow2.c

[Qemu-block] [PATCH v4 06/17] qcow2/overlaps: Protect refcount blocks

2015-05-04 Thread Max Reitz
Keep track of the refcount blocks in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block/qcow2-refcount.c | 38 +- 1 file changed, 37 insertions

[Qemu-block] [PATCH v4 12/17] qcow2: Use new metadata overlap check function

2015-05-04 Thread Max Reitz
Make the static new overlap check function global and drop the old function. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-overlap.c | 8 +--- block/qcow2-refcount.c | 120 - 2 files changed, 2 insertions(+), 126 deletions(-) diff

[Qemu-block] [PATCH v4 14/17] qcow2/overlaps: Add memory usage limit

2015-05-04 Thread Max Reitz
This adds an adjustable limit for the total memory usage of the overlap prevention structures. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-overlap.c | 145 +++--- block/qcow2.c | 2 +- block/qcow2.h | 2 +- 3 files

[Qemu-block] [PATCH v4 17/17] iotests: Test qcow2's overlap check memory limit

2015-05-04 Thread Max Reitz
This patch adds some test cases for the memory limit concerning the in-memory structures used to detect and prevent accidental metadata overlaps. Signed-off-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/060 | 222 + tests/qemu-iotests/060

[Qemu-block] [PATCH v4 16/17] qapi: Expose new qcow2 overlap check options

2015-05-04 Thread Max Reitz
Expose the two new options for controlling the memory usage of the overlap check implementation via QAPI. Signed-off-by: Max Reitz mre...@redhat.com --- qapi/block-core.json | 37 + 1 file changed, 37 insertions(+) diff --git a/qapi/block-core.json b/qapi

Re: [Qemu-block] [PATCH v4 16/17] qapi: Expose new qcow2 overlap check options

2015-05-06 Thread Max Reitz
On 04.05.2015 21:39, Eric Blake wrote: On 05/04/2015 01:15 PM, Max Reitz wrote: Expose the two new options for controlling the memory usage of the overlap check implementation via QAPI. Signed-off-by: Max Reitz mre...@redhat.com --- qapi/block-core.json | 37

Re: [Qemu-block] [PATCH v4 13/17] qcow2/overlaps: Add memory limit reached event

2015-05-06 Thread Max Reitz
On 04.05.2015 21:32, Eric Blake wrote: On 05/04/2015 01:15 PM, Max Reitz wrote: Later, a mechanism to set a limit on how much memory may be used for the overlap prevention structures will be introduced. If that limit is about to be exceeded, a QMP event should be emitted. This very event

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

2015-05-06 Thread Max Reitz
On 06.05.2015 18:20, Paolo Bonzini wrote: On 06/05/2015 18:12, Max Reitz wrote: I very much think it would be worth fixing, if there wasn't the problem with legitimate use cases throwing unnecessary warnings. Right. I remember having a discussion with Kevin about this series (v1) regarding

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

2015-05-06 Thread Max Reitz
On 06.05.2015 17:30, Paolo Bonzini wrote: On 06/05/2015 15:04, Max Reitz wrote: Introducing a warning for a normal QEMU invocation is a bit weird. What is the point of this series? Were users confused that they hit ENOSPC? Users were confused when exporting a qcow2 image using nbd-server

Re: [Qemu-block] [Qemu-devel] [PATCH] use bdrv_flush to provide barrier semantic in block/vdi.c for metadata updates

2015-05-06 Thread Max Reitz
CC-ing qemu-block and Stefan Weil (maintainer of vdi). On 06.05.2015 19:23, phoeagon wrote: Thanks for your input. So I changed it to: 1. Only call bdrv_flush when bdrv_pwrite was successful 2. Only if bdrv_flush was unsuccessful that the return value of vdi_co_write is updated. One of both

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

2015-05-08 Thread Max Reitz
On 08.05.2015 15:14, Stefan Hajnoczi wrote: On Thu, May 07, 2015 at 01:22:26PM -0400, John Snow wrote: On 05/07/2015 10:54 AM, Stefan Hajnoczi wrote: On Wed, Apr 22, 2015 at 08:04:44PM -0400, John Snow wrote: +static void block_dirty_bitmap_clear_prepare(BlkTransactionState *common, +

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

2015-05-08 Thread Max Reitz
| 55 -- block/qcow2-cluster.c | 12 +-- block/qcow2-refcount.c | 8 +--- block/qcow2.h | 3 ++- 4 files changed, 39 insertions(+), 39 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH 4/7] qcow2: remove qcow2_cache_find_entry_to_replace()

2015-05-08 Thread Max Reitz
-cache.c | 45 - 1 file changed, 16 insertions(+), 29 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH 3/7] qcow2: use an LRU algorithm to replace entries from the L2 cache

2015-05-08 Thread Max Reitz
, /* Give the table some hits for the start so that it won't be replaced * immediately. The number 32 is completely arbitrary. */ -c-entries[i].cache_hits = 32; c-entries[i].offset = offset; With the coment removed: Reviewed-by: Max Reitz mre...@redhat.com /* And return

Re: [Qemu-block] [PATCH 5/7] qcow2: use a hash to look for entries in the L2 cache

2015-05-08 Thread Max Reitz
On 06.05.2015 15:39, Alberto Garcia wrote: The current cache algorithm traverses the array starting always from the beginning, so the average number of comparisons needed to perform a lookup is proportional to the size of the array. By using a hash of the offset as the starting point, lookups

Re: [Qemu-block] [PATCH 6/7] qcow2: make qcow2_cache_put() a void function

2015-05-08 Thread Max Reitz
On 06.05.2015 15:39, Alberto Garcia wrote: This function never receives an invalid table pointer, so we can make it void and remove all the error checking code. Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2-cache.c| 7 +-- block/qcow2-cluster.c | 50

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

2015-05-11 Thread Max Reitz
); +qdict_put_obj(dst, key, val); +} +} + +/** + * qdict_set_default_str(): If no entry mapped by 'key' exists in 'dst' yet, + * 'val' is put there, with the QDict taking the reference. Otherwise, the + * refcount of 'val' is decreased. With the comment fixed: Reviewed-by: Max Reitz mre...@redhat.com

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

2015-05-11 Thread Max Reitz
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 reason for not making it part of the BLOCK_OPT_* macros in

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

2015-05-11 Thread Max Reitz
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...@redhat.com --- block.c | 27

Re: [Qemu-block] [PATCH 09/34] block: Add BlockDriverState.inherits_from

2015-05-11 Thread Max Reitz
| 17 + include/block/block_int.h | 4 2 files changed, 21 insertions(+) Reviewed-by: Max Reitz mre...@redhat.com

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

2015-05-08 Thread Max Reitz
On 08.05.2015 12:08, Kevin Wolf wrote: Am 07.05.2015 um 16:50 hat Paolo Bonzini geschrieben: On 07/05/2015 16:34, Kevin Wolf wrote: 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

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

2015-05-08 Thread Max Reitz
that bdrv_flush is called. Signed-off-by: Zhe Qiu phoea...@gmail.com --- block/vdi.c | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Max Reitz mre...@redhat.com Thanks! diff --git a/block/vdi.c b/block/vdi.c index 7642ef3..dfe8ade 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -713,6 +713,9

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

2015-05-13 Thread Max Reitz
On 08.05.2015 19:21, 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-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2.c | 135

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

2015-05-13 Thread Max Reitz
+- 1 file changed, 76 insertions(+), 59 deletions(-) Now seeing that the comment I was complaining about is removed in patch 16: Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH 15/34] qcow2: Move qcow2_update_options() call up

2015-05-13 Thread Max Reitz
*bs, QDict *options, int flags, goto fail; } +/* Enable lazy_refcounts according to image and command line options */ Again, I find the comment not very fitting. But the motion itself is okay, so regardless of what comment you are moving here: Reviewed-by: Max Reitz mre

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

2015-05-11 Thread Max Reitz
On 08.05.2015 19:21, 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. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 42 --

Re: [Qemu-block] [PATCH 12/34] block: Allow specifying driver-specific options to reopen

2015-05-11 Thread Max Reitz
this function generally returned -1 on error, but okay... I don't see anything truly wrong, though, so with or without assert() and the different condition: Reviewed-by: Max Reitz mre...@redhat.com +goto error; +} +} while ((entry = qdict_next(reopen_state-options

Re: [Qemu-block] [PATCH 17/34] qcow2: Leave s unchanged on qcow2_update_options() failure

2015-05-13 Thread Max Reitz
, *opt_overlap_check_template; int overlap_check_template = 0; uint64_t l2_cache_size, refcount_cache_size; +Qcow2Cache* l2_table_cache; +Qcow2Cache* refcount_block_cache; ;-) Because patch 18 exists: Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH 18/34] qcow2: Fix memory leak in qcow2_update_options() error path

2015-05-13 Thread Max Reitz
On 13.05.2015 14:02, Kevin Wolf wrote: Am 13.05.2015 um 13:52 hat Max Reitz geschrieben: On 08.05.2015 19:21, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b

Re: [Qemu-block] [PATCH 19/34] qcow2: Make qcow2_update_options() suitable for transactions

2015-05-13 Thread Max Reitz
been moved to *s. Reviewed-by: Max Reitz mre...@redhat.com + +static int qcow2_update_options(BlockDriverState *bs, QDict *options, +int flags, Error **errp) +{ +Qcow2ReopenState r = {}; +int ret; + +ret = qcow2_update_options_prepare(bs, r, options

Re: [Qemu-block] [PATCH 23/34] block: Pass driver-specific options to .bdrv_refresh_filename()

2015-05-13 Thread Max Reitz
deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

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

2015-05-13 Thread Max Reitz
On 08.05.2015 19:21, Kevin Wolf wrote: 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:

Re: [Qemu-block] [PATCH 25/34] block: Allow specifying child options in reopen

2015-05-13 Thread Max Reitz
++-- 1 file changed, 10 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH 21/34] block: Consider all block layer options in append_open_options

2015-05-13 Thread Max Reitz
--- block.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH 26/34] block: reopen: Document option precedence and refactor accordingly

2015-05-13 Thread Max Reitz
-by: Kevin Wolf kw...@redhat.com --- block.c | 39 +-- 1 file changed, 33 insertions(+), 6 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH 28/34] block: Introduce bs-explicit_options

2015-05-15 Thread Max Reitz
On 08.05.2015 19:22, Kevin Wolf wrote: bs-options doesn't only contain options that the user explicitly requested, but also option that were derived from flags, the filename or inherited from the parent node. For reopen, it is important to know the difference because reopening the parent can

Re: [Qemu-block] [PATCH v4 01/11] qapi: Add transaction support to block-dirty-bitmap operations

2015-05-18 Thread Max Reitz
+- docs/bitmaps.md | 6 +-- include/block/block.h | 1 - include/block/block_int.h | 3 ++ qapi-schema.json | 6 ++- 6 files changed, 139 insertions(+), 10 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH v3 04/12] virtio-blk: Move complete_request to 'ops' structure

2015-05-18 Thread Max Reitz
- hw/block/virtio-blk.c | 8 ++-- include/hw/virtio/virtio-blk.h | 9 +++-- 3 files changed, 21 insertions(+), 9 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH v3 03/12] block-backend: Add blk_op_blocker_add_notifier

2015-05-18 Thread Max Reitz
On 15.05.2015 08:04, Fam Zheng wrote: Forward the call to bdrv_op_blocker_add_notifier. Signed-off-by: Fam Zheng f...@redhat.com --- block/block-backend.c | 6 ++ include/sysemu/block-backend.h | 2 ++ 2 files changed, 8 insertions(+) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH v3 02/12] block: Add op blocker notifier list

2015-05-18 Thread Max Reitz
of some type is + * added to bs, or when the last blocker is removed. The notifier handler + * should receive a BlockOpEvent data. + * + * Caller must hold bs-aio_context; the notifier handler is also called with + * it hold. *held (I think) With that fixed: Reviewed-by: Max Reitz mre

Re: [Qemu-block] [PATCH v4 11/11] qmp-commands.hx: Update the supported 'transaction' operations

2015-05-18 Thread Max Reitz
On 12.05.2015 01:04, John Snow wrote: From: Kashyap Chamarthy kcham...@redhat.com Although the canonical source of reference for QMP commands is qapi-schema.json, for consistency's sake, update qmp-commands.hx to state the list of supported transactionable operations, namely: drive-backup

Re: [Qemu-block] [PATCH v3 05/12] virtio-blk: Don't handle output when there is device IO op blocker

2015-05-18 Thread Max Reitz
On 15.05.2015 08:04, Fam Zheng wrote: virtio-blk now listens to op blocker change of the associated block backend. Up on setting op blocker on BLOCK_OP_TYPE_DEVICE_IO: non-dataplane: 1) Set VirtIOBlock.paused 2) In virtio_blk_handle_output, do nothing if VirtIOBlock.paused

Re: [Qemu-block] [PATCH v3 06/12] nbd-server: Clear can_read when device io blocker is set

2015-05-18 Thread Max Reitz
On 15.05.2015 08:04, Fam Zheng wrote: So that NBD export cannot submit IO during bdrv_drain_all(). Signed-off-by: Fam Zheng f...@redhat.com --- nbd.c | 18 ++ 1 file changed, 18 insertions(+) But can_read is not cleared until nbd_update_can_read() is called, which is only

Re: [Qemu-block] [PATCH 32/34] qemu-iotests: Try setting cache mode for children

2015-05-15 Thread Max Reitz
-iotests/051.out | 63 ++ 2 files changed, 75 insertions(+) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH 31/34] block: Move cache options into options QDict

2015-05-15 Thread Max Reitz
On 08.05.2015 19:22, Kevin Wolf wrote: This adds the cache mode options to the QDict, so that they can be specified for child nodes (e.g. backing.cache.direct=off). The cache modes are not removed from the flags at this point; instead, options and flags are kept in sync. If the user specifies

Re: [Qemu-block] [PATCH 4/6] block: Support streaming to an intermediate layer

2015-04-17 Thread Max Reitz
On 16.04.2015 16:30, Alberto Garcia wrote: On Wed 15 Apr 2015 06:09:18 PM CEST, Max Reitz mre...@redhat.com wrote: +orig_bs_flags = bdrv_get_flags(bs); +if (!(orig_bs_flags BDRV_O_RDWR)) { I feel like we don't want to do this if we're not streaming to an intermediate layer

Re: [Qemu-block] [PATCH v2 01/11] qapi: Add transaction support to block-dirty-bitmap operations

2015-04-17 Thread Max Reitz
+++- 2 files changed, 105 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH v5 20/21] iotests: add incremental backup failure recovery test

2015-04-17 Thread Max Reitz
deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH v5 21/21] iotests: add incremental backup granularity tests

2015-04-17 Thread Max Reitz
(+), 13 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH v2 02/11] iotests: add transactional incremental backup test

2015-04-17 Thread Max Reitz
On 27.03.2015 20:19, John Snow wrote: Test simple usage cases for using transactions to create and synchronize incremental backups. Signed-off-by: John Snow js...@redhat.com --- tests/qemu-iotests/124 | 51 ++ tests/qemu-iotests/124.out | 4

Re: [Qemu-block] [PATCH v5 10/21] qmp: Add support of dirty-bitmap sync mode for drive-backup

2015-04-17 Thread Max Reitz
On 09.04.2015 00:19, John Snow wrote: For dirty-bitmap sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of top sync mode. Signed-off-by: Fam Zheng

Re: [Qemu-block] [PATCH v5 18/21] iotests: add QMP event waiting queue

2015-04-17 Thread Max Reitz
On 09.04.2015 00:20, John Snow wrote: A filter is added to allow callers to request very specific events to be pulled from the event queue, while leaving undesired events still in the stream. This allows to poll for completion data for multiple asynchronous events in any arbitrary order. A new

Re: [Qemu-block] [PATCH v5 15/21] block: Resize bitmaps on bdrv_truncate

2015-04-17 Thread Max Reitz
On 09.04.2015 00:19, John Snow wrote: Signed-off-by: John Snow js...@redhat.com --- block.c| 18 ++ include/qemu/hbitmap.h | 10 ++ util/hbitmap.c | 48 3 files changed, 76 insertions(+) diff

Re: [Qemu-block] [PATCH v2 04/11] block: re-add BlkTransactionState

2015-04-17 Thread Max Reitz
-by: John Snow js...@redhat.com --- blockdev.c | 66 +++--- 1 file changed, 59 insertions(+), 7 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [Qemu-devel] [PATCH v4 19/20] iotests: add simple incremental backup case

2015-04-13 Thread Max Reitz
On 06.04.2015 23:49, John Snow wrote: On 04/02/2015 10:27 AM, Stefan Hajnoczi wrote: On Fri, Mar 20, 2015 at 03:17:02PM -0400, John Snow wrote: Signed-off-by: John Snow js...@redhat.com --- tests/qemu-iotests/124 | 153 +

Re: [Qemu-block] [PATCH v2 05/11] block: add transactional callbacks feature

2015-04-17 Thread Max Reitz
On 27.03.2015 20:19, John Snow wrote: The goal here is to add a new method to transactions that allows developers to specify a callback that will get invoked only once all jobs spawned by a transaction are completed, allowing developers the chance to perform actions conditionally pending

Re: [Qemu-block] [PATCH v2 07/11] block: add delayed bitmap successor cleanup

2015-04-17 Thread Max Reitz
(+), 25 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH v2 09/11] qmp: Add an implementation wrapper for qmp_drive_backup

2015-04-17 Thread Max Reitz
the callback and closure yet. Signed-off-by: John Snow js...@redhat.com --- blockdev.c | 65 -- 1 file changed, 46 insertions(+), 19 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com The problem being that it relies on patch 8. I don't

Re: [Qemu-block] [PATCH v2 06/11] block: add refcount to Job object

2015-04-17 Thread Max Reitz
. Signed-off-by: John Snow js...@redhat.com --- blockjob.c | 18 -- include/block/blockjob.h | 21 + 2 files changed, 37 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

[Qemu-block] [PATCH v3 37/38] iotests: More options for VM.add_drive()

2015-06-03 Thread Max Reitz
This patch allows specifying the interface to be used for the drive, and makes specifying a path optional (if the path is None, the file option will be omitted, thus creating an empty drive). Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- tests/qemu

[Qemu-block] [PATCH v8 08/10] qcow2: Invoke refcount order amendment function

2015-06-03 Thread Max Reitz
Make use of qcow2_change_refcount_order() to support changing the refcount order with qemu-img amend. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/block/qcow2.c b

  1   2   3   4   5   6   7   8   9   10   >