On 2014-10-22 at 14:39, Zhang Haoyu wrote:
Use local variable to bdrv_pwrite_sync L1 table,
needless to make conversion of cached L1 table between
big-endian and host style.
Signed-off-by: Zhang Haoyu
Reviewed-by: Max Reitz
---
v4 -> v5:
- delete superfluous check of "l1_size2 != 0&q
On 2014-10-22 at 15:51, Kevin Wolf wrote:
Am 22.10.2014 um 15:24 hat Max Reitz geschrieben:
Add a test for qemu-img map and qemu-io -c map on truncated files.
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
But how about adding a case for patch 2, too? Or is that one mostly
theoretical
On 2014-10-22 at 15:54, Max Reitz wrote:
On 2014-10-22 at 15:51, Kevin Wolf wrote:
Am 22.10.2014 um 15:24 hat Max Reitz geschrieben:
Add a test for qemu-img map and qemu-io -c map on truncated files.
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
But how about adding a case for patch 2
On 2014-10-22 at 16:48, Max Reitz wrote:
On 2014-10-22 at 15:54, Max Reitz wrote:
On 2014-10-22 at 15:51, Kevin Wolf wrote:
Am 22.10.2014 um 15:24 hat Max Reitz geschrieben:
Add a test for qemu-img map and qemu-io -c map on truncated files.
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
ge end for map'
003/3:[0002] [FC] 'iotests: Add test for map commands'
Max Reitz (3):
block: Respect underlying file's EOF
qemu-io: Respect early image end for map
iotests: Add test for map commands
block.c| 15 ++
Add a test for qemu-img map and qemu-io -c map on truncated files.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/102 | 64 ++
tests/qemu-iotests/102.out | 10
tests/qemu-iotests/group | 1 +
3 files changed, 75 insertions(+)
create
bdrv_is_allocated() may report zero clusters which most probably means
the image (file) is shorter than expected. Respect this case in order to
avoid an infinite loop.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Benoît Canet
Reviewed-by: Kevin Wolf
---
qemu-io-cmds.c | 5
: Max Reitz
---
block.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index bbb04e7..88f6d9b 100644
--- a/block.c
+++ b/block.c
@@ -3954,13 +3954,24 @@ static int64_t coroutine_fn
bdrv_co_get_block_status(BlockDriverState *bs,
if (bs->f
Wolf
Signed-off-by: Max Reitz
---
block/raw-posix.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index bd21fff..0058678 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -1465,12 +1465,12 @@ out
[FC] 'raw-posix: Fix raw_co_get_block_status() after EOF'
002/3:[0008] [FC] 'raw-posix: raw_co_get_block_status() return value'
003/3:[down] 'iotests: Add test for external image truncation'
Max Reitz (3):
raw-posix: Fix raw_co_get_block_status() after EOF
raw-posix: raw
end. This
was probably not an issue if FIEMAP or SEEK_HOLE/SEEK_DATA worked, but
the fallback did not take this case into account.
Reported-by: Kevin Wolf
Signed-off-by: Max Reitz
---
block/raw-posix.c | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/block/raw
It should not be happening, but it is possible to truncate an image
outside of qemu while qemu is running (or any of the qemu tools using
the block layer. raw_co_get_block_status() should not break then.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/102 | 15 +++
tests/qemu
On 2014-10-22 at 13:56, Kevin Wolf wrote:
Am 21.10.2014 um 10:51 hat Max Reitz geschrieben:
The bmap size in block/vdi.c may exceed INT_MAX. Using
bdrv_pwrite_sync() (which takes an int byte count) is therefore not a
good idea. The second patch of this series fixes this by replacing
On 2014-10-22 at 13:56, Kevin Wolf wrote:
Am 21.10.2014 um 10:51 hat Max Reitz geschrieben:
The bmap size in block/vdi.c may exceed INT_MAX. Using
bdrv_pwrite_sync() (which takes an int byte count) is therefore not a
good idea. The second patch of this series fixes this by replacing
On 2014-10-23 at 09:03, Kevin Wolf wrote:
Am 23.10.2014 um 00:18 hat Eric Blake geschrieben:
On 10/21/2014 03:24 AM, Max Reitz wrote:
On 2014-10-21 at 10:04, Zhang Haoyu wrote:
Use local variable to bdrv_pwrite_sync L1 table,
needless to make conversion of cached L1 table between
big-endian
On 2014-10-22 at 18:50, Eric Blake wrote:
On 10/22/2014 09:57 AM, Max Reitz wrote:
It should not be happening, but it is possible to truncate an image
outside of qemu while qemu is running (or any of the qemu tools using
the block layer. raw_co_get_block_status() should not break then.
Signed
On 2014-10-22 at 18:57, Eric Blake wrote:
On 10/22/2014 09:57 AM, Max Reitz wrote:
As its comment states, raw_co_get_block_status() should unconditionally
return 0 and set *pnum to 0 for after EOF.
An assertion after lseek(..., SEEK_HOLE) tried to catch this case by
asserting that errno
On 2014-10-23 at 09:27, Max Reitz wrote:
On 2014-10-22 at 18:57, Eric Blake wrote:
On 10/22/2014 09:57 AM, Max Reitz wrote:
As its comment states, raw_co_get_block_status() should unconditionally
return 0 and set *pnum to 0 for after EOF.
An assertion after lseek(..., SEEK_HOLE) tried to
On 2014-10-22 at 19:00, Eric Blake wrote:
On 10/22/2014 09:57 AM, Max Reitz wrote:
Instead of generating the full return value thrice in try_fiemap(),
try_seek_hole() and as a fall-back in raw_co_get_block_status() itself,
generate the value only in raw_co_get_block_status().
While at it, also
On 2014-10-23 at 09:46, Kevin Wolf wrote:
Am 23.10.2014 um 09:26 hat Max Reitz geschrieben:
On 2014-10-22 at 18:50, Eric Blake wrote:
On 10/22/2014 09:57 AM, Max Reitz wrote:
It should not be happening, but it is possible to truncate an image
outside of qemu while qemu is running (or any of
On 2014-10-22 at 20:35, Kevin Wolf wrote:
Am 22.10.2014 um 14:51 hat Max Reitz geschrieben:
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
On 2014-10-23 at 10:29, Kevin Wolf wrote:
Am 23.10.2014 um 09:46 hat Max Reitz geschrieben:
On 2014-10-22 at 20:35, Kevin Wolf wrote:
Am 22.10.2014 um 14:51 hat Max Reitz geschrieben:
bdrv_make_empty() is currently only called if the current image
represents an external snapshot that has been
On 2014-10-23 at 10:41, Kevin Wolf wrote:
Am 23.10.2014 um 10:36 hat Max Reitz geschrieben:
On 2014-10-23 at 10:29, Kevin Wolf wrote:
Am 23.10.2014 um 09:46 hat Max Reitz geschrieben:
On 2014-10-22 at 20:35, Kevin Wolf wrote:
Am 22.10.2014 um 14:51 hat Max Reitz geschrieben:
bdrv_make_empty
On 2014-10-23 at 11:42, Kevin Wolf wrote:
Am 23.10.2014 um 11:11 hat Max Reitz geschrieben:
Leaves the question, is it worth the hassle?
Probably not. Would you be fine with setting bs->drv to NULL in the
problematic error paths?
By calling qcow2_signal_corruption(), right? I think tha
"bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.raw", "encryption_key_missing": false}, "type": "unknown"}, {"io-status": "ok", "device": "ide1
On 2014-10-22 at 15:22, Peter Lieven wrote:
Output is changed by the addition of the write-merging parameter
Signed-off-by: Peter Lieven
---
tests/qemu-iotests/067.out | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Max Reitz
On 2014-10-23 at 12:06, Kevin Wolf wrote:
Am 22.10.2014 um 14:51 hat Max Reitz geschrieben:
As of a follow-up patch to this one, the length of a mirror block job
will no longer directly depend on the size of the block device;
therefore, drop these checks from this test. Instead, just check
/include/qemu/osdep.h
@@ -68,6 +68,10 @@ typedef signed int int_fast16_t;
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
+#ifndef MIN_NON_ZERO
+#define MIN_NON_ZERO(a, b) ((!!(a) && (a) < (b)) ? (a) : (b))
I contrast to Eric I'd even like (a) != 0 instead o
On 2014-10-23 at 12:52, Kevin Wolf wrote:
Am 22.10.2014 um 14:51 hat Max Reitz geschrieben:
Instead of taking the total length of the block device as the block
job's length, use the number of dirty sectors. The progress is now the
number of sectors mirrored to the target block device. Note
On 2014-10-16 at 09:54, Peter Lieven wrote:
Signed-off-by: Peter Lieven
---
block.c |4
include/block/block_int.h |3 +++
2 files changed, 7 insertions(+)
Reviewed-by: Max Reitz
On 2014-10-16 at 09:54, Peter Lieven wrote:
the limit of 0xff for 16 byte CDBs is intentional to
avoid overflows on 32-bit architectures.
How is it related to 32 bit? I somehow feel like it has to do something
with the result of sector_lun2qemu() which involves block_size...
Signed-off-
if (merge) {
size_t size;
QEMUIOVector *qiov = g_malloc0(sizeof(*qiov));
Reviewed-by: Max Reitz
I feel like we should respect max_transfer_length in more than just this
function, though. Every block device (or block driver) that sets a
maximum transfer length should check re
On 2014-10-23 at 13:59, Kevin Wolf wrote:
Am 22.10.2014 um 14:51 hat Max Reitz geschrieben:
qemu-img should use QMP commands whenever possible in order to ensure
feature completeness of both online and offline image operations. As
qemu-img itself has no access to QMP (since this would basically
On 2014-10-23 at 14:40, Kevin Wolf wrote:
Am 23.10.2014 um 14:35 hat Max Reitz geschrieben:
On 2014-10-23 at 13:59, Kevin Wolf wrote:
Am 22.10.2014 um 14:51 hat Max Reitz geschrieben:
qemu-img should use QMP commands whenever possible in order to ensure
feature completeness of both online and
On 2014-10-23 at 09:07, Max Reitz wrote:
On 2014-10-22 at 13:56, Kevin Wolf wrote:
Am 21.10.2014 um 10:51 hat Max Reitz geschrieben:
The bmap size in block/vdi.c may exceed INT_MAX. Using
bdrv_pwrite_sync() (which takes an int byte count) is therefore not a
good idea. The second patch of this
bdrv_check() could not even complete with 0 as a return
value, qemu-img check should inform the user about the error.
Signed-off-by: Max Reitz
---
qemu-img.c | 21 ++---
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index 09e7e72..731502c 100644
On 2014-10-23 at 15:51, Eric Blake wrote:
On 10/23/2014 07:29 AM, Max Reitz wrote:
Currently, if bdrv_check() fails either by returning -errno or having
check_errors set, qemu-img check just exits with 1 after having told the
user that there were no errors on the image. This is bad.
Instead of
for the backing file of BDSs only having a JSON
filename.
Signed-off-by: Max Reitz
---
Just by the way, the reason for using bs->exact_filename in
bdrv_get_full_backing_filename() instead of just testing whether
bs->filename is prefixed by "json:" is that in the future we might hav
ather just print an error and bail out.
Max Reitz (2):
block: JSON filenames and relative backing files
iotests: Add test for relative backing file names
block.c| 19 +++---
block/qapi.c | 7 +++-
include/block/block.h | 2 +-
tests/qemu-iotest
Sometimes, qemu does not have a filename to work with, so it does not
know which directory to use for a backing file specified by a relative
filename. Add a test which tests that qemu exits with an appropriate
error message.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/110 | 87
On 2014-10-23 at 15:29, Max Reitz wrote:
Currently, if bdrv_check() fails either by returning -errno or having
check_errors set, qemu-img check just exits with 1 after having told the
user that there were no errors on the image. This is bad.
Instead of printing the check result if there were
On 22.10.2014 14:39, Zhang Haoyu wrote:
Use local variable to bdrv_pwrite_sync L1 table,
needless to make conversion of cached L1 table between
big-endian and host style.
Signed-off-by: Zhang Haoyu
Reviewed-by: Max Reitz
---
v4 -> v5:
- delete superfluous check of "l1_size2 != 0&q
On 22.10.2014 14:39, Zhang Haoyu wrote:
Use local variable to bdrv_pwrite_sync L1 table,
needless to make conversion of cached L1 table between
big-endian and host style.
Signed-off-by: Zhang Haoyu
Reviewed-by: Max Reitz
---
v4 -> v5:
- delete superfluous check of "l1_size2 != 0&q
On 23.10.2014 19:42, Eric Blake wrote:
On 10/23/2014 08:56 AM, Max Reitz wrote:
When using a relative backing file name, qemu needs to know the
directory of the top image file. For JSON filenames, such a directory
cannot be easily determined (e.g. how do you determine the directory of
a qcow2
_IMG convert -f raw".
Signed-off-by: Max Reitz
---
tests/qemu-iotests/102 | 21 +++--
tests/qemu-iotests/102.out | 11 +++
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/102 b/tests/qemu-iotests/102
index 34b363f..161b197 100
posix: Fix raw_co_get_block_status() after EOF'
002/3:[] [-C] 'raw-posix: raw_co_get_block_status() return value'
003/3:[0021] [FC] 'iotests: Add test for external image truncation'
Max Reitz (3):
raw-posix: Fix raw_co_get_block_status() after EOF
raw-posix: raw_co_get_block_status() r
end. This
was probably not an issue if FIEMAP or SEEK_HOLE/SEEK_DATA worked, but
the fallback did not take this case into account.
Reported-by: Kevin Wolf
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/raw-posix.c | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
Wolf
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/raw-posix.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index a86b784..e100ae2 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
mu-img: Implement commit like QMP'
009/14:[] [--] 'qemu-img: Empty image after commit'
010/14:[0001] [FC] 'qemu-img: Enable progress output for commit'
011/14:[0019] [FC] 'qemu-img: Specify backing file for commit'
012/14:[----] [--] 'iotests: Add _fi
the dirty flag set, which only works for
compat=1.1) and creating a trivial refcount structure.
If there are snapshots or for compat=0.10, fall back to the simple
implementation (discard all clusters).
Signed-off-by: Max Reitz
---
block/blkdebug.c | 2 +
block/qcow2.c | 165
Implement this function by making all clusters in the image file fall
through to the backing file (by using the recently extended discard).
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
block/qcow2.c | 27 +++
1 file changed, 27
er in fact desirable.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
block/mirror.c | 34 ++
1 file changed, 22 insertions(+), 12 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index e8a43eb..2a1acfe 100644
--- a/block/mirr
Normally, discarded sectors should read back as zero. However, there are
cases in which a sector (or rather cluster) should be discarded as if
they were never written in the first place, that is, reading them should
fall through to the backing file again.
Signed-off-by: Max Reitz
Reviewed-by
Implement block_job_complete_sync() by doing the exact same thing as
block_job_cancel_sync() does, only with calling block_job_complete()
instead of block_job_cancel().
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
---
blockjob.c | 39
function from iotests.py, the same
applies there as well which in turn affects tests 030, 055 and 056. On
the other hand, a block job's length does not have to be related to the
length of the image file in the first place, so that check was
questionable anyway.
Signed-off-by: Max Reitz
---
tests
Introduce a new parameter for qemu-img commit which may be used to
explicitly specify the backing file into which an image should be
committed if the backing chain has more than a single layer.
Signed-off-by: Max Reitz
---
qemu-img-cmds.hx | 4 ++--
qemu-img.c | 32
Implement progress output for the commit command by querying the
progress of the block job.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
qemu-img-cmds.hx | 4 ++--
qemu-img.c | 23 +--
qemu-img.texi| 2 +-
3 files changed, 24
ck
job may be completed.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
blockjob.c | 3 +++
include/block/blockjob.h | 5 +
qapi/block-core.json | 4 +++-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/blockjob.c b/blockjob.c
ind
After the top image has been committed, it should be emptied unless
specified otherwise.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
qemu-img-cmds.hx | 4 ++--
qemu-img.c | 34 +++---
qemu-img.texi| 6 +-
3 files
Add a test for qemu-img commit on backing chains with more than two
images. This test also checks whether the top image is emptied (unless
this is prevented by specifying either -d or -b) and does therefore not
work for qed and vmdk which requires it to be separate from 020.
Signed-off-by: Max
block-commit by using commit_active_start() and then
waiting for the block job to finish.
Signed-off-by: Max Reitz
---
block/Makefile.objs | 3 +--
qemu-img.c | 78 -
2 files changed, 60 insertions(+), 21 deletions(-)
diff --git a/
Add a test for qcow2's fast bdrv_make_empty implementation on images
without internal snapshots.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/098 | 82 ++
tests/qemu-iotests/098.out | 52 +
tests/qemu-iotests/
As different image formats most probably map guest addresses to
different host addresses, add a filter to filter the host addresses out;
also, the image filename should be filtered.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
tests/qemu-iotests/common.filter
On 2014-10-24 at 18:31, Eric Blake wrote:
On 10/24/2014 07:57 AM, Max Reitz wrote:
Add a test for qcow2's fast bdrv_make_empty implementation on images
without internal snapshots.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/098
On 2014-10-25 at 09:00, Zhang Haoyu wrote:
Hi, Max
How is the progress of optimizing qcow2_check_metadata_overlap?
http://thread.gmane.org/gmane.comp.emulators.kvm.devel/127037/focus=127364
Thanks,
Zhang Haoyu
Hi Zhang Haoyu,
there are still a couple of upstream series I've worked o
On 2014-10-25 at 17:05, Peter Lieven wrote:
As discussed during review a follow up for Max's fix.
Signed-off-by: Peter Lieven
---
tests/qemu-iotests/107 |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Max Reitz
On 2014-10-25 at 17:16, Peter Lieven wrote:
Am 23.10.2014 um 13:18 schrieb Max Reitz:
On 2014-10-16 at 09:54, Peter Lieven wrote:
the limit of 0xff for 16 byte CDBs is intentional to
avoid overflows on 32-bit architectures.
How is it related to 32 bit? I somehow feel like it has to do
/include/qemu/osdep.h
@@ -68,6 +68,12 @@ typedef signed int int_fast16_t;
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
+/* Minimum function that returns zero only iff both values are zero.
+ * Intended for use with unsigned values only. */
+#ifndef MIN_NON_ZERO
+#def
n);
+
if (iscsilun->lbp.lbpu) {
if (iscsilun->bl.max_unmap < 0x) {
bs->bl.max_discard = sector_lun2qemu(iscsilun->bl.max_unmap,
Hm, seems strange to have a function called nb_sectors_lun2qemu() not
only convert values, but also cap the result. But anyway:
Reviewed-by: Max Reitz
On 2014-10-25 at 18:18, Peter Lieven wrote:
As Max pointed out there is a hidden cast from int64_t to int.
So use the newly introduced nb_sectors_lun2qemu for all
limits.
Signed-off-by: Peter Lieven
---
block/iscsi.c | 20 ++--
1 file changed, 10 insertions(+), 10
On 2014-10-25 at 18:18, Peter Lieven wrote:
Cancel oversized requests early. They would generate
an iSCSI protocol error anyway; after having transferred
possibly a lot of data over the wire.
Suggested-By: Max Reitz
Signed-off-by: Peter Lieven
---
block/iscsi.c | 12
1 file
On 2014-10-27 at 09:35, Peter Lieven wrote:
On 27.10.2014 09:32, Max Reitz wrote:
On 2014-10-25 at 18:18, Peter Lieven wrote:
As Max pointed out there is a hidden cast from int64_t to int.
So use the newly introduced nb_sectors_lun2qemu for all
limits.
Signed-off-by: Peter Lieven
---
block
On 2014-10-27 at 09:36, Peter Lieven wrote:
On 27.10.2014 09:28, Max Reitz wrote:
On 2014-10-25 at 18:18, Peter Lieven wrote:
Copy the max_xfer_len from the BlockLimits VPD or use the
maximum value fitting in the CDB.
Signed-off-by: Peter Lieven
---
block/iscsi.c | 17
-core.json |7 ++-
6 files changed, 22 insertions(+), 2 deletions(-)
Reviewed-by: Max Reitz
On 2014-10-27 at 09:47, Peter Lieven wrote:
On 27.10.2014 09:44, Max Reitz wrote:
On 2014-10-27 at 09:36, Peter Lieven wrote:
On 27.10.2014 09:28, Max Reitz wrote:
On 2014-10-25 at 18:18, Peter Lieven wrote:
Copy the max_xfer_len from the BlockLimits VPD or use the
maximum value fitting in
(+)
create mode 100755 tests/qemu-iotests/109
create mode 100644 tests/qemu-iotests/109.out
First:
Reviewed-by: Max Reitz
Second: Why are you using query-block at all? Just give both the format
and the protocol BDS a (different) node name and you could use only
query-named-block-nodes.
Max
On 2014-10-24 at 18:23, Eric Blake wrote:
On 10/24/2014 07:57 AM, Max Reitz wrote:
Introduce a new parameter for qemu-img commit which may be used to
explicitly specify the backing file into which an image should be
committed if the backing chain has more than a single layer.
Signed-off-by
is the range for nb_sectors throughout
the block layer.
Signed-off-by: Peter Lieven
---
block/iscsi.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
Okay, I think finding the comment in the commit message through git
blame is reasonable.
Reviewed-by: Max Reitz
On 2014-10-27 at 10:18, Peter Lieven wrote:
As Max pointed out there is a hidden cast from int64_t to int for all
limits. So use the newly introduced sector_limits_lun2qemu for all
limits received from the target.
Signed-off-by: Peter Lieven
---
block/iscsi.c | 20 ++--
1
Now that bdrv_amend_options() supports a status callback, use it to
display a progress report.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Benoît Canet
---
qemu-img-cmds.hx | 4 ++--
qemu-img.c | 25 ++---
qemu-img.texi| 2 +-
3 files changed
block/qcow2: Make get_refcount() global'
006/7:[0006] [FC] 'block/qcow2: Simplify shared L2 handling in amend'
007/7:[] [--] 'iotests: Expand test 061'
Max Reitz (7):
block: Add status callback to bdrv_amend_options()
qemu-img: Add progress output for amend
qemu
l.
A callback may not be very pretty, but it's very easy to implement and
perfectly fits its purpose here.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Benoît Canet
---
block.c | 5 +++--
block/qcow2.c | 3 ++-
include/block/block.h | 8 +++
As soon as options is set in img_amend(), it needs to be freed before
the function returns. This leak is rather insignificant, as qemu-img
will exit subsequently anyway, but there's no point in not fixing it.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Benoit Canet
---
or 1; any value is fine.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Benoît Canet
---
block/qcow2-refcount.c | 26 +-
block/qcow2.h | 2 ++
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/block/qcow2-refcount.c b/block/qcow2-
allocated for expansion. This will be the correct refcount and
therefore we don't have to remember that cluster having been allocated
any more.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Benoît Canet
---
block/qcow2-cluster.c
Add some tests for progress output to 061.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Benoît Canet
---
tests/qemu-iotests/061 | 25 +
tests/qemu-iotests/061.out | 30 ++
tests/qemu-iotests/group | 2 +-
3 files
the number of L1 entries visited
during the operation.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Benoît Canet
---
block/qcow2-cluster.c | 37 +
block/qcow2.c | 7 ---
block/qcow2.h | 3 ++-
3 files changed, 39
(down to approximately 512 TB).
The VDI test 084 has to be adapted accordingly. Actually, one could
clearly see that it was broken from the "Could not open
'TEST_DIR/t.IMGFMT': Invalid argument" line for an image which was
supposed to work just fine.
Signed-off-by: Max Reitz
On 2014-10-27 at 12:10, Peter Lieven wrote:
On 27.10.2014 11:56, Max Reitz wrote:
The block layer read and write functions do not like requests which are
bigger than INT_MAX bytes. Since the VDI bmap is read and written in a
single operation, its size is therefore limited accordingly. This
On 2014-10-27 at 12:39, Max Reitz wrote:
On 2014-10-27 at 12:10, Peter Lieven wrote:
On 27.10.2014 11:56, Max Reitz wrote:
The block layer read and write functions do not like requests which are
bigger than INT_MAX bytes. Since the VDI bmap is read and written in a
single operation, its size
ory: No such file or directory
Just propagating the error is sufficient:
$ qemu-img create -f qcow2 -b /tmp/enoent /tmp/img.qcow2
qemu-img /tmp/img.qcow2: Could not open '/tmp/enoent': No such file or
directory
Max Reitz (2):
block: Propagate error in bdrv_img_create()
iotests: Add test
Test the error message when a COW file is about to be created which is
supposed to inherit the size of its backing file, while the backing file
given does not actually exist.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/111 | 53 ++
tests/qemu
If the specified backing file could not be opened, do not generate a new
error message which contains the message which has been generated by
bdrv_open(), but just propagate the latter.
Signed-off-by: Max Reitz
---
block.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/block.c b
On 2014-10-27 at 18:14, Eric Blake wrote:
On 10/27/2014 06:30 AM, Max Reitz wrote:
Test the error message when a COW file is about to be created which is
supposed to inherit the size of its backing file, while the backing file
given does not actually exist.
Signed-off-by: Max Reitz
Hi,
On Sun, Oct 19, 2014 at 8:04 AM, Max Filippov wrote:
> Such address translation is needed when load address recorded in uImage
> is a virtual address. When the actual load address is requested, return
> untranslated address: user that needs the translated address can alway
(down to approximately 512 TB).
The VDI test 084 has to be adapted accordingly. Actually, one could
clearly see that it was broken from the "Could not open
'TEST_DIR/t.IMGFMT': Invalid argument" line for an image which was
supposed to work just fine.
Signed-off-by: Max Reitz
--
in bdrv_open_common.
Signed-off-by: Kevin Wolf
Signed-off-by: Peter Lieven
Reviewed-by: Max Reitz
---
block.c | 38 +-
1 file changed, 33 insertions(+), 5 deletions(-)
Is this purely because the QemuOptsList API is more convenient than
qdict?
I don'
On 2014-10-28 at 17:38, Kevin Wolf wrote:
Am 27.10.2014 um 11:12 hat Max Reitz geschrieben:
Add some tests for progress output to 061.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Benoît Canet
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
index 9bbd5d3
want to
warn anyway just so the user knows that he/she should rename the image file.
So for me it comes down to what is easier, and I think just always
emitting the warning is easier.
Max
I was about to propose these two rules as something I'd still feel more
comfortable with:
if it is
could reuse this for bdrv_named_nodes_list(), but that's optional.
Reviewed-by: Max Reitz
801 - 900 of 14987 matches
Mail list logo