[PULL 18/22] block/rbd: remove runtime_opts

2020-09-15 Thread Max Reitz
From: John Snow This saw its last use in 4bfb274165ba. Signed-off-by: John Snow Message-Id: <20200806211345.2925343-2-js...@redhat.com> Signed-off-by: Max Reitz --- block/rbd.c | 42 -- 1 file changed, 42 deletions(-) diff --git a/block/rbd.c b

[PULL 16/22] qcow2: Make qcow2_free_any_clusters() free only one cluster

2020-09-15 Thread Max Reitz
n Wolf Signed-off-by: Max Reitz --- block/qcow2.h | 4 ++-- block/qcow2-cluster.c | 6 +++--- block/qcow2-refcount.c | 8 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/block/qcow2.h b/block/qcow2.h index 83cfa0c391..b73a4cf1f8 100644 --- a/block/qcow2.h +++ b

[PULL 11/22] qcow2: Rewrite the documentation of qcow2_alloc_cluster_offset()

2020-09-15 Thread Max Reitz
From: Alberto Garcia The current text corresponds to an earlier, simpler version of this function and it does not explain how it works now. Signed-off-by: Alberto Garcia Message-Id: Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 24 ++-- 1 file changed, 14

[PULL 05/22] qemu-iotests: Simplify FilePath __init__

2020-09-15 Thread Max Reitz
From: Nir Soffer Use list comprehension instead of append loop. Signed-off-by: Nir Soffer Reviewed-by: Max Reitz Message-Id: <20200828232152.205833-6-nsof...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 del

[PULL 20/22] qcow2: Make preallocate_co() resize the image to the correct size

2020-09-15 Thread Max Reitz
-by: Max Reitz [mreitz: Mark compat=0.10 unsupported for iotest 125] Signed-off-by: Max Reitz --- block/qcow2.c | 1 + tests/qemu-iotests/125 | 44 ++ tests/qemu-iotests/125.out | 28 ++-- 3 files changed, 53 insertions(+), 20

[PULL 21/22] qcow2: Convert qcow2_alloc_cluster_offset() into qcow2_alloc_host_offset()

2020-09-15 Thread Max Reitz
the final host offset directly. The function is also renamed accordingly. See 388e581615 for a similar change to qcow2_get_cluster_offset(). Signed-off-by: Alberto Garcia Message-Id: <9bfef50ec9200d752413be4fc2aeb22a28378817.1599833007.git.be...@igalia.com> Reviewed-by: Max Reitz Signed-off-b

[PULL 06/22] block/quorum.c: stable children names

2020-09-15 Thread Max Reitz
hen Reviewed-by: Alberto Garcia Message-Id: <5d5f930424c1c770754041aa8ad6421dc4e2b58e.1596536719.git.lukasstra...@web.de> Signed-off-by: Max Reitz --- block/quorum.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/block/quorum.c b/block/quoru

[PULL 19/22] block/qcow: remove runtime opts

2020-09-15 Thread Max Reitz
From: John Snow Introduced by d85f4222b468, These were seemingly never used at all. Signed-off-by: John Snow Message-Id: <20200806211345.2925343-3-js...@redhat.com> Signed-off-by: Max Reitz --- block/qcow.c | 9 - 1 file changed, 9 deletions(-) diff --git a/block/qcow.c b

[PULL 03/22] qemu-iotests: Support varargs syntax in FilePaths

2020-09-15 Thread Max Reitz
ck2): But this is more clear and calling optional argument as positional arguments is bad idea anyway. Signed-off-by: Nir Soffer Reviewed-by: Max Reitz Message-Id: <20200828232152.205833-4-nsof...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/194| 4 ++-- tests/qem

[PULL 17/22] qcow2: Return the original error code in qcow2_co_pwrite_zeroes()

2020-09-15 Thread Max Reitz
com> Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- block/qcow2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c index d241fb734c..77c43ce178 100644 --- a/block/qcow2.c +++ b/block

[PULL 07/22] qemu-img: avoid unaligned read requests during convert

2020-09-15 Thread Max Reitz
luster boundaries. Signed-off-by: Peter Lieven Message-Id: <20200901125129.6398-1...@kamp.de> [mreitz: Disable vhdx for 251] Signed-off-by: Max Reitz --- qemu-img.c | 22 ++ tests/qemu-iotests/251 | 7 +-- 2 files changed, 27 insertions(+), 2 deletions(-)

[PULL 08/22] qcow2: Use macros for the L1, refcount and bitmap table entry sizes

2020-09-15 Thread Max Reitz
From: Alberto Garcia This patch replaces instances of sizeof(uint64_t) in the qcow2 driver with macros that indicate what those sizes are actually referring to. Signed-off-by: Alberto Garcia Message-Id: <20200828110828.13833-1-be...@igalia.com> Signed-off-by: Max Reitz --- block/q

