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

2015-08-05 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 --- tests/qemu-iotests/060 | 222 + tests/qemu-iotests/060.out | 47

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

2015-08-05 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 --- qapi/block-core.json | 31 +++ 1 file changed, 31 insertions(+) diff --git a/qapi/block-core.json b/qapi/block-core.json index

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

2015-08-05 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 --- block/qcow2.c | 35

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

2015-08-05 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 --- docs/qmp/qmp-events.txt | 27

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

2015-08-05 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 Reviewed-by: Eric Blake --- block/qcow2-snapshot.c | 25 + 1 file changed, 25 insertions(+) diff --git a/block/qcow2-snapshot.c b/block

[Qemu-block] [PATCH v6 09/17] qcow2/overlaps: Protect snapshot table

2015-08-05 Thread Max Reitz
Keep track of the snapshot table in the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-snapshot.c | 10 ++ block/qcow2.c | 6 ++ 2 files changed, 16 insertions(+) diff --git a/block/qcow2

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

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

[Qemu-block] [PATCH v2 0/5] block: Drop BDS.filename

2015-08-05 Thread Max Reitz
ock: Add bdrv_filename()' 004/5:[0038] [FC] 'block: Drop BlockDriverState.filename' 005/5:[down] 'iotests: Test changed Quorum filename' Max Reitz (5): block: Change bdrv_get_encrypted_filename() block: Avoid BlockDriverState.filename block: Add bdrv_filename() bl

[Qemu-block] [PATCH v2 3/5] block: Add bdrv_filename()

2015-08-05 Thread Max Reitz
. Since bdrv_refresh_filename() therefore no longer refreshes that field, some calls to that function have to be replaced by calls to bdrv_filename() "manually" refreshing the BDS filename field (this is only temporary). Signed-off-by: Max Reitz --- block.c

[Qemu-block] [PATCH v2 1/5] block: Change bdrv_get_encrypted_filename()

2015-08-05 Thread Max Reitz
Instead of returning a pointer to the filename, copy it into a buffer specified by the caller. Signed-off-by: Max Reitz --- block.c | 24 +--- include/block/block.h | 2 +- monitor.c | 4 +++- 3 files changed, 21 insertions(+), 9 deletions

[Qemu-block] [PATCH v2 2/5] block: Avoid BlockDriverState.filename

2015-08-05 Thread Max Reitz
emove that field, using exact_filename is fine, too (this is the only user of BlockDriverState.filename which frequently queries that field). Signed-off-by: Max Reitz --- block.c | 4 ++-- block/gluster.c | 2 +- block/raw-posix.c | 8 block/raw-win32.c | 4 ++-- qemu-

[Qemu-block] [PATCH v2 5/5] iotests: Test changed Quorum filename

2015-08-05 Thread Max Reitz
contained in the Quorum BDS's filename as returned by query-block. As a nice side effect of confirming that the new BDS actually belongs to the Quorum BDS, this checks whether the filename was properly updated. Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 17 + 1 file ch

[Qemu-block] [PATCH v2 4/5] block: Drop BlockDriverState.filename

2015-08-05 Thread Max Reitz
else a buffer is created on the stack to hold the result of bdrv_filename(); any access to BlockDriverState.filename is then replaced by this buffer Signed-off-by: Max Reitz --- block.c | 40 block/blkverify.c | 3 +-- block/co

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/5] block: Change bdrv_get_encrypted_filename()

2015-08-07 Thread Max Reitz
On 06.08.2015 04:01, Wen Congyang wrote: On 08/06/2015 04:52 AM, Max Reitz wrote: Instead of returning a pointer to the filename, copy it into a buffer specified by the caller. Signed-off-by: Max Reitz --- block.c | 24 +--- include/block/block.h | 2

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/5] block: Avoid BlockDriverState.filename

2015-08-07 Thread Max Reitz
On 06.08.2015 04:27, Wen Congyang wrote: On 08/06/2015 04:52 AM, Max Reitz wrote: In places which directly pass a filename to the OS, we should not use the filename field at all but exact_filename instead (although the former currently equals the latter if that is set). In qemu-img'

[Qemu-block] [PATCH] block/raw-posix: Use raw_normalize_devicepath()

2015-08-12 Thread Max Reitz
NetBSD) or it is about a deprecated device (i.e. floppy). Signed-off-by: Max Reitz --- block/raw-posix.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index 855febe..30df8ad 100644 --- a/block/raw-posix.c +++ b

[Qemu-block] [PATCH v3 0/5] block: Drop BDS.filename

2015-08-12 Thread Max Reitz
ame()' 004/5:[0129] [FC] 'block: Drop BlockDriverState.filename' 005/5:[] [--] 'iotests: Test changed Quorum filename' Max Reitz (5): block: Change bdrv_get_encrypted_filename() block: Avoid BlockDriverState.filename block: Add bdrv_filename() block: Drop Bloc

