[PATCH v7 06/47] block: Drop bdrv_is_encrypted()

2020-06-25 Thread Max Reitz
ted-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Max Reitz --- include/block/block.h | 1 - block.c | 8 block/qapi.c | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/include/block/block.h b/include/block/block.h index 86f9728f00..0080fe1

[PATCH v7 04/47] block: bdrv_set_backing_hd() is about bs->backing

2020-06-25 Thread Max Reitz
bdrv_set_backing_hd() is a function that explicitly cares about the bs->backing child. Highlight that in its description and use child_bs(bs->backing) instead of backing_bs(bs) to make it more obvious. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block.c | 4 +

[PATCH v7 08/47] throttle: Support compressed writes

2020-06-25 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/throttle.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block/throttle.c b/block/throttle.c index 0ebbad0743..f6e619aca2 100644 --- a/block/throttle.c +++ b/block/throttle.c @@ -154,6 +154,15

[PATCH v7 01/47] block: Add child access functions

2020-06-25 Thread Max Reitz
filter nodes in a meaningful way. Signed-off-by: Max Reitz --- include/block/block_int.h | 44 +-- block.c | 90 +++ 2 files changed, 131 insertions(+), 3 deletions(-) diff --git a/include/block/block_int.h b/include/block/block

[PATCH v7 02/47] block: Add chain helper functions

2020-06-25 Thread Max Reitz
Add some helper functions for skipping filters in a chain of block nodes. Signed-off-by: Max Reitz --- include/block/block_int.h | 3 +++ block.c | 55 +++ 2 files changed, 58 insertions(+) diff --git a/include/block/block_int.h b/include

[PATCH 19/19] iotests: add tests for blockdev-amend

2020-06-25 Thread Max Reitz
From: Maxim Levitsky This commit adds two tests that cover the new blockdev-amend functionality of luks and qcow2 driver Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé [mreitz: Let 295 verify that LUKS works; drop 295 and 296 from the auto group] Signed-off-by: Max

[PATCH 09/19] block/amend: add 'force' option

2020-06-25 Thread Max Reitz
Levitsky Reviewed-by: Daniel P. Berrangé Reviewed-by: Max Reitz Message-Id: <20200608094030.670121-4-mlevi...@redhat.com> Signed-off-by: Max Reitz --- docs/tools/qemu-img.rst | 5 - include/block/block.h | 1 + include/block/block_int.h | 1 + block.c | 4 +++-

[PATCH 14/19] block/qcow2: extend qemu-img amend interface with crypto options

2020-06-25 Thread Max Reitz
From: Maxim Levitsky Now that we have all the infrastructure in place, wire it in the qcow2 driver and expose this to the user. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Reviewed-by: Max Reitz Message-Id: <20200608094030.670121-9-mlevi...@redhat.com> Signed-off-b

[PATCH 10/19] block/amend: separate amend and create options for qemu-img

2020-06-25 Thread Max Reitz
macro and then include it in each action option list. In future it might be useful to remove some options which are not supported anyway from amend list, which currently cause an error message if amended. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Reviewed-by: Max Reitz

[PATCH 16/19] block/core: add generic infrastructure for x-blockdev-amend qmp command

2020-06-25 Thread Max Reitz
Levitsky Reviewed-by: Daniel P. Berrangé Message-Id: <20200608094030.670121-12-mlevi...@redhat.com> Signed-off-by: Max Reitz --- qapi/block-core.json | 42 ++ qapi/job.json | 4 +- include/block/block_int.h | 21 +-- block/amend.c

[PATCH 11/19] block/amend: refactor qcow2 amend options

2020-06-25 Thread Max Reitz
that became unnecessary thanks to "iotests: Make _filter_img_create more active"] Signed-off-by: Max Reitz --- block/qcow2.c | 138 +--- qemu-img.c | 18 - tests/qemu-iotests/049.out | 102

[PATCH 13/19] block/crypto: implement the encryption key management

2020-06-25 Thread Max Reitz
for the idea of unsharing read, rather that write permission which allows to avoid cases when the other user had opened the image read-only. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Reviewed-by: Max Reitz Message-Id: <20200608094030.670121-8-mlevi...@redhat.com> Sign

[PATCH 12/19] block/crypto: rename two functions

2020-06-25 Thread Max Reitz
: <20200608094030.670121-7-mlevi...@redhat.com> Signed-off-by: Max Reitz --- block/crypto.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index dcf8b42bb2..1960b47ceb 100644 --- a/block/crypto.c +++ b/block/cr

[PATCH 05/19] iotests.py: Add (verify|has)_working_luks()

2020-06-25 Thread Max Reitz
Similar to _require_working_luks for bash tests, these functions can be used to check whether our luks driver can actually create images. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 39 +++ 1 file changed, 39 insertions(+) diff --git a/tests

