Re: [Qemu-devel] [PATCH] qcow2-refcount: Snapshot update for zero clusters

2013-08-29 Thread Max Reitz
Am 29.08.2013 14:33, schrieb Kevin Wolf: Am 29.08.2013 um 12:16 hat Max Reitz geschrieben: Do not try to update the refcount for zero clusters in qcow2_update_snapshot_refcount. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 16 +--- 1 file changed, 13 insertions(+), 3

Re: [Qemu-devel] [PATCH v2 1/3] block: Image file option amendment

2013-08-29 Thread Max Reitz
Am 29.08.2013 14:38, schrieb Eric Blake: On 08/29/2013 05:20 AM, Max Reitz wrote: This patch adds the "amend" option to qemu-img which allows changing image options on existing image files. It also adds the generic bdrv implementation which is basically just a wrapper for the im

Re: [Qemu-devel] [PATCH v2 2/3] qcow2: Implement bdrv_amend_options

2013-08-29 Thread Max Reitz
Am 29.08.2013 14:45, schrieb Eric Blake: On 08/29/2013 05:20 AM, Max Reitz wrote: Implement bdrv_amend_options for compat, size, backing_file, backing_fmt and lazy_refcounts. Downgrading images from compat=1.1 to compat=0.10 is achieved through handling all incompatible flags accordingly

Re: [Qemu-devel] [PATCH] qcow2-refcount: Snapshot update for zero clusters

2013-08-29 Thread Max Reitz
Am 29.08.2013 14:53, schrieb Kevin Wolf: Am 29.08.2013 um 14:38 hat Max Reitz geschrieben: Am 29.08.2013 14:33, schrieb Kevin Wolf: Am 29.08.2013 um 12:16 hat Max Reitz geschrieben: Do not try to update the refcount for zero clusters in qcow2_update_snapshot_refcount. Signed-off-by: Max

Re: [Qemu-devel] [PATCH] qcow2-refcount: Snapshot update for zero clusters

2013-08-29 Thread Max Reitz
Am 29.08.2013 15:04, schrieb Kevin Wolf: Am 29.08.2013 um 14:56 hat Max Reitz geschrieben: Am 29.08.2013 14:53, schrieb Kevin Wolf: Am 29.08.2013 um 14:38 hat Max Reitz geschrieben: Am 29.08.2013 14:33, schrieb Kevin Wolf: Am 29.08.2013 um 12:16 hat Max Reitz geschrieben: Do not try to

[Qemu-devel] [PATCH v3 1/8] qcow2: Add corrupt bit

2013-08-30 Thread Max Reitz
This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful). Signed-off-by: Max Reitz --- block/qcow2.c | 47

[Qemu-devel] [PATCH v3 0/8] Add metadata overlap checks

2013-08-30 Thread Max Reitz
n favor of BDRV_O_CHECK | BDRV_O_RDWR - always check full clusters for overlaps - removed qcow2_check_allocations in favor of some qcow2_check_refcounts extensions that will hopefully include all that functionality Max Reitz (8): qcow2: Add corrupt bit qcow2: Metadata overlap chec

[Qemu-devel] [PATCH v3 2/8] qcow2: Metadata overlap checks

2013-08-30 Thread Max Reitz
-by: Max Reitz --- block/qcow2-refcount.c| 172 ++ block/qcow2.h | 39 +++ include/monitor/monitor.h | 1 + monitor.c | 1 + 4 files changed, 213 insertions(+) diff --git a/block/qcow2-refcount.c b/block/qcow2

[Qemu-devel] [PATCH v3 8/8] qemu-iotests: Overlapping cluster allocations

2013-08-30 Thread Max Reitz
A new test on corrupted images with overlapping cluster allocations. Signed-off-by: Max Reitz --- tests/qemu-iotests/060 | 111 + tests/qemu-iotests/060.out | 44 ++ tests/qemu-iotests/group | 1 + 3 files changed, 156

[Qemu-devel] [PATCH v3 3/8] qcow2: Employ metadata overlap checks

2013-08-30 Thread Max Reitz
The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz --- block/qcow2-cache.c| 17 + block/qcow2-cluster.c | 21 + block/qcow2-snapshot.c | 22

[Qemu-devel] [PATCH v3 4/8] qcow2-refcount: Move OFLAG_COPIED checks

2013-08-30 Thread Max Reitz
Move the OFLAG_COPIED checks out of check_refcounts_l1 and check_refcounts_l2 and after the actual refcount checks/fixes (since the refcounts might actually change there). Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 99 +- 1 file changed