[Qemu-block] [PATCH v3 1/5] block: Change bdrv_get_encrypted_filename()

2015-08-12 Thread Max Reitz
Instead of returning a pointer to the filename, copy it into a buffer specified by the caller. Signed-off-by: Max Reitz --- block.c | 25 ++--- include/block/block.h | 2 +- monitor.c | 6 +- 3 files changed, 24 insertions(+), 9 deletions

[Qemu-block] [PATCH v3 4/5] block: Drop BlockDriverState.filename

2015-08-12 Thread Max Reitz
e else bdrv_filename_alloc() is used, any access to BlockDriverState.filename is then replaced by the buffer returned, and it is freed when it is no longer needed Signed-off-by: Max Reitz --- block.c | 47 ++- block/blkverify.c

[Qemu-block] [PATCH v3 2/5] block: Avoid BlockDriverState.filename

2015-08-12 Thread Max Reitz
emove that field, using exact_filename is fine, too (this is the only user of BlockDriverState.filename which frequently queries that field). Signed-off-by: Max Reitz --- block.c | 5 +++-- block/gluster.c | 2 +- block/raw-posix.c | 8 block/raw-win32.c | 4 ++-- qemu-

[Qemu-block] [PATCH v3 5/5] iotests: Test changed Quorum filename

2015-08-12 Thread Max Reitz
contained in the Quorum BDS's filename as returned by query-block. As a nice side effect of confirming that the new BDS actually belongs to the Quorum BDS, this checks whether the filename was properly updated. Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 17 + 1 file ch

[Qemu-block] [PATCH v3 3/5] block: Add bdrv_filename()

2015-08-12 Thread Max Reitz
llocates a buffer of size PATH_MAX, call bdrv_filename() on that buffer and returns it, since needing a temporary buffer for the filename is a rather common pattern. Signed-off-by: Max Reitz --- block.c | 39 --- block/blkverify.c | 3 ++- bloc

[Qemu-block] [PATCH v4 2/6] block: Avoid BlockDriverState.filename

2015-08-18 Thread Max Reitz
pointing to the filename. Signed-off-by: Max Reitz --- block.c | 5 +++-- block/gluster.c | 2 +- block/raw-posix.c | 12 ++-- block/raw-win32.c | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/block.c b/block.c index 41b0f85..1572785 100644 --- a/block.c

[Qemu-block] [PATCH v4 0/6] block: Drop BDS.filename

2015-08-18 Thread Max Reitz
] 'block: Drop BlockDriverState.filename' 006/6:[] [--] 'iotests: Test changed Quorum filename' Max Reitz (6): block: Change bdrv_get_encrypted_filename() block: Avoid BlockDriverState.filename block: Add bdrv_filename() qemu-img: Use bdrv_filename_alloc() for

[Qemu-block] [PATCH v4 4/6] qemu-img: Use bdrv_filename_alloc() for map

2015-08-18 Thread Max Reitz
Replaces bs->filename by the result of bdrv_filename_alloc() in the qemu-img map subcommand. Since that value is queried relatively often, however, it should be cached. Signed-off-by: Max Reitz --- qemu-img.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --gi

[Qemu-block] [PATCH v4 5/6] block: Drop BlockDriverState.filename

2015-08-18 Thread Max Reitz
e else bdrv_filename_alloc() is used, any access to BlockDriverState.filename is then replaced by the buffer returned, and it is freed when it is no longer needed Signed-off-by: Max Reitz --- block.c | 47 ++- block/blkverify.c

[Qemu-block] [PATCH v4 1/6] block: Change bdrv_get_encrypted_filename()

2015-08-18 Thread Max Reitz
Instead of returning a pointer to the filename, copy it into a buffer specified by the caller. Signed-off-by: Max Reitz --- block.c | 25 ++--- include/block/block.h | 2 +- monitor.c | 6 +- 3 files changed, 24 insertions(+), 9 deletions

[Qemu-block] [PATCH v4 3/6] block: Add bdrv_filename()

2015-08-18 Thread Max Reitz
llocates a buffer of size PATH_MAX, call bdrv_filename() on that buffer and returns it, since needing a temporary buffer for the filename is a rather common pattern. Signed-off-by: Max Reitz --- block.c | 39 --- block/blkverify.c | 3 ++- bloc

[Qemu-block] [PATCH v4 6/6] iotests: Test changed Quorum filename

2015-08-18 Thread Max Reitz
contained in the Quorum BDS's filename as returned by query-block. As a nice side effect of confirming that the new BDS actually belongs to the Quorum BDS, this checks whether the filename was properly updated. Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 17 + 1 file ch