[PULL 04/22] qemu-iotests: Merge FilePaths and FilePath

2020-09-15 Thread Max Reitz
or creating temporary files instead of 3. Signed-off-by: Nir Soffer Reviewed-by: Max Reitz Message-Id: <20200828232152.205833-5-nsof...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/194| 2 +- tests/qemu-iotests/208| 2 +- tests/qemu-iotests/222

[PULL 02/22] qemu-iotests: Fix FilePaths docstring

2020-09-15 Thread Max Reitz
base_dir. Fixes: de263986b5dc Signed-off-by: Nir Soffer Message-Id: <20200828232152.205833-3-nsof...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/iotest

[PULL 10/22] qcow2: Don't check nb_clusters when removing l2meta from the list

2020-09-15 Thread Max Reitz
this is no longer the case, l2meta (nowadays a pointer to a list) is only allocated when needed and nb_clusters is guaranteed to be > 0 so this check is unnecessary. Signed-off-by: Alberto Garcia Message-Id: Signed-off-by: Max Reitz --- block/qcow2.c | 4 +--- 1 file changed, 1 insertion(+)

[PULL 01/22] qemu-iotests: Fix FilePaths cleanup

2020-09-15 Thread Max Reitz
From: Nir Soffer If os.remove() fails to remove one of the paths, for example if the file was removed by the test, the cleanup loop would exit silently, without removing the rest of the files. Fixes: de263986b5dc Signed-off-by: Nir Soffer Reviewed-by: Max Reitz Message-Id

[PULL 13/22] iotests: Skip test_stream_parallel in test 030 when doing "make check"

2020-09-15 Thread Max Reitz
Message-Id: <20200907113824.134788-1-th...@redhat.com> Signed-off-by: Max Reitz --- tests/check-block.sh | 3 +++ tests/qemu-iotests/030 | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tests/check-block.sh b/tests/check-block.sh index 8e29c868e5..a5a69060e1 100755 --- a/tests/check-block.sh +

[PULL 14/22] block/vhdx: Support vhdx image only with 512 bytes logical sector size