[PATCH 17/19] block/crypto: implement blockdev-amend

2020-06-25 Thread Max Reitz
From: Maxim Levitsky Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Reviewed-by: Max Reitz Message-Id: <20200608094030.670121-13-mlevi...@redhat.com> Signed-off-by: Max Reitz --- qapi/block-core.json | 14 - block/crypto.c

[PATCH 18/19] block/qcow2: implement blockdev-amend

2020-06-25 Thread Max Reitz
From: Maxim Levitsky Currently the implementation only supports amending the encryption options, unlike the qemu-img version Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Reviewed-by: Max Reitz Message-Id: <20200608094030.670121-14-mlevi...@redhat.com> Signed-off-b

[PATCH 15/19] iotests: qemu-img tests for luks key management

2020-06-25 Thread Max Reitz
and 294 from the auto group] Signed-off-by: Max Reitz --- tests/qemu-iotests/293 | 208 + tests/qemu-iotests/293.out | 99 ++ tests/qemu-iotests/294 | 90 tests/qemu-iotests/294.out | 30 ++ tests/qemu-iotests/group

[PATCH 01/19] iotests: Make _filter_img_create more active

2020-06-25 Thread Max Reitz
tps://lists.nongnu.org/archive/html/qemu-block/2020-06/msg00339.html But that patch needs to come later so we can get away with changing as few reference outputs in this patch here as possible. Signed-off-by: Max Reitz --- tests/qemu-iotests/112.out | 2 +- tests/qemu-iotests/141

[PATCH 08/19] qcrypto/luks: implement encryption key management

2020-06-25 Thread Max Reitz
From: Maxim Levitsky Next few patches will expose that functionality to the user. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Message-Id: <20200608094030.670121-3-mlevi...@redhat.com> Signed-off-by: Max Reitz --- qapi/crypto.json| 59 ++- crypto/block-luks.c

[PATCH 07/19] qcrypto/core: add generic infrastructure for crypto options amendment

2020-06-25 Thread Max Reitz
evi...@redhat.com> Signed-off-by: Max Reitz --- qapi/crypto.json | 16 block/crypto.h | 3 +++ crypto/blockpriv.h | 8 include/crypto/block.h | 22 ++ block/crypto.c | 17 + crypto/block.c

[PATCH 06/19] iotests: Check whether luks works

2020-06-25 Thread Max Reitz
Whenever running an iotest for the luks format, we should check whether luks actually really works. Tests that try to create luks-encrypted qcow2 images should do the same. Signed-off-by: Max Reitz --- tests/qemu-iotests/087| 1 + tests/qemu-iotests/178| 1 + tests/qemu-iotests

[PATCH 00/19] block: LUKS encryption slot management + iotest tweaks

2020-06-25 Thread Max Reitz
: implement blockdev-amend' 019/19:[down] 'iotests: add tests for blockdev-amend' Max Reitz (5): iotests: Make _filter_img_create more active iotests/common.rc: Add _require_working_luks iotests.py: Add qemu_img_pipe_and_status() iotests.py: Add (verify|has)_working_luks() iotests: Check

[PATCH 03/19] iotests/common.rc: Add _require_working_luks

2020-06-25 Thread Max Reitz
That the luks driver is present is little indication on whether it is actually working. Without the crypto libraries linked in, it does not work. So add this function, which tries to create a luks image to see whether that actually works. Signed-off-by: Max Reitz --- tests/qemu-iotests

[PATCH 02/19] iotests: filter few more luks specific create options

2020-06-25 Thread Max Reitz
From: Maxim Levitsky This allows more tests to be able to have same output on both qcow2 luks encrypted images and raw luks images Signed-off-by: Maxim Levitsky Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky --- tests/qemu-iotests/087.out | 6 +++--- tests/qemu-iotests/134.out

[PATCH 04/19] iotests.py: Add qemu_img_pipe_and_status()

2020-06-25 Thread Max Reitz
This function will be used by the next patch, which intends to check both the exit code and qemu-img's output. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/qemu-iotests

[PULL v2 2/2] iotests: don't test qcow2.py inside 291

2020-06-24 Thread Max Reitz
Reported-by: Max Reitz Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200618154052.8629-1-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- tests/qemu-iotests/291 | 4 tests/qemu-iotests/291.out | 33 - 2

[PULL v2 1/2] iotests: Fix 051 output after qdev_init_nofail() removal

2020-06-24 Thread Max Reitz
-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200616154949.6586-1-phi...@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Max Reitz --- tests/qemu-iotests/051.pc.out | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/051.pc

[PULL v2 0/2] Block patches