[Qemu-devel] [PATCH v3 6/8] qcow2-refcount: Repair shared refcount blocks

2013-08-30 Thread Max Reitz
If the refcount of a refcount block is greater than one, we can at least try to repair that problem by duplicating the affected block. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 148 - include/block/block.h | 1 + 2 files changed

[Qemu-devel] [PATCH v3 5/8] qcow2-refcount: Repair OFLAG_COPIED errors

2013-08-30 Thread Max Reitz
be repaired by correctly setting (or clearing that flag. Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 4 ++-- block/qcow2-refcount.c | 44 block/qcow2.h | 1 + 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/block

[Qemu-devel] [PATCH v3 7/8] qcow2_check: Mark image consistent

2013-08-30 Thread Max Reitz
If no corruptions remain after an image repair (and no errors have been encountered), clear the corrupt flag in qcow2_check. Signed-off-by: Max Reitz --- block/qcow2.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c index 3a95ff1..aeb2ebb

[Qemu-devel] [PATCH v2 1/2] qcow2-refcount: Snapshot update for zero clusters

2013-08-30 Thread Max Reitz
) zero clusters having a cluster 0 refcount greater than one after creating a snapshot. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 52 +- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2

[Qemu-devel] [PATCH v2 0/2] qcow2: Snapshot update for zero clusters

2013-08-30 Thread Max Reitz
clusters into account - abort on unknown cluster type - a test case Max Reitz (2): qcow2-refcount: Snapshot update for zero clusters qemu-iotests: Snapshotting zero clusters block/qcow2-refcount.c | 52 ++- tests/qemu-iotests/062 | 64

[Qemu-devel] [PATCH v2 2/2] qemu-iotests: Snapshotting zero clusters

2013-08-30 Thread Max Reitz
This test creates an image with unallocated zero clusters, then creates a snapshot. Afterwards, there should be neither any errors nor leaks. Signed-off-by: Max Reitz --- tests/qemu-iotests/062 | 64 tests/qemu-iotests/group | 1 + 2 files

[Qemu-devel] [PATCH v3 1/2] qcow2-refcount: Snapshot update for zero clusters

2013-08-30 Thread Max Reitz
) zero clusters having a cluster 0 refcount greater than one after creating a snapshot. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 52 +- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2

[Qemu-devel] [PATCH v3 2/2] qemu-iotests: Snapshotting zero clusters

2013-08-30 Thread Max Reitz
This test creates an image with unallocated zero clusters, then creates a snapshot. Afterwards, there should be neither any errors nor leaks. Signed-off-by: Max Reitz --- tests/qemu-iotests/062 | 64 ++ tests/qemu-iotests/062.out | 9

[Qemu-devel] [PATCH v3 0/2] qcow2: Snapshot update for zero clusters

2013-08-30 Thread Max Reitz
commit message - take pre-allocated zero clusters into account - abort on unknown cluster type - a test case Max Reitz (2): qcow2-refcount: Snapshot update for zero clusters qemu-iotests: Snapshotting zero clusters block/qcow2-refcount.c | 52 + tests

Re: [Qemu-devel] [PATCH v3 4/8] qcow2-refcount: Move OFLAG_COPIED checks

2013-08-30 Thread Max Reitz
Am 30.08.2013 10:48, schrieb Kevin Wolf: Am 30.08.2013 um 09:46 hat Max Reitz geschrieben: Move the OFLAG_COPIED checks out of check_refcounts_l1 and check_refcounts_l2 and after the actual refcount checks/fixes (since the refcounts might actually change there). Signed-off-by: Max Reitz

[Qemu-devel] [PATCH v3 0/3] block/qcow2: Image file option amendment

2013-08-30 Thread Max Reitz
L2 tables - Correct handling of preallocated zero clusters - More test cases Max Reitz (3): block: Image file option amendment qcow2: Implement bdrv_amend_options qemu-iotest: qcow2 image option amendment block.c| 8 ++ block/qcow2-cluster.c

[Qemu-devel] [PATCH v3 3/3] qemu-iotest: qcow2 image option amendment

2013-08-30 Thread Max Reitz
Add tests for qemu-img amend on qcow2 image files. Signed-off-by: Max Reitz --- tests/qemu-iotests/061 | 152 ++ tests/qemu-iotests/061.out | 318 + tests/qemu-iotests/group | 1 + 3 files changed, 471 insertions(+) create