[Qemu-block] [PATCH] qemu-img: Fix crash in amend invocation

2015-08-18 Thread Max Reitz
fixed, too). Reported-by: Dr. David Alan Gilbert Cc: qemu-stable Signed-off-by: Max Reitz --- qemu-img.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 75f4ee4..3ddb391 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2930,8 +2930,7 @@ static int

[Qemu-block] [PATCH v2] qemu-img: Fix crash in amend invocation

2015-08-20 Thread Max Reitz
fixed, too). Reported-by: Dr. David Alan Gilbert Cc: qemu-stable Signed-off-by: Max Reitz --- v2: - Fix leak introduced by trying to be clever [Eric] (thank you for catching this!) --- qemu-img.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c

Re: [Qemu-block] [Qemu-devel] [PATCH] block/nfs: fix calculation of allocated file size

2015-08-21 Thread Max Reitz
blocks * st.st_blksize); +return (task.ret < 0 ? task.ret : st.st_blocks * 512); } static int nfs_file_truncate(BlockDriverState *bs, int64_t offset) Reviewed-by: Max Reitz

Re: [Qemu-block] [Qemu-devel] [PATCH] block/nfs: cache allocated filesize for read-only files

2015-08-21 Thread Max Reitz
On 2015-08-21 at 00:49, Peter Lieven wrote: If the file is readonly its not expected to grow so save the blocking call to nfs_fstat_async and use the value saved at connection time. Also important the monitor (and thus the main loop) will not hang if block device info is queried and the NFS share

Re: [Qemu-block] [Qemu-devel] [PATCH] block/nfs: cache allocated filesize for read-only files

2015-08-21 Thread Max Reitz
On 2015-08-21 at 11:11, Peter Lieven wrote: Am 21.08.2015 um 18:46 schrieb Max Reitz: On 2015-08-21 at 00:49, Peter Lieven wrote: If the file is readonly its not expected to grow so save the blocking call to nfs_fstat_async and use the value saved at connection time. Also important the monitor

Re: [Qemu-block] [PATCHv2] block/nfs: cache allocated filesize for read-only files

2015-08-24 Thread Max Reitz
ied and the NFS share > is unresponsive. > > Signed-off-by: Peter Lieven > --- > v1->v2: update cache on reopen_prepare [Max] > > block/nfs.c | 35 +++ > 1 file changed, 35 insertions(+) Reviewed-by: Max Reitz I hope you're re

Re: [Qemu-block] [PATCH] block: Override the driver in the filename with the user-specified one

2015-08-24 Thread Max Reitz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 24.08.2015 15:05, Alberto Garcia wrote: > If an image is opened with driver-specific options then attempting > to use snapshot_blkdev will fail with "Driver specified twice". > > The reason is that bs->filename is replaced with a full JSON object

Re: [Qemu-block] [PATCH v7 0/4] Clean unused entries in the qcow2 L2/refcount cache

2015-08-24 Thread Max Reitz
On 04.08.2015 14:14, Alberto Garcia wrote: > v7: > - Rebase against the current master. > - Update version number in the 'since' field of the > 'cache-clean-interval' option. > > v6: https://lists.gnu.org/archive/html/qemu-devel/2015-06/msg01929.html > - Update documentation to clarify what "unu

Re: [Qemu-block] [PATCHv2] block/nfs: cache allocated filesize for read-only files

2015-08-24 Thread Max Reitz
On 24.08.2015 21:34, Peter Lieven wrote: > Am 24.08.2015 um 20:39 schrieb Max Reitz: >> On 24.08.2015 10:06, Peter Lieven wrote: >>> If the file is readonly its not expected to grow so >>> save the blocking call to nfs_fstat_async and use >>> the value save

Re: [Qemu-block] [PATCH] block: Override the driver in the filename with the user-specified one

2015-08-26 Thread Max Reitz
On 25.08.2015 09:03, Alberto Garcia wrote: > On Mon 24 Aug 2015 08:54:56 PM CEST, Max Reitz wrote: > > [bdrv_fill_options()] >> User-specified options should always have precedence over any other >> option. The thing is, we consider the filename to be specified by the &

[Qemu-block] [PATCH 0/5] block: Drop drv parameter from bdrv_open()

2015-08-26 Thread Max Reitz
f you feel this is a bad decision, feel free to argue but then I guess we'll have to reevaluate all bdrv_find_format() calls whether they should actually be bdrv_find_whitelisted_format() calls. Max Reitz (5): block: Always pass NULL as drv for bdrv_open() block: Drop drv parameter from

[Qemu-block] [PATCH 1/5] block: Always pass NULL as drv for bdrv_open()