2020-06-24 Thread Max Reitz
The following changes since commit d88d5a3806d78dcfca648c62dae9d88d3e803bd2: Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-hw-20200622' into staging (2020-06-23 13:55:52 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git

Re: [PULL 00/18] Block patches

2020-06-24 Thread Max Reitz
On 23.06.20 14:55, Peter Maydell wrote: > On Mon, 22 Jun 2020 at 16:11, Max Reitz wrote: >> >> The following changes since commit bae31bfa48b9caecee25da3d5333901a126a06b4: >> >> Merge remote-tracking branch >> 'remotes/kraxel/tags/audio-20200619-pull-request' i

Re: [PATCH 1/2] qcow2: Force preallocation with data-file-raw

2020-06-23 Thread Max Reitz
On 22.06.20 19:36, Alberto Garcia wrote: [...] > You would still have problems with images created with raw data files > but without preallocation. Yeah, sure, but, well. Bug in qemu. :/ Max signature.asc Description: OpenPGP digital signature

Re: [PATCH 0/2] qcow2: Force preallocation with data-file-raw

2020-06-23 Thread Max Reitz
On 22.06.20 19:44, Alberto Garcia wrote: > On Mon 22 Jun 2020 11:47:32 AM CEST, Max Reitz wrote: >>> I don't know the internals of qcow2 data_file, but are we really using >>> qcow2 metadata when accessing the data file? >> >> Yes. >> >>> This may

Re: [PATCH 1/2] qcow2: Force preallocation with data-file-raw