[Qemu-devel] [PATCH v3 2/3] qcow2: Implement bdrv_amend_options

2013-08-30 Thread Max Reitz
-by: Max Reitz --- block/qcow2-cluster.c | 165 ++ block/qcow2.c | 194 +- block/qcow2.h | 3 + 3 files changed, 361 insertions(+), 1 deletion(-) diff --git a/block/qcow2-cluster.c b/block

[Qemu-devel] [PATCH v3 1/3] block: Image file option amendment

2013-08-30 Thread Max Reitz
This patch adds the "amend" option to qemu-img which allows changing image options on existing image files. It also adds the generic bdrv implementation which is basically just a wrapper for the image format specific function. Signed-off-by: Max Reitz --- block.c

[Qemu-devel] [PATCH v4 0/8] Add metadata overlap checks

2013-08-30 Thread Max Reitz
RV_O_CHECK | BDRV_O_RDWR - always check full clusters for overlaps - removed qcow2_check_allocations in favor of some qcow2_check_refcounts extensions that will hopefully include all that functionality Max Reitz (8): qcow2: Add corrupt bit qcow2: Metadata overlap checks qco

[Qemu-devel] [PATCH v4 2/8] qcow2: Metadata overlap checks

2013-08-30 Thread Max Reitz
-by: Max Reitz --- block/qcow2-refcount.c| 172 ++ block/qcow2.h | 39 +++ include/monitor/monitor.h | 1 + monitor.c | 1 + 4 files changed, 213 insertions(+) diff --git a/block/qcow2-refcount.c b/block/qcow2

[Qemu-devel] [PATCH v4 3/8] qcow2: Employ metadata overlap checks

2013-08-30 Thread Max Reitz
The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz --- block/qcow2-cache.c| 17 + block/qcow2-cluster.c | 21 + block/qcow2-snapshot.c | 22

[Qemu-devel] [PATCH v4 1/8] qcow2: Add corrupt bit

2013-08-30 Thread Max Reitz
This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful). Signed-off-by: Max Reitz --- block/qcow2.c | 47

[Qemu-devel] [PATCH v4 6/8] qcow2-refcount: Repair shared refcount blocks

2013-08-30 Thread Max Reitz
If the refcount of a refcount block is greater than one, we can at least try to repair that problem by duplicating the affected block. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 148 - include/block/block.h | 1 + 2 files changed

[Qemu-devel] [PATCH v4 4/8] qcow2-refcount: Move OFLAG_COPIED checks

2013-08-30 Thread Max Reitz
Move the OFLAG_COPIED checks out of check_refcounts_l1 and check_refcounts_l2 and after the actual refcount checks/fixes (since the refcounts might actually change there). Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 115 +++-- 1 file changed

[Qemu-devel] [PATCH v4 5/8] qcow2-refcount: Repair OFLAG_COPIED errors

2013-08-30 Thread Max Reitz
be repaired by correctly setting (or clearing that flag. Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 4 ++-- block/qcow2-refcount.c | 58 -- block/qcow2.h | 1 + 3 files changed, 55 insertions(+), 8 deletions(-) diff --git a

[Qemu-devel] [PATCH v4 8/8] qemu-iotests: Overlapping cluster allocations

2013-08-30 Thread Max Reitz
A new test on corrupted images with overlapping cluster allocations. Signed-off-by: Max Reitz --- tests/qemu-iotests/060 | 111 + tests/qemu-iotests/060.out | 44 ++ tests/qemu-iotests/group | 1 + 3 files changed, 156

[Qemu-devel] [PATCH v4 7/8] qcow2_check: Mark image consistent

2013-08-30 Thread Max Reitz
If no corruptions remain after an image repair (and no errors have been encountered), clear the corrupt flag in qcow2_check. Signed-off-by: Max Reitz --- block/qcow2.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c index 3a95ff1..aeb2ebb

Re: [Qemu-devel] [PATCH] target-i386: fix disassembly with PAE=1, PG=0

2013-08-30 Thread Max Filippov
beginning of OVMF. > > Cc: Richard Henderson > Signed-off-by: Paolo Bonzini > --- > target-i386/helper.c | 34 -- > 1 file changed, 16 insertions(+), 18 deletions(-) Hmmm, déjà vu: http://lists.gnu.org/archive/html/qemu-devel/2012-11/msg01635.html Reviewed-by: Max Filippov -- Thanks. -- Max

[Qemu-devel] [PATCH v5 3/8] qcow2: Employ metadata overlap checks

2013-09-02 Thread Max Reitz
The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz --- block/qcow2-cache.c| 17 + block/qcow2-cluster.c | 21 + block/qcow2-snapshot.c | 22

[Qemu-devel] [PATCH v5 1/8] qcow2: Add corrupt bit

2013-09-02 Thread Max Reitz
This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful). Signed-off-by: Max Reitz --- block/qcow2.c | 47