2015-08-26 Thread Max Reitz
Change all callers of bdrv_open() to pass the driver name in the options QDict instead of passing its BlockDriver pointer. Signed-off-by: Max Reitz --- block.c | 24 ++-- block/qcow2.c | 16 - block/vvfat.c | 8 +-- blockdev.c| 72

[Qemu-block] [PATCH 3/5] block: Drop drv parameter from bdrv_open_inherit()

2015-08-26 Thread Max Reitz
Now that this parameter is effectively unused, we can drop it and just pass NULL to bdrv_fill_options(). Signed-off-by: Max Reitz --- block.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/block.c b/block.c index ac89487..8aa5f25 100644 --- a/block.c

[Qemu-block] [PATCH 2/5] block: Drop drv parameter from bdrv_open()

2015-08-26 Thread Max Reitz
Now that this parameter is effectively unused, we can drop it and just pass NULL on to bdrv_open_inherit(). Signed-off-by: Max Reitz --- block.c | 9 - block/block-backend.c | 2 +- block/parallels.c | 2 +- block/qcow.c | 2 +- block/qcow2.c | 6

[Qemu-block] [PATCH 4/5] block: Drop drv parameter from bdrv_fill_options()

2015-08-26 Thread Max Reitz
Now that this parameter is effectively unused, we can drop it and change the function accordingly. Signed-off-by: Max Reitz --- block.c | 59 ++- 1 file changed, 22 insertions(+), 37 deletions(-) diff --git a/block.c b/block.c index

[Qemu-block] [PATCH 5/5] block: Drop bdrv_find_whitelisted_format()

2015-08-26 Thread Max Reitz
It is unused by now, so we can drop it. Signed-off-by: Max Reitz --- block.c | 7 --- include/block/block.h | 2 -- 2 files changed, 9 deletions(-) diff --git a/block.c b/block.c index 434f43c..461eb94 100644 --- a/block.c +++ b/block.c @@ -313,13 +313,6 @@ static int

Re: [Qemu-block] [PATCH V3] block/nfs: cache allocated filesize for read-only files

2015-08-29 Thread Max Reitz
ied and the NFS share > is unresponsive. > > Signed-off-by: Peter Lieven > --- > v1->v2: update cache on reopen_prepare [Max] > v2->v3: use cache only if cache.direct=off [Max] > > block/nfs.c | 36 > 1 file c

[Qemu-block] [PATCH 1/2] iotests: Do not suppress segfaults in bash tests

2015-08-31 Thread Max Reitz
fail anyway because of missing output, but not necessarily (as happened with test 82 recently). Fix this by making the corresponding environment variables point to wrapper functions which execute the respective command in a subshell. Signed-off-by: Max Reitz --- tests/qemu-iotests/039

[Qemu-block] [PATCH 0/2] iotests: Emit signal-kill messages

2015-08-31 Thread Max Reitz
the second patch adds a similar notification for the python tests. Max Reitz (2): iotests: Do not suppress segfaults in bash tests iotests: Warn if python subprocess is killed tests/qemu-iotests/039 | 19 ++- tests/qemu-iotests/039.out | 6 +++--- tests/qemu

[Qemu-block] [PATCH 2/2] iotests: Warn if python subprocess is killed

2015-08-31 Thread Max Reitz
Currently, if a subprocess of a python test (i.e. qemu-io, qemu-img, or qemu) receives a signal and is subsequently aborted, this is not logged. This patch makes python tests always check the exit code of these subprocesses, and emit a message if they have been killed. Signed-off-by: Max Reitz

Re: [Qemu-block] [PATCH 1/1] block: Allow passing BlockdevOptions to blockdev-snapshot-sync

2015-08-31 Thread Max Reitz
On 31.08.2015 12:00, Alberto Garcia wrote: > Snapshots created using blockdev-snapshot-sync are currently opened > using their default options, not even inheriting those from the images > they are based on. > > This patch extends the command by adding an 'options' parameter that > takes a Blockdev

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] block: Allow passing BlockdevOptions to blockdev-snapshot-sync

2015-08-31 Thread Max Reitz
On 31.08.2015 22:05, Eric Blake wrote: > On 08/31/2015 01:53 PM, Max Reitz wrote: > >> Design question: Would it make sense to instead add a "reference" mode >> to blockdev-snapshot-sync where you can specify a BDS's node-name >> instead of snapshot-fil

Re: [Qemu-block] [Qemu-devel] [PATCH v4 1/6] block: Change bdrv_get_encrypted_filename()

2015-09-02 Thread Max Reitz
On 31.08.2015 22:50, Eric Blake wrote: > On 08/18/2015 05:10 PM, Max Reitz wrote: >> Instead of returning a pointer to the filename, copy it into a buffer >> specified by the caller. >> >> Signed-off-by: Max Reitz >> --- >> block.c | 25

