Instead of invoking Python scripts directly via ./, use $PYTHON to
obtain the correct Python interpreter command.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/031 | 8
tests/qemu-iotests/036 | 6 +++---
tests/qemu-iotests/039 | 18 +-
tests/qemu-iotests/054
In order to allow out-of-tree iotests, create a symlink for the check
script in the build tree.
While doing so, also write configured options relevant to the iotests to
common.env in the build tree; currently, this is the command to invoke
Python 2.
Signed-off-by: Max Reitz
---
configure | 12
Add a default common.env in case the one supposed to be emitted by
configure cannot be found.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/common.env.default | 6 ++
1 file changed, 6 insertions(+)
create mode 100644 tests/qemu-iotests/common.env.default
diff --git a/tests/qemu-iotests
re "nbd\.c".
While working on this, also fix the regexes: '.' should be escaped and a
single backslash is not enough for escaping when enclosed by double
quotes.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/083 | 8
1 file changed, 4 insertions(+), 4 deletions(-)
d
On 16.05.2014 00:52, Eric Blake wrote:
On 05/15/2014 04:26 PM, Max Reitz wrote:
As out-of-tree builds are preferred for qemu, running the qemu-iotests
in that out-of-tree build should be supported as well. To do so, a
symbolic link has to be created pointing to the check script in the
source
On 16.05.2014 09:40, Fam Zheng wrote:
On Fri, 05/16 00:26, Max Reitz wrote:
Source common.env in the iotests' check script. If the one supposed to
be created by configure cannot be found, use common.env.default from the
source tree.
If configure is supposed to create common.env, but we
On 16.05.2014 09:54, Fam Zheng wrote:
On Fri, 05/16 00:26, Max Reitz wrote:
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index bd66630..9968db9 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -287,10 +287,17 @@ do
start=`_wallclock
On 16.05.2014 17:09, Eric Blake wrote:
On 05/16/2014 08:43 AM, Max Reitz wrote:
+source_iotests="$(cd "$(dirname "$(readlink "$0")")"; pwd)"
This is potentially dangerous. If readlink or dirname fails, you can
invoke cd "" (which on bash
Move cross-page jump check to gen_jump_slot and use tb->pc instead of
dc->pc to check for cross-page jumps.
When TB ends at the page boundary dc->pc points to the next page
allowing chaining to TBs in it.
Cc: qemu-sta...@nongnu.org
Signed-off-by: Max Filippov
---
target-xtensa/transl
On Tue, May 20, 2014 at 3:17 PM, Max Filippov wrote:
> Move cross-page jump check to gen_jump_slot and use tb->pc instead of
> dc->pc to check for cross-page jumps.
> When TB ends at the page boundary dc->pc points to the next page
> allowing chaining to TBs in it.
>
>
'iotests: Add default common.env'
004/7:[0003] [FC] 'iotests: Source common.env'
005/7:[0001] [FC] 'iotests: Use $PYTHON for Python scripts'
006/7:[] [--] 'iotests: Drop Python version from 065's Shebang'
007/7:[] [--] 'iotests: Fix 083 fo
yet, as this
would modify the source tree which is not desired for out-of-tree runs
and should be fixed in the repository anyway.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/check | 95 +---
tests/qemu-iotests/common| 8 ++--
tests/qemu
re "nbd\.c".
While working on this, also fix the regexes: '.' should be escaped and a
single backslash is not enough for escaping when enclosed by double
quotes.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/083 | 8
1 file changed, 4 insertions(+), 4 deletions(-)
d
In order to allow out-of-tree iotests, create a symlink for the check
script in the build tree.
While doing so, also write configured options relevant to the iotests to
common.env in the build tree; currently, this is the command to invoke
Python 2.
Signed-off-by: Max Reitz
---
configure | 12
Instead of invoking Python scripts directly via ./, use $PYTHON to
obtain the correct Python interpreter command.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/031 | 8
tests/qemu-iotests/036 | 6 +++---
tests/qemu-iotests/039 | 18 +-
tests/qemu-iotests/054
Add a default common.env in case the one supposed to be emitted by
configure cannot be found.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/common.env.default | 6 ++
1 file changed, 6 insertions(+)
create mode 100644 tests/qemu-iotests/common.env.default
diff --git a/tests/qemu-iotests
Source common.env in the iotests' check script. If the one supposed to
be created by configure cannot be found, use common.env.default from the
source tree.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/check | 16
1 file changed, 16 insertions(+)
diff --git a/tests
n an exact match.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/065 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065
index ab5445f..e89b61d 100755
--- a/tests/qemu-iotests/065
+++ b/tests/qemu-iotests/065
@@ -1,4 +1,4 @@
-#!/u
.
Signed-off-by: Max Reitz
Reported-by: Kevin Wolf
---
This is a follow-up patch for:
[PATCH v3 4/4] iotests: Add test for the JSON protocol
---
tests/qemu-iotests/089 | 3 +--
tests/qemu-iotests/089.out | 4
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/tests/qemu
Hi,
this series fixes cross-page TB linking bug in target-xtensa that managed
to survive for a major release period. With this bug fixed it is finally
possible to build linux kernel under xtensa linux running in system mode
QEMU (but it may take a couple of days to complete).
Max Filippov (3
Signed-off-by: Max Filippov
---
tests/tcg/xtensa/test_mmu.S | 26 +++---
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/tests/tcg/xtensa/test_mmu.S b/tests/tcg/xtensa/test_mmu.S
index 099031f..37174b9 100644
--- a/tests/tcg/xtensa/test_mmu.S
+++ b/tests/tcg
Use tb->pc instead of dc->pc to check for cross-page jumps.
When TB translation stops at the page boundary dc->pc points to the next
page allowing chaining to TBs in it, which is wrong.
Cc: qemu-sta...@nongnu.org
Signed-off-by: Max Filippov
---
target-xtensa/translate.c | 4 ++--
1 fil
Signed-off-by: Max Filippov
---
tests/tcg/xtensa/test_mmu.S | 220
1 file changed, 220 insertions(+)
diff --git a/tests/tcg/xtensa/test_mmu.S b/tests/tcg/xtensa/test_mmu.S
index 37174b9..58c5bca 100644
--- a/tests/tcg/xtensa/test_mmu.S
+++ b/tests
I can only speak for qcow2 and qcow, but for those places, I don't think
it is worth fixing. First of all, both are image formats, so the
bottleneck is generally the disk on which the images are stored and not
main memory, so an overeager memset should not cause any problems.
For both, the relevan
On 22.05.2014 08:45, Fam Zheng wrote:
On Tue, 05/20 22:23, Max Reitz wrote:
As out-of-tree builds are preferred for qemu, running the qemu-iotests
in that out-of-tree build should be supported as well. To do so, a
symbolic link has to be created pointing to the check script in the
source
ut-of-tree iotests'
003/7:[] [--] 'iotests: Add default common.env'
004/7:[] [-C] 'iotests: Source common.env'
005/7:[] [-C] 'iotests: Use $PYTHON for Python scripts'
006/7:[] [--] 'iotests: Drop Python version from 065's Shebang'
007/7:[-
In order to allow out-of-tree iotests, create a symlink for the check
script in the build tree.
While doing so, also write configured options relevant to the iotests to
common.env in the build tree; currently, this is the command to invoke
Python 2.
Signed-off-by: Max Reitz
---
configure | 12
yet, as this
would modify the source tree which is not desired for out-of-tree runs
and should be fixed in the repository anyway.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/check | 98 ++--
tests/qemu-iotests/common| 8 ++--
tests/qemu
n an exact match.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/065 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065
index ab5445f..e89b61d 100755
--- a/tests/qemu-iotests/065
+++ b/tests/qemu-iotests/065
@@ -1,4 +1,4 @@
-#!/u
Add a default common.env in case the one supposed to be emitted by
configure cannot be found.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/common.env.default | 6 ++
1 file changed, 6 insertions(+)
create mode 100644 tests/qemu-iotests/common.env.default
diff --git a/tests/qemu-iotests
re "nbd\.c".
While working on this, also fix the regexes: '.' should be escaped and a
single backslash is not enough for escaping when enclosed by double
quotes.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/083 | 8
1 file changed, 4 insertions(+), 4 deletions(-)
d
Source common.env in the iotests' check script. If the one supposed to
be created by configure cannot be found, use common.env.default from the
source tree.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/check | 16
1 file changed, 16 insertions(+)
diff --git a/tests
Instead of invoking Python scripts directly via ./, use $PYTHON to
obtain the correct Python interpreter command.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/031 | 8
tests/qemu-iotests/036 | 6 +++---
tests/qemu-iotests/039 | 18 +-
tests/qemu-iotests/054
On 22.05.2014 23:30, Max Reitz wrote:
This series enables qemu-iotests to be run in a build tree outside of
the source tree. It also makes the tests use the command for invoking
the Python interpreter specified through configure instead of always
using "/usr/bin/env python".
v3:
On 23.05.2014 05:47, Fam Zheng wrote:
On Thu, 05/22 23:30, Max Reitz wrote:
In order to allow out-of-tree iotests, create a symlink for the check
script in the build tree.
While doing so, also write configured options relevant to the iotests to
common.env in the build tree; currently, this is
On 23.05.2014 05:58, Fam Zheng wrote:
On Thu, 05/22 23:30, Max Reitz wrote:
Instead of invoking Python scripts directly via ./, use $PYTHON to
obtain the correct Python interpreter command.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/031 | 8
tests/qemu-iotests/036 | 6
On 23.05.2014 15:33, Markus Armbruster wrote:
Eric Blake writes:
On 05/23/2014 12:10 AM, Fam Zheng wrote:
On Thu, 05/22 23:30, Max Reitz wrote:
Add a default common.env in case the one supposed to be emitted by
configure cannot be found.
Signed-off-by: Max Reitz
Now we can run both from
On 23.05.2014 06:01, Fam Zheng wrote:
On Thu, 05/22 23:30, Max Reitz wrote:
Source common.env in the iotests' check script. If the one supposed to
be created by configure cannot be found, use common.env.default from the
source tree.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/check
#x27;iotests: Use $PYTHON for Python scripts'
005/6:[] [--] 'iotests: Drop Python version from 065's Shebang'
006/6:[] [--] 'iotests: Fix 083 for out-of-tree builds'
Max Reitz (6):
iotests: Allow out-of-tree run
configure: Enable out-of-tree iot
Instead of invoking Python scripts directly via ./, use $PYTHON to
obtain the correct Python interpreter command.
Signed-off-by: Max Reitz
Reviewed-by: Fam Zheng
---
tests/qemu-iotests/031 | 8
tests/qemu-iotests/036 | 6 +++---
tests/qemu-iotests/039 | 18
yet, as this
would modify the source tree which is not desired for out-of-tree runs
and should be fixed in the repository anyway.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/check | 98 ++--
tests/qemu-iotests/common| 11 ++---
tests/qemu
Source common.env in the iotests' check script.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/check | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 69f328b..992b91e 100755
--- a/tests/qemu-iotests/check
+++ b/tests
On 24.05.2014 23:24, Max Reitz wrote:
This series enables qemu-iotests to be run in a build tree outside of
the source tree. It also makes the tests use the command for invoking
the Python interpreter specified through configure instead of always
using "/usr/bin/env python".
v4:
In order to allow out-of-tree iotests, create a symlink for the check
script in the build tree.
While doing so, also write configured options relevant to the iotests to
common.env in the build tree; currently, this is the command to invoke
Python 2.
Signed-off-by: Max Reitz
---
configure | 12
n an exact match.
Signed-off-by: Max Reitz
Reviewed-by: Fam Zheng
---
tests/qemu-iotests/065 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065
index ab5445f..e89b61d 100755
--- a/tests/qemu-iotests/065
+++ b/tests/qemu-iotests/065
@@
re "nbd\.c".
While working on this, also fix the regexes: '.' should be escaped and a
single backslash is not enough for escaping when enclosed by double
quotes.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/083 | 8
1 file changed, 4 insertions(+), 4 deletions(-)
d
. Just use
BlockDriverState::options instead.
Reported-by: Stefan Hajnoczi
Signed-off-by: Max Reitz
Reviewed-by: Paolo Bonzini
---
This is exactly the same patch as patch 1 from my series
"[PATCH 0/3] block: Fix filename generation for blkdebug and nbd",
except I added Paolo's R-b. The reaso
On 29.08.2014 23:40, Max Reitz wrote:
As can be seen in the final patch of this series, there are certain
cases where the current repair implementation of qcow2 actually damages
the image further because it allocates new clusters for the refcount
structure which overlap with existing but
On 26.08.2014 23:36, Max Reitz wrote:
qemu-img should use QMP commands whenever possible in order to ensure
feature completeness of both online and offline image operations. For
the "commit" command, this is relatively easy, so implement it first
(in the hope that indeed others will fo
On 16.08.2014 20:54, Max Reitz wrote:
Patch 2:
The bdrv_is_allocated() functions may return a number of zero sectors
e.g. if a sector beyond the image end has been queried. Respect this
case in qemu-io's map implementation so it doesn't run into an infinite
loop (https://bugs.launchpa
On 22.09.2014 17:36, Max Reitz wrote:
raw_co_get_block_status() should return 0 and set *pnum to 0 after the
EOF; currently it does this merely by accident, so implement it
directly. Also, nb_sectors should be clamped against the image end.
While doing that, centralize the generation of
On 15.08.2014 17:47, Max Reitz wrote:
The main purpose of this series is to add a progress report to
qemu-img amend. This is achieved by adding a callback function to
bdrv_amend_options() - the reasons for this choice are explained in
patch 1.
While adapting qcow2's expand_zero_clusters_
On Fri, Oct 10, 2014 at 8:24 PM, Peter Maydell wrote:
> On 14 September 2014 21:29, Max Filippov wrote:
>> On Sun, Sep 14, 2014 at 12:36 PM, Peter Maydell
>> wrote:
>>> The XtensaConfig structs will be defined but not used if they are
>>> for the opposite e
Am 09.10.2014 um 20:58 schrieb Benoît Canet:
On Wed, Oct 08, 2014 at 09:43:19PM +0200, Max Reitz wrote:
On 22.09.2014 17:36, Max Reitz wrote:
raw_co_get_block_status() should return 0 and set *pnum to 0 after the
EOF; currently it does this merely by accident, so implement it
directly. Also
Am 10.10.2014 um 13:50 schrieb Benoît Canet:
The Saturday 16 Aug 2014 à 20:54:16 (+0200), Max Reitz wrote :
When falling through to the underlying file in
bdrv_co_get_block_status(), do not let the number of sectors for which
information could be obtained be overwritten.
Signed-off-by: Max
t missed, it's
just printed one iteration later.
Max
Best regards
Benoît
}
retstr = ret ? "allocated" : "not allocated";
--
2.0.4
Am 09.10.2014 um 01:09 schrieb Eric Blake:
On 08/29/2014 03:41 PM, Max Reitz wrote:
The previous commit introduced the "rebuild" variable to qcow2's
implementation of the image consistency check. Now make use of this by
adding a function which creates a completely new refcount
Am 10.10.2014 um 14:29 schrieb Benoît Canet:
On Fri, Aug 29, 2014 at 11:40:53PM +0200, Max Reitz wrote:
The size of a refblock entry is (in theory) variable; calculate
therefore the number of entries per refblock and the according bit shift
(1 << x == entry count) when opening an image.
_SHIFT series". ;-)
Once again, thank you for your reviews!
Max
+if (!*refcount_table) {
+return -ENOMEM;
+}
+
+memset(*refcount_table + old_nb_clusters, 0,
+ (*nb_clusters - old_nb_clusters) * sizeof(uint16_t));
+}
+
+/* Go back to the
Am 10.10.2014 um 14:32 schrieb Eric Blake:
On 08/26/2014 03:36 PM, Max Reitz wrote:
bdrv_make_empty() is currently only called if the current image
represents an external snapshot that has been committed to its base
image; it is therefore unlikely to have internal snapshots. In this
case
Am 10.10.2014 um 18:47 schrieb Eric Blake:
On 08/26/2014 03:36 PM, Max Reitz wrote:
Add a test for qcow2's fast bdrv_make_empty implementation on images
without internal snapshots.
This test may need to be limited to compat=1.1 files.
Will do.
Signed-off-by: Max Reitz
---
tests
these look odd.
Maybe refcount_block_offset, refcount_block_* and refcount_table_offset would be
better.
I would use longer names if there was no line length limit. ;-)
I'll try and see how it looks.
Max
fcount.c | 1 +
1 file changed, 1 insertion(+)
Reviewed-by: Max Reitz
, so I can't really imagine how
introducing another local buffer should mitigate the problem, if there
is any.
Max
,
if the condition not true, l1_table = s->l1_table.
Oh, yes, you're right. Okay, so in theory nothing should happen anyway,
because qcow2 does not have to be reentrant (so s->l1_table will not be
accessed while it's big endian and therefore possibly not in CPU order).
But I find it rather ugly to convert the cached L1 table to big endian,
so I'd be fine with the patch you proposed.
Max
ly not in CPU order).
Could you detail how qcow2 does not have to be reentrant?
In below stack,
qcow2_update_snapshot_refcount
|- cpu_to_be64s(&l1_table[i])
|- bdrv_pwrite_sync
This is executed on bs->file, not the qcow2 BDS.
Max
|-- bdrv_pwrite
|--- bdrv_pwritev
| bdrv_prwv_co
|- aio_poll(aio
ut aio_poll(aio_context) will poll all BDS's aio, not only that of bs->file,
doesn't it?
Is it possible that there are pending aio which belong to this qcow2 BDS still
exist?
qcow2 is generally not reentrant, this is secured by locking
(BDRVQcowState.lock). As long as one re
/* These execute as NOPs. */
> break;
> default:
> @@ -11022,6 +11030,7 @@ static inline void
> gen_intermediate_code_internal(ARMCPU *cpu,
> tcg_gen_debug_insn_start(dc->pc);
> }
>
> +tcg_gen_add_i32(cpu_insn_count, cpu_insn_count, 1);
And here.
--
Thanks.
-- Max
ashing, but it should improve accuracy (:
>
> I had that before the change to tcg_gen_add_i32 and the crashes were
> still there. But yes, this needs to be changed to use addi.
Got backtraces of your crashes?
> How do I enable the TCG debug build?
configure with --enable-debug-tcg swithch.
--
Thanks.
-- Max
Updating the L1 table should not result in random data being written.
This adds a test for that.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/107 | 61 ++
tests/qemu-iotests/107.out | 10
tests/qemu-iotests/group | 1 +
3 files
qcow2_write_l1_entry() may read L1 entries from beyond the end of the
in-memory L1 table when updating a sector. Fix this and add a
qemu-iotest.
Max Reitz (2):
qcow2: Do not overflow when writing an L1 sector
iotests: Add test for qcow2 L1 table update
block/qcow2-cluster.c | 6
e.
Cc: qemu-sta...@nongnu.org
Signed-off-by: Max Reitz
---
block/qcow2-cluster.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index f7dd8c0..4d888c7 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@
---
block.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Max Reitz
Am 16.10.2014 um 15:34 schrieb Max Reitz:
Am 16.10.2014 um 14:10 schrieb Igor Mammedov:
change type of variable to expected IoOperationType which fixes compile
warning:
block.c:3655:20: warning: implicit conversion from enumeration
type enum IoOperationType to different enumeration type
Am 09.10.2014 um 01:09 schrieb Eric Blake:
On 08/29/2014 03:41 PM, Max Reitz wrote:
+ * cluster_count clusters; therefore, we have to allocate
+ * cluster_count - contiguous_free_clusters new clusters at the end of
+ * the image (which is the current value of cluster
->v2:
- drop custom uImage loader interface and add generic translation function
instead (suggested by Alexander Graf).
Max Filippov (2):
hw/core/loader: implement address translation in uimage loader
hw/xtensa/xtfpga: treat uImage load address as virtual
hw/arm/boot.c |
at the translated address. This fixes booting uImage kernels
on dc232b and other MMUv2 cores.
Cc: qemu-sta...@nongnu.org
Reported-by: Waldemar Brodkorb
Signed-off-by: Max Filippov
---
Changes v1->v2:
- use translate_phys_addr with the new load_uimage interface.
hw/xtensa/xtfpga.c | 2 +-
1 f
This script copies configuration and gdb information from the xtensa
configuration overlay archive and registers new xtensa core.
Signed-off-by: Max Filippov
---
target-xtensa/import_core.sh | 53
1 file changed, 53 insertions(+)
create mode 100755
Cores without windowed registers don't have window overflow/underflow
vectors. Move these vectors to a separate group defined conditionally.
Signed-off-by: Max Filippov
---
target-xtensa/overlay_tool.h | 31 +++
1 file changed, 19 insertions(+), 12 deletions(-)
nux.bin -initrd
> ../microblaze_complete.cpio.gz
qemu-system-microblaze?
--
Thanks.
-- Max
7;s and my presentation from this year's KVM Forum:
http://events.linuxfoundation.org/sites/events/files/slides/blockdev.pdf
Max
"iops_size": I/O size when limiting by iops (json-int)
- "detect_zeroes": detect and optimize zero writing (json-string)
- Possible values: "off", "on", "unmap"
+ - "write_merging": enable multiwrite_merge feature (json-bool)
- "image": the detail of the image, it is a json-object containing
the following:
- "filename": image file name (json-string)
@@ -2181,6 +2182,7 @@ Example:
"iops_wr_max": 0,
"iops_size": 0,
"detect_zeroes": "on",
+ "write_merging": "true",
"image":{
"filename":"disks/test.qcow2",
"format":"qcow2",
Hm, thanks for reminding me of that file. There are some things which I
forgot to update (ImageInfoSpecific at least)...
Max
On 2014-10-20 at 08:25, Peter Lieven wrote:
On 16.10.2014 15:25, Max Reitz wrote:
Updating the L1 table should not result in random data being written.
This adds a test for that.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/107 | 61
On 2014-10-20 at 11:14, Peter Lieven wrote:
On 20.10.2014 10:59, Max Reitz wrote:
On 2014-10-20 at 08:14, Peter Lieven wrote:
the block layer silently merges write requests since
s/^t/T/
commit 40b4f539. This patch adds a knob to disable
this feature as there has been some discussion
}
+qemu_close(fd);
+}
+}
}
new_l1_size = size_to_l1(s, offset);
diff --git a/block/qcow2.h b/block/qcow2.h
index 7d61e61..a9c8acb 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -516,6 +516,8 @@ int qcow2_pre_write_overlap_check(BlockDriverState *bs, int
ign, int64_t offset,
/* qcow2-cluster.c functions */
int qcow2_grow_l1_table(BlockDriverState *bs, uint64_t min_size,
bool exact_size);
+int qcow2_shrink_l1_and_l2_table(BlockDriverState *bs, uint64_t new_l1_size,
+ int new_l2_index, bool exact_size);
int qcow2_write_l1_entry(BlockDriverState *bs, int l1_index);
void qcow2_l2_cache_reset(BlockDriverState *bs);
int qcow2_decompress_cluster(BlockDriverState *bs, uint64_t cluster_offset);
Max
On 2014-10-20 at 12:03, Peter Lieven wrote:
On 20.10.2014 11:27, Max Reitz wrote:
On 2014-10-20 at 11:14, Peter Lieven wrote:
On 20.10.2014 10:59, Max Reitz wrote:
On 2014-10-20 at 08:14, Peter Lieven wrote:
the block layer silently merges write requests since
s/^t/T/
commit 40b4f539
On 2014-10-20 at 14:16, Peter Lieven wrote:
On 20.10.2014 13:51, Max Reitz wrote:
On 2014-10-20 at 12:03, Peter Lieven wrote:
On 20.10.2014 11:27, Max Reitz wrote:
On 2014-10-20 at 11:14, Peter Lieven wrote:
On 20.10.2014 10:59, Max Reitz wrote:
On 2014-10-20 at 08:14, Peter Lieven wrote
On 20.10.2014 at 14:48, Peter Lieven wrote:
On 20.10.2014 14:19, Max Reitz wrote:
On 2014-10-20 at 14:16, Peter Lieven wrote:
On 20.10.2014 13:51, Max Reitz wrote:
On 2014-10-20 at 12:03, Peter Lieven wrote:
[...]
Can you further help here. I think my problem was that I don't have
a
On 20.10.2014 at 15:19, Peter Lieven wrote:
On 20.10.2014 15:15, Max Reitz wrote:
On 20.10.2014 at 14:48, Peter Lieven wrote:
On 20.10.2014 14:19, Max Reitz wrote:
On 2014-10-20 at 14:16, Peter Lieven wrote:
On 20.10.2014 13:51, Max Reitz wrote:
On 2014-10-20 at 12:03, Peter Lieven wrote
On 20.10.2014 at 15:59, Peter Lieven wrote:
On 20.10.2014 15:55, Kevin Wolf wrote:
Am 20.10.2014 um 15:47 hat Peter Lieven geschrieben:
On 20.10.2014 15:31, Kevin Wolf wrote:
Am 20.10.2014 um 15:22 hat Max Reitz geschrieben:
On 20.10.2014 at 15:19, Peter Lieven wrote:
On 20.10.2014 15:15
If the qcow2 check function detects a refcount block located beyond the
image end, grow the image appropriately. This cannot break anything and
is the logical fix for such a case.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/qcow2-refcount.c | 62
'qcow2: Rebuild refcount structure during check'
009/11:[] [--] 'qcow2: Clean up after refcount rebuild'
010/11:[] [-C] 'iotests: Fix test outputs'
011/11:[0004] [FC] 'iotests: Add test for potentially damaging repairs'
Max Reitz (11):
qcow2: C
When opening dirty images, qcow2's repair function should not only
repair errors but leaks as well.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Benoît Canet
---
block/qcow2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/qcow2.c b/block/qc
We will later call calculate_refcounts multiple times, so reuse the
refcount table if possible.
Signed-off-by: Max Reitz
Reviewed-by: Benoît Canet
---
block/qcow2-refcount.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/block/qcow2-refcount.c b/block/qcow2
rebuild the refcount structure as well.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
tests/qemu-iotests/039.out | 10 --
tests/qemu-iotests/060.out | 10 --
tests/qemu-iotests/061.out | 18 --
3 files changed, 28 insertions(+), 10 deletions(-)
diff --git a
The size of a refblock entry is (in theory) variable; calculate
therefore the number of entries per refblock and the according bit shift
(1 << x == entry count) when opening an image.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/qcow2.c | 3 +++
block/qcow2.h | 2 ++
2
Because the old refcount structure will be leaked after having rebuilt
it, we need to recalculate the refcounts and run a leak-fixing operation
afterwards (if leaks should be fixed at all).
Signed-off-by: Max Reitz
Reviewed-by: Benoît Canet
---
block/qcow2-refcount.c | 35
Pull check_refblocks() before calculate_refcounts() so we can drop its
static declaration.
Signed-off-by: Max Reitz
Reviewed-by: Benoît Canet
---
block/qcow2-refcount.c | 102 -
1 file changed, 49 insertions(+), 53 deletions(-)
diff --git a
Put the code for calculating the reference counts and comparing them
during qemu-img check into own functions.
Signed-off-by: Max Reitz
Reviewed-by: Benoît Canet
---
block/qcow2-refcount.c | 153 -
1 file changed, 102 insertions(+), 51 deletions
ructure will be leaked, however. This leak will be
dealt with in a follow-up commit.
Signed-off-by: Max Reitz
---
block/qcow2-refcount.c | 296 -
1 file changed, 293 insertions(+), 3 deletions(-)
diff --git a/block/qcow2-refcount.c b/block/qcow2-r
601 - 700 of 14987 matches
Mail list logo