[Qemu-devel] [PATCH v5 0/8] Add metadata overlap checks

2013-09-02 Thread Max Reitz
hopefully include all that functionality Max Reitz (8): qcow2: Add corrupt bit qcow2: Metadata overlap checks qcow2: Employ metadata overlap checks qcow2-refcount: Move OFLAG_COPIED checks qcow2-refcount: Repair OFLAG_COPIED errors qcow2-refcount: Repair shared refcount blocks qcow2_c

[Qemu-devel] [PATCH v5 2/8] qcow2: Metadata overlap checks

2013-09-02 Thread Max Reitz
-by: Max Reitz --- block/qcow2-refcount.c| 172 ++ block/qcow2.h | 39 +++ include/monitor/monitor.h | 1 + monitor.c | 1 + 4 files changed, 213 insertions(+) diff --git a/block/qcow2-refcount.c b/block/qcow2

[Qemu-devel] [PATCH v5 5/8] qcow2-refcount: Repair OFLAG_COPIED errors

2013-09-02 Thread Max Reitz
be repaired by correctly setting (or clearing that flag. Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 4 ++-- block/qcow2-refcount.c | 58 -- block/qcow2.h | 1 + 3 files changed, 55 insertions(+), 8 deletions(-) diff --git a

[Qemu-devel] [PATCH v5 4/8] qcow2-refcount: Move OFLAG_COPIED checks

2013-09-02 Thread Max Reitz
Move the OFLAG_COPIED checks out of check_refcounts_l1 and check_refcounts_l2 and after the actual refcount checks/fixes (since the refcounts might actually change there). Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 115 +++-- 1 file changed

[Qemu-devel] [PATCH v5 8/8] qemu-iotests: Overlapping cluster allocations

2013-09-02 Thread Max Reitz
A new test on corrupted images with overlapping cluster allocations. Signed-off-by: Max Reitz --- tests/qemu-iotests/060 | 111 + tests/qemu-iotests/060.out | 44 ++ tests/qemu-iotests/group | 1 + 3 files changed, 156

[Qemu-devel] [PATCH v5 7/8] qcow2_check: Mark image consistent

2013-09-02 Thread Max Reitz
If no corruptions remain after an image repair (and no errors have been encountered), clear the corrupt flag in qcow2_check. Signed-off-by: Max Reitz --- block/qcow2.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c index 3a95ff1..aeb2ebb

[Qemu-devel] [PATCH v5 6/8] qcow2-refcount: Repair shared refcount blocks

2013-09-02 Thread Max Reitz
If the refcount of a refcount block is greater than one, we can at least try to repair that problem by duplicating the affected block. Signed-off-by: Max Reitz --- block/blkdebug.c | 1 + block/qcow2-refcount.c | 148 - include/block

Re: [Qemu-devel] [PATCH v3 2/3] qcow2: Implement bdrv_amend_options

2013-09-02 Thread Max Reitz
Am 02.09.2013 05:43, schrieb Fam Zheng: On Fri, 08/30 12:27, Max Reitz wrote: Implement bdrv_amend_options for compat, size, backing_file, backing_fmt and lazy_refcounts. Downgrading images from compat=1.1 to compat=0.10 is achieved through handling all incompatible flags accordingly, clearing

[Qemu-devel] [PATCH v4 1/5] block: Image file option amendment

2013-09-02 Thread Max Reitz
This patch adds the "amend" option to qemu-img which allows changing image options on existing image files. It also adds the generic bdrv implementation which is basically just a wrapper for the image format specific function. Signed-off-by: Max Reitz --- block.c

[Qemu-devel] [PATCH v4 2/5] qcow2-cluster: Expand zero clusters

2013-09-02 Thread Max Reitz
Add functionality for expanding zero clusters. This is necessary for downgrading the image version to one without zero cluster support. For non-backed images, this function may also just discard zero clusters instead of truly expanding them. Signed-off-by: Max Reitz --- block/qcow2-cluster.c

[Qemu-devel] [PATCH v4 0/5] block/qcow2: Image file option amendment

2013-09-02 Thread Max Reitz
rally implemented Kevin's comments, especially: - Zero cluster expansion for inactive L2 tables - Correct handling of preallocated zero clusters - More test cases Max Reitz (5): block: Image file option amendment qcow2-cluster: Expand zero clusters qcow2: Save refcount order in BDR

[Qemu-devel] [PATCH v4 3/5] qcow2: Save refcount order in BDRVQcowState

2013-09-02 Thread Max Reitz
Save the image refcount order in BDRVQcowState. This will be relevant for future code supporting different refcount orders than four and also for code that needs to verify a certain refcount order for an opened image. Signed-off-by: Max Reitz --- block/qcow2.c | 3 ++- block/qcow2.h | 1 + 2

[Qemu-devel] [PATCH v4 5/5] qemu-iotest: qcow2 image option amendment

2013-09-02 Thread Max Reitz
Add tests for qemu-img amend on qcow2 image files. Signed-off-by: Max Reitz --- tests/qemu-iotests/061 | 178 +++ tests/qemu-iotests/061.out | 349 + tests/qemu-iotests/group | 1 + 3 files changed, 528 insertions

[Qemu-devel] [PATCH v4 4/5] qcow2: Implement bdrv_amend_options

2013-09-02 Thread Max Reitz
-by: Max Reitz --- block/qcow2.c | 195 ++ 1 file changed, 195 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 28b104e..254cf8c 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1813,6 +1813,200 @@ static int

[Qemu-devel] [PATCH] qmp: Documentation for BLOCK_IMAGE_CORRUPTED

2013-09-02 Thread Max Reitz
Add an appropriate entry describing this event and its parameters into qmp-events.txt. Signed-off-by: Max Reitz --- Follow-up to: - Add metadata overlap checks (series, v5); particularly patch 2 (qcow2: Metadata overlap checks) --- QMP/qmp-events.txt | 22 ++ 1 file

[Qemu-devel] [PATCH] qemu-iotests: Adjust test result 039

2013-09-02 Thread Max Reitz
The moved OFLAG_COPIED check in qcow2_check_refcounts results in a different output from test 039 (mismatches are now found after the general refcount check (as far as any remain)). This patch adjusts the expected test result accordingly. Signed-off-by: Max Reitz --- Follow-up to: - Add

Re: [Qemu-devel] [PATCH v4 2/5] qcow2-cluster: Expand zero clusters

2013-09-03 Thread Max Reitz
Am 02.09.2013 17:13, schrieb Kevin Wolf: Am 02.09.2013 um 12:04 hat Max Reitz geschrieben: Add functionality for expanding zero clusters. This is necessary for downgrading the image version to one without zero cluster support. For non-backed images, this function may also just discard zero

Re: [Qemu-devel] [PATCH v4 5/5] qemu-iotest: qcow2 image option amendment

2013-09-03 Thread Max Reitz
Am 02.09.2013 17:36, schrieb Kevin Wolf: Am 02.09.2013 um 12:04 hat Max Reitz geschrieben: Add tests for qemu-img amend on qcow2 image files. Signed-off-by: Max Reitz --- tests/qemu-iotests/061 | 178 +++ tests/qemu-iotests/061.out | 349

[Qemu-devel] [PATCH v5 1/6] block: Image file option amendment

2013-09-03 Thread Max Reitz
This patch adds the "amend" option to qemu-img which allows changing image options on existing image files. It also adds the generic bdrv implementation which is basically just a wrapper for the image format specific function. Signed-off-by: Max Reitz --- block.c

[Qemu-devel] [PATCH v5 0/6] block/qcow2: Image file option amendment

2013-09-03 Thread Max Reitz
refcount_order != 4 - implemented Eric's comments regarding the qemu-img amend and img_amend itself v2: - Generally implemented Kevin's comments, especially: - Zero cluster expansion for inactive L2 tables - Correct handling of preallocated zero clusters - More test cases Ma

[Qemu-devel] [PATCH v5 6/6] qemu-iotest: qcow2 image option amendment

2013-09-03 Thread Max Reitz
Add tests for qemu-img amend on qcow2 image files. Signed-off-by: Max Reitz --- tests/qemu-iotests/061 | 178 +++ tests/qemu-iotests/061.out | 349 + tests/qemu-iotests/group | 1 + 3 files changed, 528 insertions

[Qemu-devel] [PATCH v5 4/6] qcow2: Save refcount order in BDRVQcowState

2013-09-03 Thread Max Reitz
Save the image refcount order in BDRVQcowState. This will be relevant for future code supporting different refcount orders than four and also for code that needs to verify a certain refcount order for an opened image. Signed-off-by: Max Reitz --- block/qcow2.c | 3 ++- block/qcow2.h | 1 + 2

[Qemu-devel] [PATCH v5 5/6] qcow2: Implement bdrv_amend_options

2013-09-03 Thread Max Reitz
-by: Max Reitz --- block/qcow2.c | 194 ++ 1 file changed, 194 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 28b104e..d29547b 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1813,6 +1813,199 @@ static int

[Qemu-devel] [PATCH v5 2/6] qcow2-cache: Empty cache

2013-09-03 Thread Max Reitz
Add a function for emptying a cache, i.e., flushing it and marking all elements invalid. Signed-off-by: Max Reitz --- block/qcow2-cache.c | 18 ++ block/qcow2.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index 7bcae09

[Qemu-devel] [PATCH v5 3/6] qcow2-cluster: Expand zero clusters

2013-09-03 Thread Max Reitz
Add functionality for expanding zero clusters. This is necessary for downgrading the image version to one without zero cluster support. For non-backed images, this function may also just discard zero clusters instead of truly expanding them. Signed-off-by: Max Reitz --- block/qcow2-cluster.c

[Qemu-devel] [PATCH v2] qmp: Documentation for BLOCK_IMAGE_CORRUPTED

2013-09-03 Thread Max Reitz
Add an appropriate entry describing this event and its parameters into qmp-events.txt. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- v2: - moved section to keep qmp-events.txt sorted --- QMP/qmp-events.txt | 22 ++ 1 file changed, 22 insertions(+) diff --git a/QMP

Re: [Qemu-devel] [PATCH] qmp: Documentation for BLOCK_IMAGE_CORRUPTED

2013-09-03 Thread Max Reitz
On 2013-09-03 15:39, Eric Blake wrote: On 09/02/2013 07:01 AM, Max Reitz wrote: Add an appropriate entry describing this event and its parameters into qmp-events.txt. Signed-off-by: Max Reitz --- Follow-up to: - Add metadata overlap checks (series, v5); particularly patch 2 (qcow2

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-04 Thread Max Reitz
specifying multiple ranges for +which operations should be revoked. This means the size of the descriptor +must be 4 + 12 * n. + + * Deduplication hash insertion: Associates a hash value with a cluster. + +TODO + + * Deduplication hash deletion: Marks a hash value invalid (e.g. because the +hashed data has changed) + +TODO Max

[Qemu-devel] [RFC 1/3] bdrv: Use "Error" for opening images

2013-09-05 Thread Max Reitz
Add an Error ** parameter to bdrv_open, bdrv_file_open and bdrv_create to allow more specific error messages. Signed-off-by: Max Reitz --- block.c | 6 +++--- block/blkdebug.c | 3 ++- block/blkverify.c | 3 ++- block/bochs.c | 3 ++- block

[Qemu-devel] [RFC 0/3] block: Error parameter for opening/creating images

2013-09-05 Thread Max Reitz
applies to the tests 49, 51, 54 and 60. Max Reitz (3): bdrv: Use "Error" for opening images block: Error parameter for opening functions qcow2: Use Error parameter block.c | 164 ++ block/blkdebug.c | 5

[Qemu-devel] [RFC 2/3] block: Error parameter for opening functions

2013-09-05 Thread Max Reitz
Add an Error ** parameter to bdrv_open, bdrv_file_open, bdrv_create and associated functions to allow more specific error messages. Signed-off-by: Max Reitz --- block.c | 164 -- block/blkdebug.c | 2 +- block/blkverify.c

[Qemu-devel] [RFC 3/3] qcow2: Use Error parameter

2013-09-05 Thread Max Reitz
Employ usage of the new Error ** parameter in qcow2_open, qcow2_create and associated functions. Signed-off-by: Max Reitz --- block/qcow2.c | 135 ++ 1 file changed, 88 insertions(+), 47 deletions(-) diff --git a/block/qcow2.c b/block

[Qemu-devel] [PATCH] qemu-iotests: New test case in 061

2013-09-05 Thread Max Reitz
Add one test case for zero cluster expansion on qcow2 version downgrade in shared L2 tables (i.e., L2 tables with a refcount > 1) and one for zero expansion on backed clusters in shared L2 tables. Signed-off-by: Max Reitz --- Depends on (follow-up to): - block/qcow2: Image file option amendm

[Qemu-devel] [PATCH 1/3] block: Additional info string in ImageInfo and BDI

2013-09-05 Thread Max Reitz
Add a string for additional information to ImageInfo and BlockDriverInfo. Also, use this string to emit the compatibility level and lazy_refcount value (on compat=1.1) for qcow2. Signed-off-by: Max Reitz --- block.c | 3 ++- block/mirror.c| 6 -- block/qapi.c

[Qemu-devel] [PATCH 3/3] qemu-iotests: Additional info from qemu-img info

2013-09-05 Thread Max Reitz
Add a test for the additional information now provided by qemu-img info when used on qcow2 images. Signed-off-by: Max Reitz --- tests/qemu-iotests/064 | 72 ++ tests/qemu-iotests/064.out | 17 +++ tests/qemu-iotests/group | 1 + 3 files

[Qemu-devel] [PATCH 2/3] qemu-iotests: info-string filter in _img_info

2013-09-05 Thread Max Reitz
Filter out additional information specific to the image format provided by qemu-img info in _img_info. Signed-off-by: Max Reitz --- tests/qemu-iotests/common.rc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc

[Qemu-devel] [PATCH 0/3] Provide additional info through qemu-img info

2013-09-05 Thread Max Reitz
value. Max Reitz (3): block: Additional info string in ImageInfo and BDI qemu-iotests: info-string filter in _img_info qemu-iotests: Additional info from qemu-img info block.c | 3 +- block/mirror.c | 6 ++-- block/qapi.c | 10 +-

Re: [Qemu-devel] [PULL 07/23] exec.c: Relax restrictions on watchpoint length and alignment

2014-09-17 Thread Max Filippov
to set one-byte-long watchpoint, xtensa testsuite fails because of that. I guess you meant 'len == 0 || (addr + len - 1) < addr' ? -- Thanks. -- Max

[Qemu-devel] [PATCH] exec.c: fix setting 1-byte-long watchpoints

2014-09-17 Thread Max Filippov
With commit 05068c0dfb5b 'exec.c: Relax restrictions on watchpoint length and alignment' it's no longer possible to set 1-byte-long watchpoint because of incorrect address range check. Fix that by changing condition that checks for address wraparound. Signed-off-by: Max Filippov

Re: [Qemu-devel] [PATCH v2] vmdk: Fix integer overflow in offset calculation

2014-09-19 Thread Max Reitz
is probably fine since I don't see the point in trying to create such huge raw images; if it works for other image formats, that should be fine) or we (you) cannot reuse this test. In case you opt for the former (exempt raw like vpc): Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v2] vmdk: Fix integer overflow in offset calculation

2014-09-19 Thread Max Reitz
On 19.09.2014 13:52, Max Reitz wrote: On 15.09.2014 04:32, Fam Zheng wrote: This fixes the bug introduced by commit c6ac36e (vmdk: Optimize cluster allocation). $ ~/build/master/qemu-io /stor/vm/arch.vmdk -c 'write 2G 1k' write failed: Invalid argument Reported-by: Mark Cave-Ayla

Re: [Qemu-devel] [PATCH v3 02/23] block: New BlockBackend

2014-09-20 Thread Max Reitz
e time it should be unref'd is exactly when qemu is exiting anyway and second, the BDS is not unref'd either. Therefore: Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 03/23] block: Connect BlockBackend to BlockDriverState

2014-09-20 Thread Max Reitz
+-- qemu-io.c | 4 +- qemu-nbd.c | 4 +- 9 files changed, 156 insertions(+), 94 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 04/23] block: Connect BlockBackend and DriveInfo