2020-06-22 Thread Max Reitz
On 22.06.20 17:15, Nir Soffer wrote: > On Mon, Jun 22, 2020 at 6:07 PM Max Reitz wrote: >> >> On 22.06.20 16:46, Alberto Garcia wrote: >>> On Mon 22 Jun 2020 11:35:59 AM CEST, Max Reitz wrote: >>>>>> +if (qcow2_opts->data_file_raw

[PULL 16/18] iotests: add tests for blockdev-amend

2020-06-22 Thread Max Reitz
From: Maxim Levitsky This commit adds two tests that cover the new blockdev-amend functionality of luks and qcow2 driver Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Message-Id: <20200608094030.670121-15-mlevi...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-i

[PULL 17/18] iotests: Fix 051 output after qdev_init_nofail() removal

2020-06-22 Thread Max Reitz
-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200616154949.6586-1-phi...@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Max Reitz --- tests/qemu-iotests/051.pc.out | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/051.pc

[PULL 04/18] qcrypto/core: add generic infrastructure for crypto options amendment

2020-06-22 Thread Max Reitz
evi...@redhat.com> Signed-off-by: Max Reitz --- qapi/crypto.json | 16 block/crypto.h | 3 +++ crypto/blockpriv.h | 8 include/crypto/block.h | 22 ++ block/crypto.c | 17 + crypto/block.c

[PULL 18/18] iotests: don't test qcow2.py inside 291

2020-06-22 Thread Max Reitz
Reported-by: Max Reitz Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200618154052.8629-1-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- tests/qemu-iotests/291 | 4 tests/qemu-iotests/291.out | 33 - 2

[PULL 13/18] block/core: add generic infrastructure for x-blockdev-amend qmp command

2020-06-22 Thread Max Reitz
Levitsky Reviewed-by: Daniel P. Berrangé Message-Id: <20200608094030.670121-12-mlevi...@redhat.com> Signed-off-by: Max Reitz --- qapi/block-core.json | 42 ++ qapi/job.json | 4 +- include/block/block_int.h | 21 +-- block/amend.c

[PULL 12/18] iotests: qemu-img tests for luks key management

2020-06-22 Thread Max Reitz
From: Maxim Levitsky This commit adds two tests, which test the new amend interface of both luks raw images and qcow2 luks encrypted images. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Message-Id: <20200608094030.670121-11-mlevi...@redhat.com> Signed-off-by: Max

[PULL 15/18] block/qcow2: implement blockdev-amend

2020-06-22 Thread Max Reitz
From: Maxim Levitsky Currently the implementation only supports amending the encryption options, unlike the qemu-img version Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Reviewed-by: Max Reitz Message-Id: <20200608094030.670121-14-mlevi...@redhat.com> Signed-off-b

[PULL 11/18] block/qcow2: extend qemu-img amend interface with crypto options

2020-06-22 Thread Max Reitz
From: Maxim Levitsky Now that we have all the infrastructure in place, wire it in the qcow2 driver and expose this to the user. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Reviewed-by: Max Reitz Message-Id: <20200608094030.670121-9-mlevi...@redhat.com> Signed-off-b

[PULL 14/18] block/crypto: implement blockdev-amend

2020-06-22 Thread Max Reitz
From: Maxim Levitsky Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Reviewed-by: Max Reitz Message-Id: <20200608094030.670121-13-mlevi...@redhat.com> Signed-off-by: Max Reitz --- qapi/block-core.json | 14 - block/crypto.c

[PULL 10/18] block/crypto: implement the encryption key management

2020-06-22 Thread Max Reitz
for the idea of unsharing read, rather that write permission which allows to avoid cases when the other user had opened the image read-only. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Reviewed-by: Max Reitz Message-Id: <20200608094030.670121-8-mlevi...@redhat.com> Sign

[PULL 02/18] iotests: filter few more luks specific create options

2020-06-22 Thread Max Reitz
From: Maxim Levitsky This allows more tests to be able to have same output on both qcow2 luks encrypted images and raw luks images Signed-off-by: Maxim Levitsky Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-Id: <20200618150628.2169239-3-mre...@redhat.com> --- test

[PULL 06/18] block/amend: add 'force' option

2020-06-22 Thread Max Reitz
Levitsky Reviewed-by: Daniel P. Berrangé Reviewed-by: Max Reitz Message-Id: <20200608094030.670121-4-mlevi...@redhat.com> Signed-off-by: Max Reitz --- docs/tools/qemu-img.rst | 5 - include/block/block.h | 1 + include/block/block_int.h | 1 + block.c | 4 +++-

[PULL 08/18] block/amend: refactor qcow2 amend options

2020-06-22 Thread Max Reitz
com> [mreitz: Dropped some iotests reference output hunks that became unnecessary thanks to "iotests: Make _filter_img_create more active"] Signed-off-by: Max Reitz --- block/qcow2.c | 138 +--- qemu-img.c | 18 +

[PULL 07/18] block/amend: separate amend and create options for qemu-img

2020-06-22 Thread Max Reitz
macro and then include it in each action option list. In future it might be useful to remove some options which are not supported anyway from amend list, which currently cause an error message if amended. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Reviewed-by: Max Reitz

[PULL 03/18] block/block-copy: block_copy_dirty_clusters: fix failure check

2020-06-22 Thread Max Reitz
igned-off-by: Max Reitz --- block/block-copy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/block-copy.c b/block/block-copy.c index bb8d0569f2..f7428a7c08 100644 --- a/block/block-copy.c +++ b/block/block-copy.c @@ -622,8 +622,10 @@ out: * block_copy

[PULL 09/18] block/crypto: rename two functions

2020-06-22 Thread Max Reitz
: <20200608094030.670121-7-mlevi...@redhat.com> Signed-off-by: Max Reitz --- block/crypto.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index dcf8b42bb2..1960b47ceb 100644 --- a/block/crypto.c +++ b/block/cr

[PULL 05/18] qcrypto/luks: implement encryption key management

2020-06-22 Thread Max Reitz
From: Maxim Levitsky Next few patches will expose that functionality to the user. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé Message-Id: <20200608094030.670121-3-mlevi...@redhat.com> Signed-off-by: Max Reitz --- qapi/crypto.json| 59 ++- crypto/block-luks.c

[PULL 01/18] iotests: Make _filter_img_create more active

2020-06-22 Thread Max Reitz
tps://lists.nongnu.org/archive/html/qemu-block/2020-06/msg00339.html But that patch needs to come later so we can get away with changing as few reference outputs in this patch here as possible. Signed-off-by: Max Reitz Message-Id: <20200618150628.2169239-2-mre...@redhat.com> --- tests/

[PULL 00/18] Block patches

2020-06-22 Thread Max Reitz
fixes Max Reitz (1): iotests: Make _filter_img_create more active Maxim Levitsky (14): iotests: filter few more luks specific create options qcrypto/core: add generic infrastructure for crypto options amendment qcrypto/luks

Re: [PATCH 1/2] qcow2: Force preallocation with data-file-raw

2020-06-22 Thread Max Reitz
On 22.06.20 16:46, Alberto Garcia wrote: > On Mon 22 Jun 2020 11:35:59 AM CEST, Max Reitz wrote: >>>> +if (qcow2_opts->data_file_raw && >>>> +qcow2_opts->preallocation == PREALLOC_MODE_OFF) >>>> +{ >>>> +/*

Re: [PATCH 0/2] qcow2: Force preallocation with data-file-raw

2020-06-22 Thread Max Reitz
On 22.06.20 00:25, Nir Soffer wrote: > On Fri, Jun 19, 2020 at 1:40 PM Max Reitz wrote: >> >> Hi, >> >> As discussed here: >> >> https://lists.nongnu.org/archive/html/qemu-block/2020-02/msg00644.html >> https://lists.nongnu.org/archive/h

Re: [PATCH 1/2] qcow2: Force preallocation with data-file-raw

2020-06-22 Thread Max Reitz
On 22.06.20 11:35, Max Reitz wrote: > On 19.06.20 18:47, Alberto Garcia wrote: >> On Fri 19 Jun 2020 12:40:11 PM CEST, Max Reitz wrote: >>> +if (qcow2_opts->data_file_raw && >>> +qcow2_opts->preallocation == PREALLOC_MODE_OFF) >>> +

Re: [PATCH 1/2] qcow2: Force preallocation with data-file-raw

2020-06-22 Thread Max Reitz
On 19.06.20 18:47, Alberto Garcia wrote: > On Fri 19 Jun 2020 12:40:11 PM CEST, Max Reitz wrote: >> +if (qcow2_opts->data_file_raw && >> +qcow2_opts->preallocation == PREALLOC_MODE_OFF) >> +{ >> +/* >> + * data-

[PATCH 1/2] qcow2: Force preallocation with data-file-raw

2020-06-19 Thread Max Reitz
area. Signed-off-by: Max Reitz --- block/qcow2.c | 22 ++ tests/qemu-iotests/244.out | 9 - 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 0cd2e6757e..2a588d8091 100644 --- a/block/qcow2.c +++ b/block

[PATCH 2/2] iotests/244: Test preallocation for data-file-raw

2020-06-19 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/244 | 65 ++ tests/qemu-iotests/244.out | 23 ++ 2 files changed, 88 insertions(+) diff --git a/tests/qemu-iotests/244 b/tests/qemu-iotests/244 index efe3c0428b..c2fdeab0c7 100755 --- a/tests

[PATCH 0/2] qcow2: Force preallocation with data-file-raw

2020-06-19 Thread Max Reitz
have preallocated 1:1 L1/L2 tables, so that the image always looks the same whether you respect or ignore the qcow2 metadata. The easiest way to achieve that is to enforce at least metadata preallocation whenever data-file-raw is given. Max Reitz (2): qcow2: Force preallocation with data-file

Re: [PATCH for-5.1] qcow2: Don't open images with a backing file and the data-file-raw bit

2020-06-19 Thread Max Reitz
On 18.06.20 14:03, Alberto Garcia wrote: > On Wed 03 Jun 2020 03:53:03 PM CEST, Max Reitz wrote: >> Sorry for the long delay. :/ > > And sorry for my long delay as well. > >> The patch itself looks good, but I’m not sure whether it is extensive >> enou

Re: [PULL 14/15] qcow2_format.py: dump bitmaps header extension

2020-06-18 Thread Max Reitz
On 18.06.20 15:28, Vladimir Sementsov-Ogievskiy wrote: > 18.06.2020 16:13, Max Reitz wrote: >> On 09.06.20 22:52, Eric Blake wrote: >>> From: Vladimir Sementsov-Ogievskiy >>> >>> Add class for bitmap extension and dump its fields. Further work is to >>

[PATCH v3 1/2] iotests: Make _filter_img_create more active

2020-06-18 Thread Max Reitz
tps://lists.nongnu.org/archive/html/qemu-block/2020-06/msg00339.html But that patch needs to come later so we can get away with changing as few reference outputs in this patch here as possible. Signed-off-by: Max Reitz --- tests/qemu-iotests/112.out | 2 +- tests/qemu-iotests/141

[PATCH v3 2/2] iotests: filter few more luks specific create options

2020-06-18 Thread Max Reitz
From: Maxim Levitsky This allows more tests to be able to have same output on both qcow2 luks encrypted images and raw luks images Signed-off-by: Maxim Levitsky Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky --- tests/qemu-iotests/087.out | 6 +++--- tests/qemu-iotests/134.out

[PATCH v3 0/2] iotests: Make _filter_img_create more active

2020-06-18 Thread Max Reitz
_filter_img_create more active' 002/2:[] [--] 'iotests: filter few more luks specific create options' Max Reitz (1): iotests: Make _filter_img_create more active Maxim Levitsky (1): iotests: filter few more luks specific create options tests/qemu-iotests/087.out | 6 +-- tests/qemu

Re: [PULL 14/15] qcow2_format.py: dump bitmaps header extension

2020-06-18 Thread Max Reitz
On 09.06.20 22:52, Eric Blake wrote: > From: Vladimir Sementsov-Ogievskiy > > Add class for bitmap extension and dump its fields. Further work is to > dump bitmap directory. > > Test new functionality inside 291 iotest. Unfortunately, it also breaks 291 with an external data file, which worked

[PATCH v2 2/2] iotests: filter few more luks specific create options

2020-06-18 Thread Max Reitz
From: Maxim Levitsky This allows more tests to be able to have same output on both qcow2 luks encrypted images and raw luks images Signed-off-by: Maxim Levitsky Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky --- tests/qemu-iotests/087.out | 6 +++--- tests/qemu-iotests/134.out

[PATCH v2 0/2] iotests: Make _filter_img_create more active

2020-06-18 Thread Max Reitz
_filter_img_create more active' 002/2:[] [-C] 'iotests: filter few more luks specific create options' Max Reitz (1): iotests: Make _filter_img_create more active Maxim Levitsky (1): iotests: filter few more luks specific create options tests/qemu-iotests/087.out | 6 +-- tests/qemu-iotests/112

[PATCH v2 1/2] iotests: Make _filter_img_create more active

2020-06-18 Thread Max Reitz
tps://lists.nongnu.org/archive/html/qemu-block/2020-06/msg00339.html But that patch needs to come later so we can get away with changing as few reference outputs in this patch here as possible. Signed-off-by: Max Reitz --- tests/qemu-iotests/112.out | 2 +- tests/qemu-iotests/141

Re: [PATCH 1/2] iotests: Make _filter_img_create more active

2020-06-17 Thread Max Reitz
On 17.06.20 16:02, Maxim Levitsky wrote: > On Wed, 2020-06-17 at 15:50 +0200, Max Reitz wrote: >> On 17.06.20 13:46, Maxim Levitsky wrote: >>> On Tue, 2020-06-16 at 15:17 +0200, Max Reitz wrote: >>>> Right now, _filter_img_create just filters out everything th

Re: [PATCH 0/5] iotests: Some fixes for rarely run cases

2020-06-17 Thread Max Reitz
On 17.06.20 16:19, Kevin Wolf wrote: > Am 17.06.2020 um 16:11 hat Max Reitz geschrieben: >> On 17.06.20 14:52, Kevin Wolf wrote: >>> Am 17.06.2020 um 12:48 hat Max Reitz geschrieben: >>>> Hi, >>>> >>>> Thomas’s report >>>> (http

Re: [PATCH 0/5] iotests: Some fixes for rarely run cases

2020-06-17 Thread Max Reitz
On 17.06.20 14:52, Kevin Wolf wrote: > Am 17.06.2020 um 12:48 hat Max Reitz geschrieben: >> Hi, >> >> Thomas’s report >> (https://lists.nongnu.org/archive/html/qemu-block/2020-06/msg00791.html) >> has given me a nice excuse to write this series. >> >&

Re: [PATCH 1/2] iotests: Make _filter_img_create more active

2020-06-17 Thread Max Reitz
On 17.06.20 13:46, Maxim Levitsky wrote: > On Tue, 2020-06-16 at 15:17 +0200, Max Reitz wrote: >> Right now, _filter_img_create just filters out everything that looks >> format-dependent, and applies some filename filters. That means that we >> have to add another filter

Re: [PATCH] iotests: Fix 051 output after qdev_init_nofail() removal

2020-06-17 Thread Max Reitz
On 16.06.20 17:49, Philippe Mathieu-Daudé wrote: > Commit 96927c744 replaced qdev_init_nofail() call by > isa_realize_and_unref() which has a different error > message. Update the test output accordingly. > > Gitlab CI error after merging b77b5b3dc7: >

[PATCH 5/5] iotests/{190,291}: compat=0.10 is unsupported

2020-06-17 Thread Max Reitz
Fixes: 5d72c68b49769c927e90b78af6d90f6a384b26ac Fixes: cf2d1203dcfc2bf964453d83a2302231ce77f2dc Signed-off-by: Max Reitz --- tests/qemu-iotests/190 | 2 ++ tests/qemu-iotests/291 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/qemu-iotests/190 b/tests/qemu-iotests/190 index

[PATCH 0/5] iotests: Some fixes for rarely run cases

2020-06-17 Thread Max Reitz
what I found. Max Reitz (5): iotests.py: Add skip_for_formats() decorator iotests/041: Skip test_small_target for qed iotests/292: data_file is unsupported iotests/229: data_file is unsupported iotests/{190,291}: compat=0.10 is unsupported tests/qemu-iotests/041| 2 ++ tests

[PATCH 4/5] iotests/229: data_file is unsupported

2020-06-17 Thread Max Reitz
Fixes: d89ac3cf305b28c024a76805a84d75c0ee1e786f Signed-off-by: Max Reitz --- tests/qemu-iotests/229 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/229 b/tests/qemu-iotests/229 index 99acb55ebb..89a5359f32 100755 --- a/tests/qemu-iotests/229 +++ b/tests/qemu-iotests/229

[PATCH 3/5] iotests/292: data_file is unsupported

2020-06-17 Thread Max Reitz
Fixes: e4d7019e1a81c61de6a925c3ac5bb6e62ea21b29 Signed-off-by: Max Reitz --- tests/qemu-iotests/292 | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/292 b/tests/qemu-iotests/292 index a2de27cca4..83ab19231d 100755 --- a/tests/qemu-iotests/292 +++ b/tests/qemu-iotests

[PATCH 2/5] iotests/041: Skip test_small_target for qed

2020-06-17 Thread Max Reitz
qed does not support shrinking images, so the test_small_target method should be skipped to keep 041 passing. Fixes: 16cea4ee1c8e5a69a058e76f426b2e17974d8d7d Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemu-iotests/041 b/tests

[PATCH 1/5] iotests.py: Add skip_for_formats() decorator

2020-06-17 Thread Max Reitz
Sometimes, we want to skip some test methods for certain formats. This decorator allows that. Signed-off-by: Max Reitz --- tests/qemu-iotests/118| 7 +++ tests/qemu-iotests/iotests.py | 13 + 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/qemu

Re: iotest 041 is failing with -qed

2020-06-17 Thread Max Reitz
On 17.06.20 08:18, Thomas Huth wrote: > > Hi! > > I just noticed that iotest 041 is failing with -qed: > > $ ./check -qed 041 > QEMU -- > "tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64" -nodefaults > -display none -accel qtest > QEMU_IMG --

Re: [PATCH] qcow2: Fix preallocation on images with unaligned sizes

2020-06-16 Thread Max Reitz
On 10.06.20 11:46, Alberto Garcia wrote: > When resizing an image with qcow2_co_truncate() using the falloc or > full preallocation modes the code assumes that both the old and new > sizes are cluster-aligned. > > There are two problems with this: > > 1) The calculation of how many clusters

Re: [PATCH v8 05/14] block/amend: refactor qcow2 amend options

2020-06-16 Thread Max Reitz
On 08.06.20 11:40, Maxim Levitsky wrote: > Some qcow2 create options can't be used for amend. > Remove them from the qcow2 create options and add generic logic to detect > such options in qemu-img > > Signed-off-by: Maxim Levitsky > Reviewed-by: Daniel P. Berrangé Last week (when I was about

[PATCH 2/2] iotests: filter few more luks specific create options

2020-06-16 Thread Max Reitz
From: Maxim Levitsky This allows more tests to be able to have same output on both qcow2 luks encrypted images and raw luks images Signed-off-by: Maxim Levitsky Signed-off-by: Max Reitz --- tests/qemu-iotests/087.out | 6 +++--- tests/qemu-iotests/134.out | 2 +- tests/qemu

[PATCH 1/2] iotests: Make _filter_img_create more active

2020-06-16 Thread Max Reitz
gnu.org/archive/html/qemu-block/2020-06/msg00339.html But that patch needs to come later so we can get away with changing as few reference outputs in this patch here as possible. Signed-off-by: Max Reitz --- tests/qemu-iotests/112.out | 2 +- tests/qemu-iotests/153 |

[PATCH 0/2] iotests: Make _filter_img_create more active

2020-06-16 Thread Max Reitz
the latter won’t break 134 and 158 for qcow. (Doing so will require dropping some hunks from the patch linked above, but that should be fine.) Max Reitz (1): iotests: Make _filter_img_create more active Maxim Levitsky (1): iotests: filter few more luks specific create options tests/qemu

Re: [PATCH v8 00/14] LUKS: encryption slot management using amend interface

2020-06-08 Thread Max Reitz
On 08.06.20 11:40, Maxim Levitsky wrote: > clone of "luks-keymgmnt-v2" > > Maxim Levitsky (14): > qcrypto/core: add generic infrastructure for crypto options amendment > qcrypto/luks: implement encryption key management > block/amend: add 'force' option > block/amend: separate amend and

Re: [PATCH v8 07/14] block/crypto: implement the encryption key management

2020-06-08 Thread Max Reitz
se has the image open, even readonly, encryption > key update will fail gracefully. > > Also thanks to Daniel Berrange for the idea of > unsharing read, rather that write permission which allows > to avoid cases when the other user had opened the image read-only. > > Signed-of

Re: [PATCH for-5.1] qcow2: Don't open images with a backing file and the data-file-raw bit

2020-06-05 Thread Max Reitz
On 05.06.20 15:00, Kevin Wolf wrote: [...] > Makes sense. I'm not against preallocation during image creation. I just > think it shouldn't play a role in deciding whether an image is valid or > not. Oh, no. I wouldn’t consider it corrupted just because some clusters are not allocated. I’d

Re: [PATCH for-5.1] qcow2: Don't open images with a backing file and the data-file-raw bit

2020-06-05 Thread Max Reitz
On 05.06.20 13:14, Kevin Wolf wrote: > Am 03.06.2020 um 15:53 hat Max Reitz geschrieben: >> On 15.04.20 21:02, Alberto Garcia wrote: >>> Although we cannot create these images with qemu-img it is still >>> possible to do it using an external tool. QEMU should refuse to o

Re: [PATCH] block/block-copy: block_copy_dirty_clusters: fix failure check

2020-06-03 Thread Max Reitz
On 26.05.20 20:13, Vladimir Sementsov-Ogievskiy wrote: > ret may be > 0 on success path at this point. Fix assertion, which may > crash currently. > > Fixes: 4ce5dd3e9b5ee0fac18625860eb3727399ee965e > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/block-copy.c | 4 +++- > 1 file

Re: [PATCH for-5.1] qcow2: Don't open images with a backing file and the data-file-raw bit

2020-06-03 Thread Max Reitz
On 15.04.20 21:02, Alberto Garcia wrote: > Although we cannot create these images with qemu-img it is still > possible to do it using an external tool. QEMU should refuse to open > them until the data-file-raw bit is cleared with 'qemu-img check'. > > Signed-off-by: Alberto Garcia > --- >

Re: [PATCH for-4.2 v2 3/3] block/file-posix: Let post-EOF fallocate serialize

2020-06-02 Thread Max Reitz
On 02.06.20 18:16, Vladimir Sementsov-Ogievskiy wrote: > 02.06.2020 18:46, Max Reitz wrote: >> On 02.06.20 16:43, Vladimir Sementsov-Ogievskiy wrote: >>> 01.11.2019 18:25, Max Reitz wrote: >>> >>> Sorry for being late, I have some comments >> >> Uh,

Re: [PATCH v7 00/14] LUKS: encryption slot management using amend interface

2020-06-02 Thread Max Reitz
On 18.05.20 14:20, Maxim Levitsky wrote: > Hi! > Here is the updated series of my patches, incorporating all the feedback I > received. You asked me on IRC what to do to get this series to move forward; considering I don’t think there were objections from anyone but me on v6, there are no

Re: [PATCH for-4.2 v2 3/3] block/file-posix: Let post-EOF fallocate serialize

2020-06-02 Thread Max Reitz
On 02.06.20 16:43, Vladimir Sementsov-Ogievskiy wrote: > 01.11.2019 18:25, Max Reitz wrote: > > Sorry for being late, I have some comments Uh, well. Reasonable, but I hope you don’t mind me having no longer having this patch fresh on my mind. >> The XFS kernel driver has a bug

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-06-02 Thread Max Reitz
On 18.05.20 18:26, Peter Krempa wrote: > On Wed, May 13, 2020 at 16:56:10 +0200, Max Reitz wrote: >> This command allows mapping block node names to aliases for the purpose >> of block dirty bitmap migration. >> >> This way, management tools can use differe

Re: [PATCH v6 04/14] block/amend: separate amend and create options for qemu-img

2020-05-15 Thread Max Reitz
On 14.05.20 18:10, Eric Blake wrote: > On 5/14/20 7:28 AM, Max Reitz wrote: >> On 10.05.20 15:40, Maxim Levitsky wrote: >>> Some options are only useful for creation >>> (or hard to be amended, like cluster size for qcow2), while some other >>> options are

Re: [PATCH v6 13/14] block/qcow2: implement blockdev-amend

2020-05-14 Thread Max Reitz
k/qcow2.c| 39 +++ > qapi/block-core.json | 16 +++- > 2 files changed, 54 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH v6 12/14] block/crypto: implement blockdev-amend

2020-05-14 Thread Max Reitz
tions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH v6 11/14] block/core: add generic infrastructure for x-blockdev-amend qmp command

2020-05-14 Thread Max Reitz
On 10.05.20 15:40, Maxim Levitsky wrote: > blockdev-amend will be used similiar to blockdev-create > to allow on the fly changes of the structure of the format based block > devices. > > Current plan is to first support encryption keyslot management for luks > based formats (raw and embedded in

Re: [PATCH v6 07/14] block/crypto: implement the encryption key management

2020-05-14 Thread Max Reitz
On 14.05.20 16:14, Daniel P. Berrangé wrote: > On Thu, May 14, 2020 at 04:09:59PM +0200, Max Reitz wrote: >> On 10.05.20 15:40, Maxim Levitsky wrote: >>> This implements the encryption key management using the generic code in >>> qcrypto layer and exposes

Re: [PATCH v6 09/14] iotests: filter few more luks specific create options

2020-05-14 Thread Max Reitz
On 10.05.20 15:40, Maxim Levitsky wrote: > This allows more tests to be able to have same output on both qcow2 luks > encrypted images > and raw luks images > > Signed-off-by: Maxim Levitsky > Reviewed-by: Daniel P. Berrangé > --- > tests/qemu-iotests/087.out | 6 ++--- >

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