2020-09-15 Thread Max Reitz
tanix.com> Signed-off-by: Max Reitz --- block/vhdx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 791eb90263..356ec4c455 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -816,9 +816,9 @@ static int vhdx_parse_metadata(BlockDri

[PULL 09/22] qcow2: Fix removal of list members from BDRVQcow2State.cluster_allocs

2020-09-15 Thread Max Reitz
request, but it can be reproduced with the included test case. Signed-off-by: Alberto Garcia Message-Id: <3440a1c4d53c4fe48312b478c96accb338cbef7c.1599150873.git.be...@igalia.com> Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 3 -- tests/qemu-iotests/305

[PULL 00/22] Block patches

2020-09-15 Thread Max Reitz
The following changes since commit 2d2c73d0e3d504a61f868e46e6abd5643f38091b: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200914-1' into staging (2020-09-14 16:03:08 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git

Re: [PATCH 1/2] qcow2: Make preallocate_co() resize the image to the correct size

2020-09-15 Thread Max Reitz
On 11.09.20 16:09, Alberto Garcia wrote: > This function preallocates metadata structures and then extends the > image to its new size, but that new size calculation is wrong because > it doesn't take into account that the host_offset variable is always > cluster-aligned. > > This problem can be

Re: [PATCH] block/rbd: add 'namespace' to qemu_rbd_strong_runtime_opts[]

2020-09-15 Thread Max Reitz
On 14.09.20 21:05, Stefano Garzarella wrote: > Commit 19ae9ae014 ("block/rbd: Add support for ceph namespaces") > introduced namespace support for RBD, but we forgot to add the > new 'namespace' options to qemu_rbd_strong_runtime_opts[]. > > The 'namespace' is used to identify the image, so it is

Re: [PATCH v2] qemu-img: Support bitmap --merge into backing image

2020-09-15 Thread Max Reitz
On 14.09.20 21:10, Eric Blake wrote: > If you have the chain 'base.qcow2 <- top.qcow2' and want to merge a > bitmap from top into base, qemu-img was failing with: > > qemu-img: Could not open 'top.qcow2': Could not open backing file: Failed to > get shared "write" lock > Is another process using

Re: [PATCH 0/2] Make preallocate_co() resize the image to the correct size

2020-09-15 Thread Max Reitz
On 11.09.20 16:09, Alberto Garcia wrote: > preallocate_co() does not resize the image correctly if the original > size was not cluster-aligned. > > This series should be applied on top of Max's block branch (I tested > it with commit 8e66c829eda997dad661d49d73668b1fd3e6043d). > >

Re: [PATCH 2/2] qcow2: Convert qcow2_alloc_cluster_offset() into qcow2_alloc_host_offset()

2020-09-15 Thread Max Reitz
On 14.09.20 18:42, Alberto Garcia wrote: > On Mon 14 Sep 2020 02:14:36 PM CEST, Max Reitz wrote: > >> However, I wonder what you think about “cluster_offset” in >> qcow2_alloc_host_offset. It isn’t a cluster offset anymore. >> Can/should we rename it? > > That var

Re: [PATCH] iotests: Work around failing readlink -f

2020-09-14 Thread Max Reitz
On 14.09.20 14:51, Peter Maydell wrote: > On Mon, 14 Sep 2020 at 13:32, Max Reitz wrote: >> >> On 14.09.20 14:31, Peter Maydell wrote: >>> On Mon, 14 Sep 2020 at 12:39, Max Reitz wrote: >>>> >>>> On macOS, (out of the box) readlink does not

[PATCH v3] iotests: Drop readlink -f

2020-09-14 Thread Max Reitz
; pwd" like is done for $source_iotests. Fixes: b1cbc33a3971b6bb005d5ac3569feae35a71de0f ("iotests: Allow running from different directory") Suggested-by: Peter Maydell Reported-by: Claudio Fontana Reported-by: Thomas Huth Signed-off-by: Max Reitz --- tests/qemu-iotests/

[PATCH v2] iotests: Work around failing readlink -f

2020-09-14 Thread Max Reitz
io Fontana Reported-by: Thomas Huth Signed-off-by: Max Reitz --- v2: Suppress stderr (as requested and suggested by Peter) --- tests/qemu-iotests/check | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index e14a1f354

Re: [PATCH v2] iotests: Work around failing readlink -f

2020-09-14 Thread Max Reitz
On 14.09.20 16:26, Peter Maydell wrote: > On Mon, 14 Sep 2020 at 15:17, Max Reitz wrote: >> >> On macOS, (out of the box) readlink does not have -f. If the recent >> "readlink -f" call introduced by b1cbc33a397 fails, just fall back to >> the old behavior

Re: [PATCH] iotests: Work around failing readlink -f

2020-09-14 Thread Max Reitz
On 14.09.20 14:31, Peter Maydell wrote: > On Mon, 14 Sep 2020 at 12:39, Max Reitz wrote: >> >> On macOS, (out of the box) readlink does not have -f. If the recent >> "readlink -f" call introduced by b1cbc33a397 fails, just fall back to >> the old behavior

Re: [PATCH 1/2] qcow2: Make preallocate_co() resize the image to the correct size

2020-09-14 Thread Max Reitz
ta img.qcow2 128k > > Signed-off-by: Alberto Garcia > --- > block/qcow2.c | 1 + > tests/qemu-iotests/125 | 40 +- > tests/qemu-iotests/125.out | 28 -- > 3 files changed, 49 insertions(+), 20

Re: [PATCH 2/2] qcow2: Convert qcow2_alloc_cluster_offset() into qcow2_alloc_host_offset()

2020-09-14 Thread Max Reitz
6 +++--- > block/qcow2-cluster.c | 14 ++ > block/qcow2.c | 36 +--- > 3 files changed, 26 insertions(+), 30 deletions(-) First of all: Reviewed-by: Max Reitz However, I wonder what you think about “cluster_offset” in qcow2_alloc_host_offset. It isn’t

[PATCH] iotests: Work around failing readlink -f

2020-09-14 Thread Max Reitz
io Fontana Reported-by: Thomas Huth Signed-off-by: Max Reitz --- Hi Thomas, I thought this would be quicker than writing a witty response on whether you or me should write this patch. O:) --- tests/qemu-iotests/check | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/check

Re: [PATCH] tests/check-block: Do not run the iotests with old versions of bash

2020-09-14 Thread Max Reitz
On 14.09.20 12:50, Thomas Huth wrote: > On 14/09/2020 11.19, Max Reitz wrote: >> On 12.09.20 14:14, Thomas Huth wrote: >>> macOS is shipped with a very old version of the bash (3.2), which >>> is currently not suitable for running the iotests anymore. Add >

Re: [PATCH] qemu-img: Support bitmap --merge into backing image

2020-09-14 Thread Max Reitz
On 11.09.20 17:17, Eric Blake wrote: > On 9/11/20 3:31 AM, Max Reitz wrote: >> On 09.09.20 14:33, Eric Blake wrote: >>> If you have the chain 'base.qcow2 <- top.qcow2' and want to merge a >>> bitmap from top into base, qemu-img was failing with: >>> >>

Re: [PATCH] tests/check-block: Do not run the iotests with old versions of bash

2020-09-14 Thread Max Reitz
On 12.09.20 14:14, Thomas Huth wrote: > macOS is shipped with a very old version of the bash (3.2), which > is currently not suitable for running the iotests anymore. Add > a check to skip the iotests in this case - if someone still wants > to run the iotests on macOS, they can install a newer