2014-09-20 Thread Max Reitz
tead of dumping the list to stdout (but I'm not even sure whether that's really correct, because it's not really an error), or you keep the "if" around error_report() and error_free() here. Looks good otherwise, though. Max

Re: [Qemu-devel] [PATCH v3 05/23] block: Code motion to get rid of stubs/blockdev.c

2014-09-20 Thread Max Reitz
| 12 5 files changed, 15 insertions(+), 27 deletions(-) delete mode 100644 stubs/blockdev.c Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 06/23] block: Make BlockBackend own its BlockDriverState

2014-09-20 Thread Max Reitz
img.c| 35 +-- qemu-io.c | 5 - qemu-nbd.c| 1 - 6 files changed, 8 insertions(+), 53 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 07/23] block: Eliminate bdrv_iterate(), use bdrv_next()

2014-09-20 Thread Max Reitz
| 2 -- monitor.c | 32 +--- 5 files changed, 37 insertions(+), 67 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-20 Thread Max Reitz
ck/block.h | 4 +-- include/block/block_int.h | 2 -- 18 files changed, 67 insertions(+), 75 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 09/23] block: Merge BlockBackend and BlockDriverState name spaces

2014-09-20 Thread Max Reitz
| 13 ++--- 2 files changed, 9 insertions(+), 15 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 10/23] block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()