Re: [Qemu-block] [Qemu-devel] [PATCH v4 3/6] block: Add bdrv_filename()

2015-09-02 Thread Max Reitz
On 31.08.2015 23:00, Eric Blake wrote: > On 08/18/2015 05:10 PM, Max Reitz wrote: >> Split the part which actually refreshes the BlockDriverState.filename >> field off of bdrv_refresh_filename() into a more generic function >> bdrv_filename(), which first calls bdrv_refres

Re: [Qemu-block] [PATCH 1/2] iotests: Do not suppress segfaults in bash tests

2015-09-02 Thread Max Reitz
On 01.09.2015 00:55, Jeff Cody wrote: > On Mon, Aug 31, 2015 at 09:05:12PM +0200, Max Reitz wrote: >> Currently, if a qemu/qemu-io/qemu-img/qemu-nbd invocation receives a >> segmentation fault, that message is invisible in most cases since the >> output is generally filtere

[Qemu-block] [PATCH v2 0/4] iotests: Emit signal-kill messages

2015-09-02 Thread Max Reitz
lts in tests 41 and 55' 003/4:[0047] [FC] 'iotests: Do not suppress segfaults in bash tests' 004/4:[] [--] 'iotests: Warn if python subprocess is killed' Max Reitz (4): iotests: More options for VM.add_drive() iotests: Respect -nodefaults in tests 41 and 55 iotests:

[Qemu-block] [PATCH v2 1/4] iotests: More options for VM.add_drive()

2015-09-02 Thread Max Reitz
This patch allows specifying the interface to be used for the drive, and makes specifying a path optional (if the path is None, the "file" option will be omitted, thus creating an empty drive). Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/iotests.py | 9 ++

[Qemu-block] [PATCH v2 2/4] iotests: Respect -nodefaults in tests 41 and 55

2015-09-02 Thread Max Reitz
While -nodefaults is set in $QEMU_OPTIONS, this is currently (wrongly) ignored for Python iotests. In order to be prepared for when this is fixed, we should explicitly add an IDE CD-ROM drive instead of relying on it being created automatically. Signed-off-by: Max Reitz --- tests/qemu-iotests

[Qemu-block] [PATCH v2 3/4] iotests: Do not suppress segfaults in bash tests

2015-09-02 Thread Max Reitz
were broken for the Python tests; this patch "accidentally" fixes that. Signed-off-by: Max Reitz --- tests/qemu-iotests/039 | 19 ++- tests/qemu-iotests/039.out | 6 +++--- tests/qemu-iotests/061 | 6 -- tests/qemu-iotests/061.out

[Qemu-block] [PATCH v2 4/4] iotests: Warn if python subprocess is killed

2015-09-02 Thread Max Reitz
Currently, if a subprocess of a python test (i.e. qemu-io, qemu-img, or qemu) receives a signal and is subsequently aborted, this is not logged. This patch makes python tests always check the exit code of these subprocesses, and emit a message if they have been killed. Signed-off-by: Max Reitz

Re: [Qemu-block] [PATCH v2 02/13] qemu-io: Remove duplicate 'open' error message

2015-09-04 Thread Max Reitz
On 04.09.2015 19:18, Kevin Wolf wrote: > qemu_opts_parse_noisily() already prints an error message with the exact > reason why the parsing failed. No need to add another less specific one. > > Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz signature.asc Description: Ope

Re: [Qemu-block] [PATCH v2 04/13] qcow2: Improve error message

2015-09-04 Thread Max Reitz
> 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v2 03/13] qemu-io: Add command 'reopen'

2015-09-04 Thread Max Reitz
On 04.09.2015 19:18, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > qemu-io-cmds.c | 90 > ++ > 1 file changed, 90 insertions(+) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v2 11/13] qcow2: Support updating driver-specific options in reopen

2015-09-04 Thread Max Reitz
ook the functions up in > bdrv_reopen(). > > Signed-off-by: Kevin Wolf > --- > block/qcow2.c | 71 > ++- > 1 file changed, 65 insertions(+), 6 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v2 12/13] qemu-iotests: Reopen qcow2 with lazy-refcounts change

2015-09-04 Thread Max Reitz
MGOPTS="compat=1.1,lazy_refcounts=on" > +_make_test_img $size > + > +$QEMU_IO -c "reopen -o lazy-refcounts=off" \ > + -c "write -P 0x5a 0 512" \ Maybe it would be nicer to test this the other way around, write first and then disable lazy refcounts in

Re: [Qemu-block] [PATCH v2 13/13] qemu-iotests: More qcow2 reopen tests

2015-09-04 Thread Max Reitz
On 04.09.2015 19:18, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/137 | 143 > + > tests/qemu-iotests/137.out | 43 ++ > tests/qemu-iotests/group | 1 + > 3 files changed, 187 insertions(+) > create mod

