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

[Qemu-block] [PATCH v8 04/10] qcow2: Use abort() instead of assert(false)

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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index d1a0e53..da7795c 100644 --- a/block

[Qemu-block] [PATCH v8 06/10] qcow2: Use intermediate helper CB for amend

2015-03-18 Thread Max Reitz
If there is more than one time-consuming operation to be performed for qcow2_amend_options(), we need an intermediate CB which coordinates the progress of the individual operations and passes the result to the original status callback. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric

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 04/19] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-03-16 Thread Max Reitz
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 can have bitmaps with the same names. The granularity is an optional field. If it is

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] [2.4 PATCH v3 07/19] hbitmap: add hbitmap_merge

2015-03-16 Thread Max Reitz
/hbitmap.h | 11 +++ util/hbitmap.c | 29 + 2 files changed, 40 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 0/2] block: driver should override flags in bdrv_open()

2015-03-19 Thread Max Reitz
, respectively 001/2:[0002] [FC] 'block: driver should override flags in bdrv_open()' 002/2:[] [-C] 'iotests: Add tests for overriding BDRV_O_PROTOCOL' Max Reitz (2): block: driver should override flags in bdrv_open() iotests: Add tests for overriding BDRV_O_PROTOCOL block.c

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

2015-03-19 Thread Max Reitz
in qemu-iotest 051: -drive file=t.qcow2,file.driver=qcow2 now works because the explicitly specified qcow2 overrides the BDRV_O_PROTOCOL which is automatically set for the file BDS (and the filename is just passed down). Therefore, this patch removes that test case. Signed-off-by: Max Reitz mre

[Qemu-block] [PATCH v2 3/3] block: Introduce BlockDriver.requires_growing_file

2015-03-19 Thread Max Reitz
clusters over the NBD connection, writing to addresses beyond the size of the NBD export, which will then fail (without the user knowing why, without this warning). Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 16 block/qcow.c | 1 + block

[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

[Qemu-block] [PATCH v2 2/3] block: Introduce BDS.growing

2015-03-19 Thread Max Reitz
This flag is set if the BDS's size can be increased by writing beyond its end. Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 4 block/blkdebug.c | 2 ++ block/blkverify.c | 2 ++ block/iscsi.c | 2 ++ block/nbd.c | 2

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 04/20] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-03-20 Thread Max Reitz
by block_dirty_bitmap_lookup(), so it's either uninitialized or valid. If you have to respin for some reason or another, I think it would be nice to drop the !bs part. Because bitmap != NULL always means bs is valid, though, this is not wrong, and thus with or without it: Reviewed-by: Max Reitz mre

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

Re: [Qemu-block] [PATCH] raw-posix: Deprecate host floppy passthrough

2015-03-17 Thread Max Reitz
On 2015-03-17 at 12:08, Markus Armbruster wrote: Forgot to mention: 1. For 2.3! 2. Testing without a physical floppy: # /dev/fd0 # chown armbru /dev/fd0 $ qemu-system-x86_64 -nodefaults -fda /dev/fd0 qemu-system-x86_64: -fda /dev/fd0: Host floppy pass-through is

[Qemu-block] [PATCH v8 02/10] block: Add opaque value to the amend CB

2015-03-18 Thread Max Reitz
Add an opaque value which is to be passed to the bdrv_amend_options() status callback. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com --- block.c | 4 ++-- block/qcow2-cluster.c | 14

[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 6/8] docs: Document how to stream to an intermediate layer

2015-04-22 Thread Max Reitz
On 16.04.2015 17:12, Alberto Garcia wrote: Signed-off-by: Alberto Garcia be...@igalia.com --- docs/live-block-ops.txt | 30 +++--- 1 file changed, 19 insertions(+), 11 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 v2 0/2] block: driver should override flags in bdrv_open()

2015-04-24 Thread Max Reitz
On 19.03.2015 19:53, Max Reitz 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 iotests (one for NBD, one for file) to test it. v2 (rebase on current master): - Patch 1

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

Re: [Qemu-block] [PATCH v2 3/4] qemu-iotests: Test that stop doesn't drain block jobs

2015-04-24 Thread Max Reitz
On 03.04.2015 16:05, Fam Zheng wrote: Signed-off-by: Fam Zheng f...@redhat.com --- tests/qemu-iotests/129 | 86 ++ tests/qemu-iotests/129.out | 5 +++ tests/qemu-iotests/group | 1 + 3 files changed, 92 insertions(+) create mode 100644

[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 08/17] qcow2/overlaps: Protect active L2 tables

2015-05-04 Thread Max Reitz
Keep track of the active L2 tables in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-cluster.c | 2 ++ block/qcow2-refcount.c | 6 ++ block/qcow2-snapshot.c | 21 + block/qcow2.c

[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:47, Paolo Bonzini wrote: On 06/05/2015 18:37, Max Reitz wrote: Because qcow2 tries to write beyond the end of the file; the NBD client implementation passes that on to the server, and the server simply reports an error (which the NBD client turns into EIO). Where

Re: [Qemu-block] [PATCH] vmdk: Fix next_cluster_sector for compressed write

2015-05-06 Thread Max Reitz
, BDRV_SECTOR_SIZE); + +extent-next_cluster_sector = MAX(extent-next_cluster_sector, + write_end_sector); + if (ret != write_len) { ret = ret 0 ? ret : -EIO; goto out; 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-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 2/7] qcow2: simplify qcow2_cache_put() and qcow2_cache_entry_mark_dirty()

2015-05-08 Thread Max Reitz
+++- 1 file changed, 15 insertions(+), 17 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 7/7] qcow2: style fixes in qcow2-cache.c

2015-05-08 Thread Max Reitz
On 06.05.2015 15:39, Alberto Garcia wrote: Fix pointer declaration to make it consistent with the rest of the code. Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

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 8/8] docs: document how to configure the qcow2 L2/refcount caches

2015-05-11 Thread Max Reitz
On 11.05.2015 14:55, Alberto Garcia wrote: QEMU has options to configure the size of the L2 and refcount caches for the qcow2 format. However, choosing the right sizes for a particular disk image is not a straightforward operation since the ratio between the cache size and the allocated disk

Re: [Qemu-block] [PATCH 03/34] quorum: Use bdrv_open_image()

2015-05-11 Thread Max Reitz
--- block/quorum.c | 51 +++ 1 file changed, 11 insertions(+), 40 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

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

2015-05-11 Thread Max Reitz
On 08.05.2015 19:21, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- include/qapi/qmp/qdict.h | 1 + qobject/qdict.c | 68 +--- 2 files changed, 65 insertions(+), 4 deletions(-) diff --git a/include/qapi/qmp/qdict.h

Re: [Qemu-block] [PATCH 04/34] vmdk: Use bdrv_open_image()

2015-05-11 Thread Max Reitz
. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/vmdk.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

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 13/34] qemu-io: Add command 'reopen'

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

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 27/34] block: Add infrastructure for option inheritance

2015-05-13 Thread Max Reitz
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 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

  1   2   3   4   5   6   7   8   9   10   >