2014-09-20 Thread Max Reitz
/r2d.c | 5 +++-- hw/usb/dev-storage.c | 4 +++- hw/xtensa/xtfpga.c | 4 +++- include/sysemu/blockdev.h| 1 - 44 files changed, 166 insertions(+), 94 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 11/23] block: Rename BlockDriverAIOCB* to BlockAIOCB*

2014-09-20 Thread Max Reitz
semu/dma.h| 26 monitor.c | 6 +- tests/test-thread-pool.c| 2 +- thread-pool.c | 8 +-- 47 files changed, 353 insertions(+), 354 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 12/23] virtio-blk: Drop redundant VirtIOBlock member conf

2014-09-20 Thread Max Reitz
t;sector_mask; } else { -blkcfg.sectors = s->conf->secs; +blkcfg.sectors = conf->secs; } blkcfg.size_max = 0; -blkcfg.physical_block_exp = get_physical_block_exp(s->conf); +blkcfg.physical_block_exp = get_physical_block_exp(&s->blk.conf); Is there a reason for you not using "conf" instead of "&s->blk.conf" here? Of course, it's not wrong, so with the one or the other: Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 13/23] virtio-blk: Rename VirtIOBlkConf variables to conf

2014-09-20 Thread Max Reitz
/virtio-blk.h | 2 +- hw/block/virtio-blk.c | 52 - include/hw/virtio/virtio-blk.h | 2 +- 4 files changed, 45 insertions(+), 44 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 14/23] hw: Convert from BlockDriverState to BlockBackend, mostly