Re: qemu-img create with preallocation=full and cluster-size=2M produces a bad file

2020-09-14 Thread Max Reitz
On 14.09.20 10:22, Max Reitz wrote: > On 11.09.20 17:39, Alberto Garcia wrote: >> On Fri 11 Sep 2020 04:55:08 PM CEST, Alberto Garcia wrote: >>>> $ qemu-img check prealloc_4G_2M.qcow2 >>>> ERROR: coffset=0x180a0: copied flag must never be set for >

Re: qemu-img create with preallocation=full and cluster-size=2M produces a bad file

2020-09-14 Thread Max Reitz
On 11.09.20 17:39, Alberto Garcia wrote: > On Fri 11 Sep 2020 04:55:08 PM CEST, Alberto Garcia wrote: >>> $ qemu-img check prealloc_4G_2M.qcow2 >>> ERROR: coffset=0x180a0: copied flag must never be set for >>> compressed clusters > > I see, this was fixed recently (QEMU 5.0.0 is still

Re: [PATCH 0/2] block: remove stale runtime_opts

2020-09-11 Thread Max Reitz
On 06.08.20 23:13, John Snow wrote: > > > John Snow (2): > block/rbd: remove runtime_opts > block/qcow: remove runtime opts > > block/qcow.c | 9 - > block/rbd.c | 42 -- > 2 files changed, 51 deletions(-) Thanks, applied to my block

Re: [PATCH] qcow2: Return the original error code in qcow2_co_pwrite_zeroes()

2020-09-11 Thread Max Reitz
On 09.09.20 14:37, Alberto Garcia wrote: > This function checks the current status of a (sub)cluster in order to > see if an unaligned 'write zeroes' request can be done efficiently by > simply updating the L2 metadata and without having to write actual > zeroes to disk. > > If the situation does

Re: [PATCH 0/2] Fix error handling in preallocate_co()

2020-09-11 Thread Max Reitz
On 08.09.20 16:08, Alberto Garcia wrote: > This is a follow-up to "Fix removal of list members from > BDRVQcow2State.cluster_allocs": > >https://lists.gnu.org/archive/html/qemu-block/2020-09/msg00247.html > > However the patches themselves are independent and can be applied > separately. >

Re: [PATCH] qemu-img: Support bitmap --merge into backing image

2020-09-11 Thread Max Reitz
On 09.09.20 14:33, Eric Blake wrote: > If you have the chain 'base.qcow2 <- top.qcow2' and want to merge a > bitmap from top into base, qemu-img was failing with: > > qemu-img: Could not open 'top.qcow2': Could not open backing file: Failed to > get shared "write" lock > Is another process using

Re: [PATCH] qemu-img: avoid unaligned read requests during convert

2020-09-10 Thread Max Reitz
On 01.09.20 14:51, Peter Lieven wrote: > in case of large continous areas that share the same allocation status > it happens that the value of s->sector_next_status is unaligned to the > cluster size or even request alignment of the source. Avoid this by > stripping down the s->sector_next_status

Re: [PATCH v2] block/vhdx: Support vhdx image only with 512 bytes logical sector size

2020-09-10 Thread Max Reitz
On 07.08.20 12:03, Swapnil Ingle wrote: > block/vhdx uses qemu block layer where sector size is always 512 bytes. > This may have issues with 4K logical sector sized vhdx image. > > For e.g qemu-img convert on such images fails with following assert: > > $qemu-img convert -f vhdx -O raw

Re: [PATCH 29/29] iotests: Test block-export-* QMP interface

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/iotests.py | 11 +++- > tests/qemu-iotests/307| 117 ++ > tests/qemu-iotests/307.out| 111 > tests/qemu-iotests/group |

Re: [PATCH 28/29] iotests: Factor out qemu_tool_pipe_and_status()

2020-09-10 Thread Max Reitz
urn both its output and its exit code > """ > -subp = subprocess.Popen(qemu_img_args + list(args), > +stderr = subprocess.STDOUT if connect_stderr else None I really despise this notation. It’s like ternary operators in C weren’t bad enough. (Again with the personal feelings. Sorry.) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 27/29] nbd: Deprecate nbd-server-add/remove

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > These QMP commands are replaced by block-export-add/del. > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 11 +-- > docs/system/deprecated.rst | 8 > 2 files changed, 17 insertions(+), 2 deletions(-) OK, but: > diff

Re: [PATCH 26/29] nbd: Merge nbd_export_new() and nbd_export_create()

2020-09-10 Thread Max Reitz
rs, and another one that actually creates the export. In any case this isn’t the first function in qemu with more than 100 loc and it won’t be the last; and it allows getting rid of two public functions, so: Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 25/29] block/export: Move writable to BlockExportOptions

2020-09-10 Thread Max Reitz
lock-export.json | 15 ++- > block/export/export.c | 16 +++- > blockdev-nbd.c | 18 +- > nbd/server.c | 5 - > qemu-nbd.c | 4 ++-- > 5 files changed, 32 insertions(+), 26 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 21/29] block/export: Add BLOCK_EXPORT_DELETED event

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > Clients may want to know when an export has finally disappeard > (block-export-del returns earlier than that in the general case), so add > a QAPI event for it. > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 12 >

Re: [PATCH 24/29] block/export: Add query-block-exports

2020-09-10 Thread Max Reitz
hanged, 55 insertions(+) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 23/29] block/export: Create BlockBackend in blk_exp_add()

2020-09-10 Thread Max Reitz
/export/export.c | 49 +++ > blockdev-nbd.c| 33 - > nbd/server.c | 38 +++-- > 4 files changed, 63 insertions(+), 61 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 21/29] block/export: Add BLOCK_EXPORT_DELETED event

2020-09-10 Thread Max Reitz
> block/export/export.c | 2 ++ > tests/qemu-iotests/140.out | 1 + > tests/qemu-iotests/223.out | 4 > 4 files changed, 19 insertions(+) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 19/29] block/export: Move strong user reference to block_exports

2020-09-10 Thread Max Reitz
On 10.09.20 15:33, Max Reitz wrote: > On 07.09.20 20:20, Kevin Wolf wrote: >> The reference owned by the user/monitor that is created when adding the >> export and dropped when removing it was tied to the 'exports' list in >> nbd/server.c. Every block export will have a us

Re: [PATCH 19/29] block/export: Move strong user reference to block_exports

2020-09-10 Thread Max Reitz
actually still owns it. > > Signed-off-by: Kevin Wolf > --- > include/block/export.h | 8 > block/export/export.c | 6 ++ > blockdev-nbd.c | 5 - > nbd/server.c | 2 -- > 4 files changed, 14 insertions(+), 7 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 18/29] block/export: Add 'id' option to block-export-add

2020-09-10 Thread Max Reitz
storage-daemon/qemu-storage-daemon.c | 2 +- > tests/qemu-iotests/223.out | 4 ++-- > 7 files changed, 39 insertions(+), 3 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 17/29] block/export: Add blk_exp_close_all(_type)

2020-09-10 Thread Max Reitz
); > -g_free(exp); > +/* Touch the block_exports list only in the main thread */ > +aio_bh_schedule_oneshot(qemu_get_aio_context(), blk_exp_delete_bh, > +exp); Looks safe. Reviewed-by: Max Reitz (The effort of spe

Re: [PATCH 15/29] block/export: Add node-name to BlockExportOptions

2020-09-10 Thread Max Reitz
; > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 27 - > block/monitor/block-hmp-cmds.c | 6 ++--- > blockdev-nbd.c | 44 +- > qemu-nbd.c | 2 +- > 4 files changed,

Re: [PULL v2] Block layer patches

2020-09-10 Thread Max Reitz
On 10.09.20 11:13, Kevin Wolf wrote: > Am 10.09.2020 um 00:09 hat Eric Blake geschrieben: >> On 9/9/20 4:55 PM, Peter Maydell wrote: >> >>> >>> This fails 'make check' on NetBSD and OpenBSD: >>> >>> ./check: line 47: realpath: command not found >>> ./check: line 60: /common.env: No such file or

Re: [PATCH 14/29] block/export: Move AioContext from NBDExport to BlockExport

2020-09-10 Thread Max Reitz
On 07.09.20 20:19, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > include/block/export.h | 3 +++ > block/export/export.c | 2 ++ > nbd/server.c | 26 +- > 3 files changed, 18 insertions(+), 13 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 09/29] nbd: Add writethrough to block-export-add

2020-09-10 Thread Max Reitz
api/block-export.json | 7 ++- > blockdev-nbd.c | 6 +- > 2 files changed, 11 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 07/29] block/export: Remove magic from block-export-add

2020-09-10 Thread Max Reitz
d.c | 3 +-- > 6 files changed, 67 insertions(+), 21 deletions(-) [...] > +if (bdrv_is_read_only(bs)) { > +export_opts.u.nbd.has_writable = true; Ah, yes, setting that might be nice. :) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 04/29] block/export: Add BlockExport infrastructure and block-export-add

2020-09-10 Thread Max Reitz
son.build| 2 ++ > meson.build | 2 +- > 9 files changed, 133 insertions(+), 10 deletions(-) > create mode 100644 include/block/export.h > create mode 100644 block/export/export.c > create mode 100644 block/export/meson.build Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PULL 00/64] Block layer patches

2020-09-08 Thread Max Reitz
On 08.09.20 09:01, Kevin Wolf wrote: > Am 07.09.2020 um 22:22 hat Peter Maydell geschrieben: >> On Mon, 7 Sep 2020 at 12:09, Kevin Wolf wrote: >>> >>> The following changes since commit 7c37270b3fbe3d034ba80e488761461676e21eb4: >>> >>> Merge remote-tracking branch >>>

Re: [PATCH v2] iotests: Skip test_stream_parallel in test 030 when doing "make check"

2020-09-07 Thread Max Reitz
On 07.09.20 13:38, Thomas Huth wrote: > The test_stream_parallel test still occasionally fails in the CI. > Thus let's disable it during "make check" for now so that it does > not cause trouble during merge tests. We can enable it again once > the problem has been resolved. > > Signed-off-by:

Re: [PATCH v8 6/7] block-stream: freeze link to base node during stream job

2020-09-07 Thread Max Reitz
On 04.09.20 15:48, Vladimir Sementsov-Ogievskiy wrote: > 04.09.2020 16:21, Max Reitz wrote: >> On 28.08.20 18:52, Andrey Shinkevich wrote: >>> To keep the base node unchanged during the block-stream operation, >>> freeze it as the other part of the backing chain with

Re: [PATCH] file-win32: Fix "locking" option

2020-09-07 Thread Max Reitz
f-by: Kevin Wolf > --- > block/file-win32.c | 22 +- > 1 file changed, 21 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH v2] qemu-img: Explicit number replaced by a constant

2020-09-07 Thread Max Reitz
On 19.08.20 03:36, Yi Li wrote: > Signed-off-by: Yi Li > --- > qemu-img.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) Thanks, applied to my block branch: https://git.xanclic.moe/XanClic/qemu/commits/branch/block signature.asc Description: OpenPGP digital signature

Re: [PATCH] iotests: Skip test_stream_parallel in test 030 when doing "make check"

2020-09-07 Thread Max Reitz
On 05.09.20 13:24, Thomas Huth wrote: > The test_stream_parallel test still occasionally fails in the CI. > Thus let's disable it during "make check" for now so that it does > not cause trouble during merge tests. We can enable it again once > the problem has been resolved. > > Signed-off-by:

Re: [PATCH v8 7/7] block: apply COR-filter to block-stream jobs

2020-09-04 Thread Max Reitz
On 28.08.20 18:52, Andrey Shinkevich wrote: > This patch completes the series with the COR-filter insertion for > block-stream operations. Adding the filter makes it possible for copied > regions to be discarded in backing files during the block-stream job, > what will reduce the disk overuse. >

Re: [PATCH v8 5/7] copy-on-read: limit guest writes to base in COR driver

2020-09-04 Thread Max Reitz
On 28.08.20 18:52, Andrey Shinkevich wrote: > Limit the guest's COR operations by the base node in the backing chain > during a stream job. I don’t understand. Shouldn’t we limit the areas where we set the COR flag? > Signed-off-by: Andrey Shinkevich > --- > block/copy-on-read.c | 49

Re: [PATCH v8 4/7] copy-on-read: pass base file name to COR driver

2020-09-04 Thread Max Reitz
On 28.08.20 18:52, Andrey Shinkevich wrote: > To limit the guest's COR operations by the base node in the backing > chain during stream job, pass the base file name to the copy-on-read Does it have to be a filename? That sounds really bad to me. > driver. The rest of the functionality will be

Re: [PATCH v8 2/7] copy-on-read: add filter append/drop functions

2020-09-04 Thread Max Reitz
On 28.08.20 18:52, Andrey Shinkevich wrote: > Provide API for the COR-filter insertion/removal. Hm. Why? I see the implementation is just bdrv_open() + bdrv_replace_node(), which is what I would have expected. Why can’t the caller just do that? Or maybe it would even make sense to just make

Re: [PATCH] iotests: Remove 030 from the auto group

2020-09-04 Thread Max Reitz
On 04.09.20 12:14, Thomas Huth wrote: > On 04/09/2020 10.25, Kevin Wolf wrote: >> Am 04.09.2020 um 07:57 hat Thomas Huth geschrieben: >>> Test 030 is still occasionally failing in the CI ... so for the >>> time being, let's disable it in the "auto" group. We can add it >>> back once it got more

Re: [PATCH v2 3/3] qcow2: Rewrite the documentation of qcow2_alloc_cluster_offset()

2020-09-04 Thread Max Reitz
On 04.09.20 11:36, Alberto Garcia wrote: > On Fri 04 Sep 2020 11:28:18 AM CEST, Max Reitz wrote: >>> + * If any clusters or subclusters were allocated then @m contains a >>> + * list with the information of all the affected regions. Note that >>> + * this ca

Re: [PATCH v2 0/3] qcow2: Fix removal of list members from BDRVQcow2State.cluster_allocs

2020-09-04 Thread Max Reitz
On 03.09.20 18:37, Alberto Garcia wrote: > Hi, > > here are the changes from v1: > > - Split changes into three different patches. > - Rewrite the documentation of qcow2_alloc_cluster_offset() [Max] > - Use peek_file_be in the test case to read the offset of the refcount > table [Max]. > -

Re: [PATCH v2 3/3] qcow2: Rewrite the documentation of qcow2_alloc_cluster_offset()

2020-09-04 Thread Max Reitz
On 03.09.20 18:37, Alberto Garcia wrote: > The current text corresponds to an earlier, simpler version of this > function and it does not explain how it works now. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cluster.c | 24 ++-- > 1 file changed, 14 insertions(+),

Re: [PATCH] iotests: Remove 030 from the auto group

2020-09-04 Thread Max Reitz
On 04.09.20 07:57, Thomas Huth wrote: > Test 030 is still occasionally failing in the CI ... so for the > time being, let's disable it in the "auto" group. We can add it > back once it got more stable. > > Signed-off-by: Thomas Huth > --- > I just saw the problem here: >

Re: [PATCH] iotests: Remove 030 from the auto group

2020-09-04 Thread Max Reitz
On 04.09.20 10:31, Max Reitz wrote: > On 04.09.20 07:57, Thomas Huth wrote: >> Test 030 is still occasionally failing in the CI ... so for the >> time being, let's disable it in the "auto" group. We can add it >> back once it got more stable. >> >> Signed

Re: [PATCH] qcow2: Use macros for the L1, refcount and bitmap table entry sizes

2020-09-03 Thread Max Reitz
On 28.08.20 13:08, Alberto Garcia wrote: > This patch replaces instances of sizeof(uint64_t) in the qcow2 driver > with macros that indicate what those sizes are actually referring to. > > Signed-off-by: Alberto Garcia > --- > block/qcow2.h | 6 +++ > block/qcow2-bitmap.c | 11

Re: [PATCH] qemu-img: avoid unaligned read requests during convert

2020-09-03 Thread Max Reitz
On 01.09.20 14:51, Peter Lieven wrote: > in case of large continous areas that share the same allocation status > it happens that the value of s->sector_next_status is unaligned to the > cluster size or even request alignment of the source. Avoid this by > stripping down the s->sector_next_status

Re: [RFC qemu 0/6] mirror: implement incremental and bitmap modes

2020-09-03 Thread Max Reitz
On 03.09.20 15:36, Fabian Grünbichler wrote: > On September 3, 2020 3:23 pm, Kevin Wolf wrote: >> Am 03.09.2020 um 14:57 hat Max Reitz geschrieben: >>> On 03.09.20 14:38, Kevin Wolf wrote: >>>> Am 03.09.2020 um 13:04 hat Max Reitz geschrieben: >>>>>

Re: [PATCH] qcow2: Fix removal of list members from BDRVQcow2State.cluster_allocs

2020-09-03 Thread Max Reitz
wouldn’t allow -o refcount_bits=64. > + > +refcount_table_offset=$((0x400)) I would like to suggest $(peek_file_be "$TEST_IMG" 48 8), to set an example for future generations; but not strictly necessary, of course. O:) Anyway, at least with the _unsupported_imgopts line completed: Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [RFC qemu 0/6] mirror: implement incremental and bitmap modes

2020-09-03 Thread Max Reitz
On 03.09.20 14:38, Kevin Wolf wrote: > Am 03.09.2020 um 13:04 hat Max Reitz geschrieben: >> On 03.09.20 12:13, Fabian Grünbichler wrote: >>> On August 21, 2020 3:03 pm, Max Reitz wrote: >>>> On 18.02.20 11:07, Fabian Grünbichler wrote: >>> I am not sure

Re: [PATCH] iotests: Allow running from different directory

2020-09-03 Thread Max Reitz
On 02.09.20 13:03, Kevin Wolf wrote: > It is convenient to be able to edit the tests and run them without > changing the current working directory back and forth. Instead of > assuming that $PWD is the qemu-iotests build directory, derive the build > directory from the executed script. > > This

Re: [RFC qemu 0/6] mirror: implement incremental and bitmap modes

2020-09-03 Thread Max Reitz
On 03.09.20 12:13, Fabian Grünbichler wrote: > On August 21, 2020 3:03 pm, Max Reitz wrote: >> On 18.02.20 11:07, Fabian Grünbichler wrote: >> >> [Sorry :/] > > same, I've been meaning to ping/pick this back up but other stuff got in > the way. so thanks for the

Re: [PATCH 2/3] mirror: Freeze backing chain for sync=top

2020-09-02 Thread Max Reitz
On 02.09.20 18:48, Max Reitz wrote: > Reported-by: Kevin Wolf > Signed-off-by: Max Reitz > --- > block/mirror.c | 20 +--- > 1 file changed, 17 insertions(+), 3 deletions(-) > > diff --git a/block/mirror.c b/block/mirror.c > index 11ebffdf99..27422ab

[PATCH 2/3] mirror: Freeze backing chain for sync=top

2020-09-02 Thread Max Reitz
Reported-by: Kevin Wolf Signed-off-by: Max Reitz --- block/mirror.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 11ebffdf99..27422ab7a5 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -649,8 +649,8 @@ static

[PATCH 0/3] mirror: Freeze backing chain for sync=top

2020-09-02 Thread Max Reitz
h I implemented here is fine until someone complains. Max Reitz (3): mirror: Set s->base_overlay only if s->base is set mirror: Freeze backing chain for sync=top iotests/041: x-blockdev-reopen during mirror block/mirror.c | 28 +--- tests/qemu-iotests/041

[PATCH 1/3] mirror: Set s->base_overlay only if s->base is set

2020-09-02 Thread Max Reitz
This way, sync=full will not need a reference to any node other than the source and the target. Signed-off-by: Max Reitz --- block/mirror.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 26acf4af6f..11ebffdf99 100644 --- a/block

[PATCH 3/3] iotests/041: x-blockdev-reopen during mirror

2020-09-02 Thread Max Reitz
Test what happens when you remove the backing file during a mirror with sync=top. Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 92 ++ tests/qemu-iotests/041.out | 4 +- 2 files changed, 94 insertions(+), 2 deletions(-) diff --git a/tests/qemu

Re: [PATCH v8 00/43] block: Deal with filters

2020-09-02 Thread Max Reitz
On 02.09.20 12:23, Kevin Wolf wrote: > Am 01.09.2020 um 16:33 hat Max Reitz geschrieben: >> v6: https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg01715.html >> v7: https://lists.nongnu.org/archive/html/qemu-block/2020-06/msg01357.html >> >> Branch: https://

Re: [PATCH v8 29/43] mirror: Deal with filters

2020-09-02 Thread Max Reitz
On 02.09.20 10:53, Kevin Wolf wrote: > Am 01.09.2020 um 16:34 hat Max Reitz geschrieben: >> This includes some permission limiting (for example, we only need to >> take the RESIZE permission for active commits where the base is smaller >> than the top). >> >> bas

Re: [PATCH v3 0/5] iotest.FilePath fixes and cleanups

2020-09-02 Thread Max Reitz
On 29.08.20 01:21, Nir Soffer wrote: > Fix some issues introduced when iotests.FilePaths was added and merge it back > into FilePath keeping the option to create multiple file names. Thanks, applied to my block branch: https://git.xanclic.moe/XanClic/qemu/commits/branch/block signature.asc

Re: [PATCH v5 00/10] preallocate filter

2020-09-01 Thread Max Reitz
On 27.08.20 23:08, Vladimir Sementsov-Ogievskiy wrote: > 21.08.2020 17:11, Vladimir Sementsov-Ogievskiy wrote: >> Hi all! >> >> Here is a filter, which does preallocation on write. >> >> In Virtuozzo we have to deal with some custom distributed storage >> solution, where allocation is relatively

[PATCH v8 43/43] iotests: Test committing to overridden backing

2020-09-01 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Andrey Shinkevich Reviewed-by: Kevin Wolf --- tests/qemu-iotests/040 | 61 ++ tests/qemu-iotests/040.out | 4 +-- 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/040 b/tests/qemu

[PATCH v8 42/43] iotests: Add test for commit in sub directory

2020-09-01 Thread Max Reitz
Add a test for committing an overlay in a sub directory to one of the images in its backing chain, using both relative and absolute filenames. Signed-off-by: Max Reitz --- tests/qemu-iotests/020 | 44 ++ tests/qemu-iotests/020.out | 10 + 2 files

[PATCH v8 38/43] iotests: Test that qcow2's data-file is flushed

2020-09-01 Thread Max Reitz
Flushing a qcow2 node must lead to the data-file node being flushed as well. Signed-off-by: Max Reitz Reviewed-by: Andrey Shinkevich Reviewed-by: Kevin Wolf --- tests/qemu-iotests/244 | 49 ++ tests/qemu-iotests/244.out | 7 ++ 2 files changed, 56

[PATCH v8 40/43] iotests: Add filter commit test cases

2020-09-01 Thread Max Reitz
This patch adds some tests on how commit copes with filter nodes. Signed-off-by: Max Reitz --- tests/qemu-iotests/040 | 177 + tests/qemu-iotests/040.out | 4 +- 2 files changed, 179 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/040 b

[PATCH v8 33/43] qemu-img: Use child access functions

2020-09-01 Thread Max Reitz
This changes iotest 204's output, because blkdebug on top of a COW node used to make qemu-img map disregard the rest of the backing chain (the backing chain was broken by the filter). With this patch, the allocation in the base image is reported correctly. Signed-off-by: Max Reitz --- qemu

<    5   6   7   8   9   10   11   12   13   14   >