Re: [Qemu-block] [PATCH v4 01/38] block: Remove host floppy support

2015-09-07 Thread Max Reitz
On 07.09.2015 17:59, Kevin Wolf wrote: > Am 20.07.2015 um 19:45 hat Max Reitz geschrieben: >> It has been deprecated as of 2.3, so we can now remove it. >> >> Signed-off-by: Max Reitz > >> @@ -2241,8 +2188,9 @@ static BlockAIOCB *hdev_aio_ioctl(Bloc

Re: [Qemu-block] [PATCH v4 02/38] blockdev: Allow creation of BDS trees without BB

2015-09-07 Thread Max Reitz
On 07.09.2015 18:12, Kevin Wolf wrote: > Am 20.07.2015 um 19:45 hat Max Reitz geschrieben: >> If the "id" field is missing from the options given to blockdev-add, >> just omit the BlockBackend and create the BlockDriverState tree alone. >> >> However, if

Re: [Qemu-block] [PATCH v4 03/38] iotests: Only create BB if necessary

2015-09-07 Thread Max Reitz
On 07.09.2015 18:20, Kevin Wolf wrote: > Am 20.07.2015 um 19:45 hat Max Reitz geschrieben: >> Tests 071 and 081 test giving references in blockdev-add. It is not >> necessary to create a BlockBackend here, so omit it. >> >> Signed-off-by: Max Reitz >> Review

Re: [Qemu-block] [PATCH v4 06/38] block: Make bdrv_is_inserted() recursive

2015-09-07 Thread Max Reitz
On 07.09.2015 19:43, Kevin Wolf wrote: > Am 20.07.2015 um 19:45 hat Max Reitz geschrieben: >> If bdrv_is_inserted() is called on the top level BDS, it should make >> sure all nodes in the BDS tree are actually inserted. >> >> Signed-off-by: Max Reitz >> Review

Re: [Qemu-block] [PATCH v4 07/38] block/quorum: Implement bdrv_is_inserted()

2015-09-07 Thread Max Reitz
On 07.09.2015 20:03, Kevin Wolf wrote: > Am 20.07.2015 um 19:45 hat Max Reitz geschrieben: >> bdrv_is_inserted() should be invoked recursively on the children of >> quorum. >> >> Signed-off-by: Max Reitz >> Reviewed-by: Eric Blake >> Reviewed-by: Albert

Re: [Qemu-block] [Qemu-devel] [PATCH v4 00/38] blockdev: BlockBackend and media

2015-09-07 Thread Max Reitz
On 07.09.2015 07:53, Wen Congyang wrote: > On 09/02/2015 11:02 PM, Eric Blake wrote: >> On 07/20/2015 11:45 AM, Max Reitz wrote: >>> First of all: Thank you, Eric and Berto, for reviewing v3! And thank >>> you, Fam, for at least having a peek at it and being confident

Re: [Qemu-block] [PATCH] qcow2: Rename BDRVQcowState to BDRVQcow2State

2015-09-07 Thread Max Reitz
+--- > 6 files changed, 120 insertions(+), 120 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v3 08/13] qcow2: Leave s unchanged on qcow2_update_options() failure

2015-09-07 Thread Max Reitz
block/qcow2.c | 57 +++-- > 1 file changed, 35 insertions(+), 22 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v3 07/13] qcow2: Move rest of option handling to qcow2_update_options()

2015-09-07 Thread Max Reitz
lock/qcow2.c | 134 > +- > 1 file changed, 68 insertions(+), 66 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v3 10/13] qcow2: Make qcow2_update_options() suitable for transactions

2015-09-07 Thread Max Reitz
lock/qcow2.c | 113 > +- > 1 file changed, 73 insertions(+), 40 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v3 11/13] qcow2: Support updating driver-specific options in reopen

2015-09-07 Thread Max Reitz
file changed, 72 insertions(+), 9 deletions(-) Whether you mention it or not (can be fixed up when applying the patch, too): Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v3 13/13] qemu-iotests: More qcow2 reopen tests

2015-09-07 Thread Max Reitz
sertions(+) > create mode 100755 tests/qemu-iotests/137 > create mode 100644 tests/qemu-iotests/137.out Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

[Qemu-block] [PATCH 2/2] iotests: Add test for checking large image files

2015-09-08 Thread Max Reitz
Add a test for checking a qcow2 file with a multiple of 2^32 clusters. Signed-off-by: Max Reitz --- tests/qemu-iotests/138 | 73 ++ tests/qemu-iotests/138.out | 9 ++ tests/qemu-iotests/group | 1 + 3 files changed, 83 insertions