2014-09-20 Thread Max Reitz
ppose it's because including block-backend.h is more correct than the other two (as I can read from your TODO in block-backend.h). Anyway, with the alignment not broken: Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 15/23] ide: Complete conversion from BlockDriverState to BlockBackend

2014-09-20 Thread Max Reitz
: Max Reitz

Re: [Qemu-devel] [PATCH v3 16/23] pc87312: Drop unused members of PC87312State

2014-09-20 Thread Max Reitz
On 16.09.2014 20:12, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- include/hw/isa/pc87312.h | 3 --- 1 file changed, 3 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v4] vmdk: Fix integer overflow in offset calculation

2014-09-22 Thread Max Reitz
ix typo in file header: 1014 -> 2014. v3: A new case 105 instead of embedding in 005. (Max) --- block/vmdk.c | 2 +- tests/qemu-iotests/105 | 70 ++ tests/qemu-iotests/105.out | 21 ++ 3 files changed, 92 insertions(+

Re: [Qemu-devel] [PATCH v3 17/23] blockdev: Drop superfluous DriveInfo member id

2014-09-22 Thread Max Reitz
On 16.09.2014 20:12, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- block/block-backend.c | 1 - blockdev.c| 3 +-- include/sysemu/blockdev.h | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 18/23] blockdev: Fix blockdev-add not to create IDE drive (0, 0)

2014-09-22 Thread Max Reitz
tions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 19/23] blockdev: Drop DriveInfo member enable_auto_del

2014-09-22 Thread Max Reitz
this patch, if DriveInfo was not present, the condition was false (actually, it was always false, which is the reason for this patch). Now it's true. It seems like the behavior is now correct but wasn't before... I guess this means patch 18 should be fixed? However, for this patch: Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 20/23] block/qapi: Convert qmp_query_block() to BlockBackend

2014-09-22 Thread Max Reitz
-- block/qapi.c | 15 --- include/block/qapi.h | 3 --- 2 files changed, 8 insertions(+), 10 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 21/23] blockdev: Convert qmp_eject(), qmp_change_blockdev() to BlockBackend

2014-09-22 Thread Max Reitz
;re". ;-) into BlockBackend. Signed-off-by: Markus Armbruster --- blockdev.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) With that fixed (or alternatively another Wikipedia or Wiktionary reference): Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v3 23/23] block: Make device model's references to BlockBackend strong

2014-09-22 Thread Max Reitz
d object and I don't like the risk of use-after-free in blk->bs. Max

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