[Qemu-block] [PATCH 0/2] qcow2: Make size_to_clusters() return int64_t

2015-09-08 Thread Max Reitz
Some callers actually expected that function to return int64_t. As it turns out, it doesn't. Fix that. Max Reitz (2): qcow2: Make size_to_clusters() return int64_t iotests: Add test for checking large image files block/qcow2-cluster.c | 20 +++-- block/qc

[Qemu-block] [PATCH 1/2] qcow2: Make size_to_clusters() return int64_t

2015-09-08 Thread Max Reitz
). Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 20 +++- block/qcow2.h | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 2975b83..a34f0b1 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2

Re: [Qemu-block] [PATCH 1/2] qcow2: Make size_to_clusters() return int64_t

2015-09-08 Thread Max Reitz
On 08.09.2015 22:09, Max Reitz wrote: > Sadly, some images may have more clusters than what can be represented > using a plain int. We should be prepared for that case (in > qcow2_check_refcounts() we actually were trying to catch that case, but > since size_to_clusters() truncated

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] qcow2: Make size_to_clusters() return int64_t

2015-09-08 Thread Max Reitz
On 08.09.2015 22:22, Eric Blake wrote: > On 09/08/2015 02:09 PM, Max Reitz wrote: >> Sadly, some images may have more clusters than what can be represented >> using a plain int. We should be prepared for that case (in >> qcow2_check_refcounts() we actually were trying to

Re: [Qemu-block] [Qemu-devel] [PATCH v4 29/38] blockdev: Add blockdev-insert-medium

2015-09-08 Thread Max Reitz
On 08.09.2015 11:13, Wen Congyang wrote: > On 07/21/2015 01:45 AM, Max Reitz wrote: >> And a helper function for that, which directly takes a pointer to the >> BDS to be inserted instead of its node-name (which will be used for >> implementing 'change' using blockd

Re: [Qemu-block] [PATCH 2/2] iotests: Warn if python subprocess is killed

2015-09-08 Thread Max Reitz
On 08.09.2015 23:25, John Snow wrote: > > > On 08/31/2015 03:05 PM, Max Reitz wrote: >> Currently, if a subprocess of a python test (i.e. qemu-io, qemu-img, or >> qemu) receives a signal and is subsequently aborted, this is not logged. >> >> This patch makes p

Re: [Qemu-block] [PATCH 2/2] iotests: Warn if python subprocess is killed

2015-09-08 Thread Max Reitz
On 08.09.2015 23:37, John Snow wrote: > > > On 09/08/2015 05:29 PM, Max Reitz wrote: >> On 08.09.2015 23:25, John Snow wrote: >>> >>> >>> On 08/31/2015 03:05 PM, Max Reitz wrote: >>>> Currently, if a subprocess of a python test (i.e. qem

Re: [Qemu-block] [Qemu-devel] [PATCH v4 29/38] blockdev: Add blockdev-insert-medium

2015-09-09 Thread Max Reitz
On 09.09.2015 12:01, Wen Congyang wrote: > On 09/09/2015 05:20 AM, Max Reitz wrote: >> On 08.09.2015 11:13, Wen Congyang wrote: >>> On 07/21/2015 01:45 AM, Max Reitz wrote: >>>> And a helper function for that, which directly takes a pointer to the >>>> B

Re: [Qemu-block] [PATCH 1/2] qcow2: Make size_to_clusters() return int64_t

2015-09-09 Thread Max Reitz
On 09.09.2015 10:45, Kevin Wolf wrote: > Am 08.09.2015 um 22:09 hat Max Reitz geschrieben: >> Sadly, some images may have more clusters than what can be represented >> using a plain int. We should be prepared for that case (in >> qcow2_check_refcounts() we actually were tryi

[Qemu-block] [PATCH v2 2/2] iotests: Add test for checking large image files

2015-09-09 Thread Max Reitz
Add a test for checking a qcow2 file with a multiple of 2^32 clusters. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/138 | 73 ++ tests/qemu-iotests/138.out | 9 ++ tests/qemu-iotests/group | 1 + 3 files changed

[Qemu-block] [PATCH v2 0/2] qcow2: Make size_to_clusters() return uint64_t

2015-09-09 Thread Max Reitz
Some callers actually expected that function to return uint64_t. As it turns out, it doesn't. Fix that. v2: - Patch 1: - int64_t -> uint64_t [Eric] - Several fixes in places calling size_to_clusters() (and transitively, too) [Kevin] - Patch 2: - s/occuring/occurring/ [Eric] M

[Qemu-block] [PATCH v2 1/2] qcow2: Make size_to_clusters() return uint64_t

2015-09-09 Thread Max Reitz
). Cc: qemu-stable Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 30 +++--- block/qcow2-refcount.c | 10 +++--- block/qcow2.h | 6 +++--- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index

Re: [Qemu-block] [Qemu-devel] [PATCH v4 29/38] blockdev: Add blockdev-insert-medium

2015-09-10 Thread Max Reitz
On 10.09.2015 03:12, Wen Congyang wrote: > On 09/09/2015 08:59 PM, Max Reitz wrote: >> On 09.09.2015 12:01, Wen Congyang wrote: >>> On 09/09/2015 05:20 AM, Max Reitz wrote: >>>> On 08.09.2015 11:13, Wen Congyang wrote: >>>>> On 07/21/2015 01:45 AM, Max

Re: [Qemu-block] [Qemu-devel] [PATCH v4 29/38] blockdev: Add blockdev-insert-medium

2015-09-10 Thread Max Reitz
On 10.09.2015 05:22, Wen Congyang wrote: > On 09/09/2015 08:59 PM, Max Reitz wrote: >> On 09.09.2015 12:01, Wen Congyang wrote: >>> On 09/09/2015 05:20 AM, Max Reitz wrote: >>>> On 08.09.2015 11:13, Wen Congyang wrote: >>>>> On 07/21/2015 01:45 AM, Max

[Qemu-block] [PATCH] qcow2: Make qcow2_alloc_bytes() more explicit

2015-09-11 Thread Max Reitz
strictly monotonic increasing cluster offsets. However, this behavior is not set in stone, and it is also not obvious when looking at qcow2_alloc_bytes() alone, so we should not rely on it. Reported-by: Kevin Wolf Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 6 ++ 1 file changed, 6

Re: [Qemu-block] [Qemu-devel] [PATCH v4 29/38] blockdev: Add blockdev-insert-medium

2015-09-11 Thread Max Reitz
On 11.09.2015 09:30, Wen Congyang wrote: > On 09/11/2015 03:09 AM, Max Reitz wrote: >> On 10.09.2015 03:12, Wen Congyang wrote: >>> On 09/09/2015 08:59 PM, Max Reitz wrote: >>>> On 09.09.2015 12:01, Wen Congyang wrote: >>>>> On 09/09/2015 05:20 AM, Max

Re: [Qemu-block] [PATCH v3 1/4] block: rename BlockdevSnapshot to BlockdevSnapshotSync

2015-09-11 Thread Max Reitz
c Blake > --- > blockdev.c | 2 +- > qapi-schema.json | 2 +- > qapi/block-core.json | 8 > 3 files changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v3 2/4] block: Add 'ignore-backing' field to BlockdevOptionsGenericCOWFormat

2015-09-11 Thread Max Reitz
On 10.09.2015 15:39, Alberto Garcia wrote: > If set to true, the image will be opened with the BDRV_O_NO_BACKING > flag. This is useful for creating snapshots using images opened with > blockdev-add, since they are not supposed to have a backing image > before the operation. > > Signed-off-by: Alb

Re: [Qemu-block] [PATCH v3 2/4] block: Add 'ignore-backing' field to BlockdevOptionsGenericCOWFormat

2015-09-11 Thread Max Reitz
On 11.09.2015 19:28, Kevin Wolf wrote: > Am 11.09.2015 um 19:21 hat Max Reitz geschrieben: >> On 10.09.2015 15:39, Alberto Garcia wrote: >>> If set to true, the image will be opened with the BDRV_O_NO_BACKING >>> flag. This is useful for creating snapshots using images o

Re: [Qemu-block] [PATCH v3 3/4] block: add a 'blockdev-snapshot' QMP command

2015-09-11 Thread Max Reitz
s shared. > > Signed-off-by: Alberto Garcia > --- > blockdev.c | 163 > --- > qapi-schema.json | 2 + > qapi/block-core.json | 26 > qmp-commands.hx | 29 + > 4 files changed, 160 i

Re: [Qemu-block] [Qemu-devel] [PULL 00/23] Block layer patches

2015-09-14 Thread Max Reitz
On 14.09.2015 11:57, Kevin Wolf wrote: > Am 14.09.2015 um 11:46 hat Peter Maydell geschrieben: >> On 11 September 2015 at 20:40, Kevin Wolf wrote: >>> The following changes since commit 30c38c90bd3f1bb105ebc069ac1821067c980b7c: >>> >>> scripts/qemu-gdb: Add brief comment describing usage (2015-0

[Qemu-block] [PATCH v3 0/2] qcow2: Make size_to_clusters() return uint64_t

2015-09-14 Thread Max Reitz
upstream/downstream patch [down] : patch is downstream-only The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively 001/2:[0002] [FC] 'qcow2: Make size_to_clusters() return uint64_t' 002/2:[] [--] 'iotests: Add test for checking large image files'

<    10   11   12   13   14   15   16   17   18   19   >