[PATCH v5 1/3] migration: Add block-bitmap-mapping parameter

2020-08-20 Thread Max Reitz
(on the source, the destination, or even both with arbitrary aliases in the migration stream). While touching this code, fix a bug where bitmap names longer than 255 bytes would fail an assertion in qemu_put_counted_string(). Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Max Reitz

Re: [PATCH v4 2/4] iotests.py: Add wait_for_runstate()

2020-08-20 Thread Max Reitz
On 20.08.20 16:34, Vladimir Sementsov-Ogievskiy wrote: > 20.08.2020 17:23, Dr. David Alan Gilbert wrote: >> * Eric Blake (ebl...@redhat.com) wrote: >>> On 8/18/20 8:32 AM, Max Reitz wrote: >>>> Signed-off-by: Max Reitz >>>> --- >>>>    tests/q

Re: [PATCH v4 1/4] migration: Add block-bitmap-mapping parameter

2020-08-20 Thread Max Reitz
On 20.08.20 14:58, Vladimir Sementsov-Ogievskiy wrote: > 18.08.2020 16:32, Max Reitz wrote: >> This migration parameter allows mapping block node names and bitmap >> names to aliases for the purpose of block dirty bitmap migration. >> >> This way, management tools can us

Re: [PATCH v4 4/4] iotests: Test node/bitmap aliases during migration

2020-08-20 Thread Max Reitz
On 20.08.20 03:58, Eric Blake wrote: > On 8/18/20 8:32 AM, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >>   tests/qemu-iotests/300 | 595 + >>   tests/qemu-iotests/300.out |   5 + > > Rather sparse output (I hate

Re: [PATCH v4 1/4] migration: Add block-bitmap-mapping parameter

2020-08-20 Thread Max Reitz
On 20.08.20 03:17, Eric Blake wrote: > On 8/18/20 8:32 AM, Max Reitz wrote: >> This migration parameter allows mapping block node names and bitmap >> names to aliases for the purpose of block dirty bitmap migration. >> >> This way, management tools can use different node

Re: [PATCH v7 14/47] stream: Deal with filters

2020-08-20 Thread Max Reitz
On 20.08.20 12:49, Vladimir Sementsov-Ogievskiy wrote: > 20.08.2020 12:22, Max Reitz wrote: >> On 20.08.20 10:31, Max Reitz wrote: >> >> [...] >> >>> So all in all, I believe the biggest surprise about what’s written into >>> the top layer isn’t that i

Re: [PATCH v7 35/47] commit: Deal with filters

2020-08-20 Thread Max Reitz
On 19.08.20 19:58, Kevin Wolf wrote: > Am 25.06.2020 um 17:22 hat Max Reitz geschrieben: >> This includes some permission limiting (for example, we only need to >> take the RESIZE permission if the base is smaller than the top). >> >> Signed-off-by: Max Reitz >&

Re: [PATCH v7 33/47] mirror: Deal with filters

2020-08-20 Thread Max Reitz
On 19.08.20 18:50, Kevin Wolf wrote: > Am 25.06.2020 um 17:22 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). >> >&g

Re: [PATCH v7 14/47] stream: Deal with filters

2020-08-20 Thread Max Reitz
On 20.08.20 10:31, Max Reitz wrote: [...] > So all in all, I believe the biggest surprise about what’s written into > the top layer isn’t that it may be a json:{} filename, but the filename > of a node that maybe doesn’t even exist anymore? (Oh, no, please don’t > tell me you can d

Re: [PATCH v7 14/47] stream: Deal with filters

2020-08-20 Thread Max Reitz
On 19.08.20 17:16, Kevin Wolf wrote: > Am 19.08.2020 um 16:47 hat Max Reitz geschrieben: >> On 18.08.20 16:28, Kevin Wolf wrote: >>> Am 25.06.2020 um 17:21 hat Max Reitz geschrieben: >>>> Because of the (not so recent anymore) changes that make the stream job >>

Re: [PATCH v7 25/47] block: Def. impl.s for get_allocated_file_size

2020-08-19 Thread Max Reitz
On 19.08.20 12:57, Kevin Wolf wrote: > Am 25.06.2020 um 17:21 hat Max Reitz geschrieben: >> If every BlockDriver were to implement bdrv_get_allocated_file_size(), >> there are basically three ways it would be handled: >> (1) For protocol drivers: Figure out the actual a

Re: [PATCH v7 27/47] blkverify: Use bdrv_sum_allocated_file_size()

2020-08-19 Thread Max Reitz
On 19.08.20 12:46, Kevin Wolf wrote: > Am 25.06.2020 um 17:21 hat Max Reitz geschrieben: >> blkverify is a filter, so bdrv_get_allocated_file_size()'s default >> implementation will return only the size of its filtered child. >> However, because both of its children are

Re: [PATCH v7 10/47] mirror-top: Support compressed writes

2020-08-19 Thread Max Reitz
On 18.08.20 12:27, Kevin Wolf wrote: > Am 25.06.2020 um 17:21 hat Max Reitz geschrieben: >> Signed-off-by: Max Reitz >> --- >> block/mirror.c | 10 ++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/block/mirror.c b/block/mirror.c >>

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

2020-08-19 Thread Max Reitz
On 19.08.20 16:23, Kevin Wolf wrote: > Am 19.08.2020 um 13:56 hat Max Reitz geschrieben: >> On 13.08.20 18:29, 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 'e

Re: [PATCH v7 14/47] stream: Deal with filters

2020-08-19 Thread Max Reitz
On 18.08.20 16:28, Kevin Wolf wrote: > Am 25.06.2020 um 17:21 hat Max Reitz geschrieben: >> Because of the (not so recent anymore) changes that make the stream job >> independent of the base node and instead track the node above it, we >> have to split that "bottom"

Re: [PATCH v7 14/47] stream: Deal with filters

2020-08-19 Thread Max Reitz
On 10.08.20 13:04, Vladimir Sementsov-Ogievskiy wrote: > 10.08.2020 11:12, Max Reitz wrote: >> On 07.08.20 12:29, Vladimir Sementsov-Ogievskiy wrote: [...] >>> But, with our proposed way (freeze only chain up to base_overlay >>> inclusively, and use backing(base_over

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

2020-08-19 Thread Max Reitz
On 13.08.20 18:29, 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 user reference, so move it > to the block export level and tie it to

Re: [RFC PATCH 22/22] block/export: Add query-block-exports

2020-08-19 Thread Max Reitz
On 13.08.20 18:29, Kevin Wolf wrote: > This adds a simple QMP command to query the list of block exports. > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 33 + > block/export/export.c | 23 +++ > 2 files changed, 56 insertions(+

Re: [RFC PATCH 21/22] block/export: Move blk to BlockExport

2020-08-19 Thread Max Reitz
/server.c | 44 ++ > 3 files changed, 29 insertions(+), 21 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [RFC PATCH 20/22] block/export: Add block-export-del

2020-08-19 Thread Max Reitz
qdict) > Error *err = NULL; > > /* Rely on NBD_SERVER_REMOVE_MODE_SAFE being the default */ This comment needs adjustment, too. With that done: Reviewed-by: Max Reitz > -qmp_nbd_server_remove(name, force, NBD_SERVER_REMOVE_MODE_HARD, &err); > +qmp_nbd_server_remove(n

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

2020-08-19 Thread Max Reitz
remember if the user actually still owns it. > > Signed-off-by: Kevin Wolf > --- > include/block/export.h | 8 > block/export/export.c | 4 > blockdev-nbd.c | 5 - > nbd/server.c | 2 -- > 4 files changed, 12 insertions(+), 7 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

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

2020-08-18 Thread Max Reitz
nbd.c | 2 +- > 7 files changed, 68 insertions(+), 34 deletions(-) Reviewed-by: Max Reitz > diff --git a/block/export/export.c b/block/export/export.c > index 9de108cbc1..675db9a8b9 100644 > --- a/block/export/export.c > +++ b/block/export/export.c [...] > +/* t

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

2020-08-18 Thread Max Reitz
On 13.08.20 18:29, Kevin Wolf wrote: > We'll need an id to identify block exports in monitor commands. This > adds one. > > Note that this is different from the 'name' option in the NBD server, > which is the externally visible export name. While block export ids need > to be unique in the whole p

Re: [RFC PATCH 16/22] block/export: Allocate BlockExport in blk_exp_add()

2020-08-18 Thread Max Reitz
nce_size >= sizeof(BlockExport)) might be nice before dereferencing *exp. With that: Reviewed-by: Max Reitz > +exp = g_malloc0(drv->instance_size); > +*exp = (BlockExport) { > +.drv= &blk_exp_nbd, > +.refcount = 1, > +}; signature.asc Description: OpenPGP digital signature

[PATCH v4 0/4] migration: Add block-bitmap-mapping parameter

2020-08-18 Thread Max Reitz
] 'migration: Add block-bitmap-mapping parameter' 002/4:[0001] [FC] 'iotests.py: Add wait_for_runstate()' 003/4:[down] 'iotests.py: Let wait_migration() return on failure' 004/4:[0232] [FC] 'iotests: Test node/bitmap aliases during migration' Max Reitz (4

[PATCH v4 2/4] iotests.py: Add wait_for_runstate()

2020-08-18 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 717b5b652c..ee93cf22db 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -833,6

[PATCH v4 4/4] iotests: Test node/bitmap aliases during migration

2020-08-18 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/300 | 595 + tests/qemu-iotests/300.out | 5 + tests/qemu-iotests/group | 1 + 3 files changed, 601 insertions(+) create mode 100755 tests/qemu-iotests/300 create mode 100644 tests/qemu-iotests/300

[PATCH v4 3/4] iotests.py: Let wait_migration() return on failure

2020-08-18 Thread Max Reitz
Let wait_migration() return on failure (with the return value indicating whether the migration was completed or has failed), so we can use it for migrations that are expected to fail, too. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 18 -- 1 file changed, 12

[PATCH v4 1/4] migration: Add block-bitmap-mapping parameter

2020-08-18 Thread Max Reitz
(on the source, the destination, or even both with arbitrary aliases in the migration stream). While touching this code, fix a bug where bitmap names longer than 255 bytes would fail an assertion in qemu_put_counted_string(). Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Max Reitz

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

2020-08-18 Thread Max Reitz
On 18.08.20 09:19, Stefano Garzarella wrote: > Hi Yi Li, > thanks for this patch! Just a comment below: > > On Mon, Aug 17, 2020 at 07:01:13PM +0800, Yi Li wrote: >> Signed-off-by: Yi Li >> --- >> qemu-img.c | 12 ++-- >> 1 file changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a

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

2020-08-17 Thread Max Reitz
On 17.08.20 17:22, Kevin Wolf wrote: > Am 17.08.2020 um 16:56 hat Max Reitz geschrieben: >> On 13.08.20 18:29, Kevin Wolf wrote: >>> Signed-off-by: Kevin Wolf >>> --- >>> include/block/export.h | 6 ++ >>> nbd/server.c | 26 ++

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

2020-08-17 Thread Max Reitz
On 17.08.20 16:32, Kevin Wolf wrote: > Am 17.08.2020 um 15:51 hat Max Reitz geschrieben: >> On 17.08.20 15:13, Kevin Wolf wrote: >>> Am 17.08.2020 um 14:56 hat Max Reitz geschrieben: >>>> On 13.08.20 18:29, Kevin Wolf wrote: >>>>> qemu-nbd allows use

Re: [RFC PATCH 15/22] block/export: Move device to BlockExportOptions

2020-08-17 Thread Max Reitz
On 13.08.20 18:29, Kevin Wolf wrote: > Every block export needs a block node to export, so move the 'device' > option from BlockExportOptionsNbd to BlockExportOptions. > > To maintain compatibility in nbd-server-add, BlockExportOptionsNbd needs > to be wrapped by a new type NbdServerAddOptions tha

Re: [RFC PATCH 15/22] block/export: Move device to BlockExportOptions

2020-08-17 Thread Max Reitz
On 17.08.20 17:27, Kevin Wolf wrote: > Am 17.08.2020 um 17:13 hat Max Reitz geschrieben: >> On 13.08.20 18:29, Kevin Wolf wrote: >>> Every block export needs a block node to export, so move the 'device' >>> option from BlockExportOptionsNbd to BlockExportOptio

Re: [RFC PATCH 13/22] block/export: Move refcount from NBDExport to BlockExport

2020-08-17 Thread Max Reitz
w(BlockDriverState *bs, > > exp = g_new0(NBDExport, 1); > exp->common = (BlockExport) { > -.drv = &blk_exp_nbd, > +.drv= &blk_exp_nbd, > +.refcount = 1, > }; This makes me wish... Ah, for patch 16, I see. :) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

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

2020-08-17 Thread Max Reitz
On 13.08.20 18:29, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > include/block/export.h | 6 ++ > nbd/server.c | 26 +- > 2 files changed, 19 insertions(+), 13 deletions(-) Reviewed-by: Max Reitz > diff --git a/include/block/

Re: [RFC PATCH 11/22] qemu-nbd: Use blk_exp_add() to create the export

2020-08-17 Thread Max Reitz
On 17.08.20 16:27, Max Reitz wrote: > On 13.08.20 18:29, Kevin Wolf wrote: >> With this change, NBD exports are only created through the BlockExport >> interface any more. This allows us finally to move things from the NBD >> layer to the BlockExport layer if they make s

Re: [RFC PATCH 12/22] nbd/server: Simplify export shutdown

2020-08-17 Thread Max Reitz
f-by: Kevin Wolf > --- > nbd/server.c | 17 - > 1 file changed, 4 insertions(+), 13 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [RFC PATCH 11/22] qemu-nbd: Use blk_exp_add() to create the export

2020-08-17 Thread Max Reitz
On 13.08.20 18:29, Kevin Wolf wrote: > With this change, NBD exports are only created through the BlockExport > interface any more. This allows us finally to move things from the NBD > layer to the BlockExport layer if they make sense for other export > types, too. I see. > blk_exp_add() returns

Re: [RFC PATCH 10/22] nbd: Remove NBDExport.close callback

2020-08-17 Thread Max Reitz
- > 4 files changed, 7 insertions(+), 21 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

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

2020-08-17 Thread Max Reitz
On 17.08.20 15:29, Kevin Wolf wrote: > Am 17.08.2020 um 15:19 hat Max Reitz geschrieben: >> On 17.08.20 14:45, Kevin Wolf wrote: >>> Am 17.08.2020 um 12:03 hat Max Reitz geschrieben: >>>> On 13.08.20 18:29, Kevin Wolf wrote: >>>>> We want to have a

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

2020-08-17 Thread Max Reitz
On 17.08.20 15:13, Kevin Wolf wrote: > Am 17.08.2020 um 14:56 hat Max Reitz geschrieben: >> On 13.08.20 18:29, Kevin Wolf wrote: >>> qemu-nbd allows use of writethrough cache modes, which mean that write >>> requests made through NBD will cause a flush before they co

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

2020-08-17 Thread Max Reitz
On 17.08.20 14:49, Kevin Wolf wrote: > Am 17.08.2020 um 13:41 hat Max Reitz geschrieben: >> On 13.08.20 18:29, Kevin Wolf wrote: >>> nbd-server-add tries to be convenient and adds two questionable >>> features that we don't want to share in block-export-add, eve

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

2020-08-17 Thread Max Reitz
On 17.08.20 14:45, Kevin Wolf wrote: > Am 17.08.2020 um 12:03 hat Max Reitz geschrieben: >> On 13.08.20 18:29, Kevin Wolf wrote: >>> We want to have a common set of commands for all types of block exports. >>> Currently, this is only NBD, but we're going to add mor

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

2020-08-17 Thread Max Reitz
On 13.08.20 18:29, Kevin Wolf wrote: > qemu-nbd allows use of writethrough cache modes, which mean that write > requests made through NBD will cause a flush before they complete. > Expose the same functionality in block-export-add. > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 7

Re: [RFC PATCH 08/22] nbd: Add max-connections to nbd-server-start

2020-08-17 Thread Max Reitz
his series so that patch 11 can happen? Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [RFC PATCH 06/22] qemu-nbd: Use raw block driver for --offset

2020-08-17 Thread Max Reitz
On 13.08.20 18:29, Kevin Wolf wrote: > Instead of implementing qemu-nbd --offset in the NBD code, just put a > raw block node with the requested offset on top of the user image and > rely on that doing the job. > > This does not only simplify the nbd_export_new() interface and bring it > closer to

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

2020-08-17 Thread Max Reitz
On 13.08.20 18:29, Kevin Wolf wrote: > nbd-server-add tries to be convenient and adds two questionable > features that we don't want to share in block-export-add, even for NBD > exports: > > 1. When requesting a writable export of a read-only device, the export >is silently downgraded to read-

Re: [RFC PATCH 06/22] qemu-nbd: Use raw block driver for --offset

2020-08-17 Thread Max Reitz
clude/block/nbd.h | 4 ++-- > blockdev-nbd.c | 9 + > nbd/server.c| 34 +- > qemu-nbd.c | 27 --- > 4 files changed, 32 insertions(+), 42 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [RFC PATCH 05/22] qemu-storage-daemon: Use qmp_block_export_add()

2020-08-17 Thread Max Reitz
tion(+), 12 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

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

2020-08-17 Thread Max Reitz
On 13.08.20 18:29, Kevin Wolf wrote: > We want to have a common set of commands for all types of block exports. > Currently, this is only NBD, but we're going to add more types. > > This patch adds the basic BlockExport and BlockExportDriver structs and > a QMP command block-export-add that create

Re: [RFC PATCH 03/22] qapi: Rename BlockExport to BlockExportOptions

2020-08-17 Thread Max Reitz
block/monitor/block-hmp-cmds.c | 6 +++--- > blockdev-nbd.c | 2 +- > qemu-storage-daemon.c | 8 > 4 files changed, 14 insertions(+), 14 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [RFC PATCH 02/22] qapi: Create block-export module

2020-08-17 Thread Max Reitz
t; new file mode 100644 > index 00..62f4938e83 > --- /dev/null > +++ b/qapi/block-export.json > @@ -0,0 +1,172 @@ There should probably be a filetype modeline here (not trying to get into any hornets’ nest here, but... :)). With that: Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [RFC PATCH 01/22] nbd: Remove unused nbd_export_get_blockdev()

2020-08-17 Thread Max Reitz
On 13.08.20 18:29, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > include/block/nbd.h | 2 -- > nbd/server.c| 5 - > 2 files changed, 7 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH for-5.2 v3 0/3] migration: Add block-bitmap-mapping parameter

2020-08-13 Thread Max Reitz
On 12.08.20 16:38, Vladimir Sementsov-Ogievskiy wrote: > Now this doesn't apply, as code changed a lot after my series >  "[PATCH v4 for-5.1 00/21] Fix error handling during bitmap postcopy" > merged first. Yeah, well. Yeah. > I feel my responsibility for the mess with these series, so if you wa

Re: [PATCH for-5.2 v3 1/3] migration: Add block-bitmap-mapping parameter

2020-08-13 Thread Max Reitz
On 12.08.20 16:32, Eric Blake wrote: > On 7/22/20 3:05 AM, Max Reitz wrote: >> This migration parameter allows mapping block node names and bitmap >> names to aliases for the purpose of block dirty bitmap migration. >> >> This way, management tools can use different node

Re: [PATCH for-5.2 v3 0/3] migration: Add block-bitmap-mapping parameter

2020-08-12 Thread Max Reitz
Ping – seems like everyone found v2 more or less acceptable bar the failing assertion in patch 1, and some aspects of the test. How about v3, are there any objections? On 22.07.20 10:05, Max Reitz wrote: > RFC v1: https://lists.nongnu.org/archive/html/qemu-block/2020-05/msg00912.html >

Re: [PULL 0/2] Block patches for 5.1.0-rc4

2020-08-11 Thread Max Reitz
On 11.08.20 11:39, Peter Maydell wrote: > On Tue, 11 Aug 2020 at 10:35, Max Reitz wrote: >> >> Hi, >> >> There is a bug in the backup job that breaks backups from images whose >> size is not aligned to the job's cluster size (i.e., qemu crashes >>

[PULL 2/2] iotests: add test for unaligned granularity bitmap backup

2020-08-11 Thread Max Reitz
work correctly. Signed-off-by: Stefan Reiter Message-Id: <20200810095523.15071-2-s.rei...@proxmox.com> [mreitz: Drop bitmap, and do not write past the image's end] Signed-off-by: Max Reitz --- tests/qemu-iotests/304 | 60 ++ tests/qemu-iotests/3

[PULL 1/2] block/block-copy: always align copied region to cluster size

2020-08-11 Thread Max Reitz
map's granularity. Always ALIGN_UP the resulting bytes value to satisfy block_copy_do_copy, which requires the 'bytes' parameter to be aligned to cluster size. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Stefan Reiter Message-Id: <20200810095523.15071-1-s.rei...@proxmox.

[PULL 0/2] Block patches for 5.1.0-rc4

2020-08-11 Thread Max Reitz
Hi, There is a bug in the backup job that breaks backups from images whose size is not aligned to the job's cluster size (i.e., qemu crashes because of a failed assertion). If this bug makes it into the release, it would be a regression from 5.0. On one hand, this is probably a rare configuratio

[PATCH] iotests/059: Fix reference output

2020-08-11 Thread Max Reitz
As of the patch to flush qemu-img's "Formatting" message before the error message, 059 has been broken for vmdk. Fix it. Fixes: 4e2f4418784da09cb106264340241856cd2846df ("qemu-img: Flush stdout before before potential stderr messages") Signed-off-by: Max Reitz --

[PATCH] iotests/259: Fix reference output

2020-08-11 Thread Max Reitz
The error message has changed recently, breaking the test. Fix it. Fixes: a2b333c01880f56056d50c238834d62e32001e54 ("block: nbd: Fix convert qcow2 compressed to nbd") Signed-off-by: Max Reitz --- tests/qemu-iotests/259.out | 2 +- 1 file changed, 1 insertion(+), 1 deletio

Re: [PATCH for-5.1 v2 2/2] iotests: add test for unaligned granularity bitmap backup

2020-08-10 Thread Max Reitz
(Note: When submitting a patch series with multiple patches, our guidelines require a cover letter: https://wiki.qemu.org/Contribute/SubmitAPatch#Include_a_meaningful_cover_letter But not too important now.) On 10.08.20 11:55, Stefan Reiter wrote: > Start a VM with a 4097 byte image attached, add

Re: [PATCH for-5.1 v2 1/2] block/block-copy: always align copied region to cluster size

2020-08-10 Thread Max Reitz
On 10.08.20 11:55, Stefan Reiter wrote: > Since commit 42ac214406e0 (block/block-copy: refactor task creation) > block_copy_task_create calculates the area to be copied via > bdrv_dirty_bitmap_next_dirty_area, but that can return an unaligned byte > count if the image's last cluster end is not alig

Re: [PATCH v7 14/47] stream: Deal with filters

2020-08-10 Thread Max Reitz
On 07.08.20 12:29, Vladimir Sementsov-Ogievskiy wrote: > 16.07.2020 17:59, Max Reitz wrote: >> On 10.07.20 19:41, Andrey Shinkevich wrote: >>> On 10.07.2020 18:24, Max Reitz wrote: >>>> On 09.07.20 16:52, Andrey Shinkevich wrote: >>>>> On 25.06.2020

[PATCH 2/2] iotests/169: Test source cont with backing bmap

2020-07-30 Thread Max Reitz
Test migrating from a VM with a persistent bitmap in the backing chain, and then continuing that VM after the migration Signed-off-by: Max Reitz --- tests/qemu-iotests/169 | 64 +- tests/qemu-iotests/169.out | 4 +-- 2 files changed, 65 insertions(+), 3

[PATCH 1/2] qcow2: Release read-only bitmaps when inactivated

2020-07-30 Thread Max Reitz
-by: Max Reitz --- block/qcow2-bitmap.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index 1f38806ca6..8c34b2aef7 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -1562,11 +1562,22 @@ void

[PATCH 0/2] qcow2: Release read-only bitmaps when inactivated

2020-07-30 Thread Max Reitz
released before migration must be a persistent bitmap). What are your thoughts on this? Max Reitz (2): qcow2: Release read-only bitmaps when inactivated iotests/169: Test source cont with backing bmap block/qcow2-bitmap.c | 23 +++--- tests/qemu-iotests/169 | 64

Re: qemu-img convert asserts while converting from vhdx to raw

2020-07-29 Thread Max Reitz
On 28.07.20 18:53, Swapnil Ingle wrote: > Hey Guys, > >   > > We are seeing following assert when trying to convert disk image from > vhdx to raw.  > > This issue is seen only for disk with 4k logical sector size. Honestly, looking at the vhdx code, it just can’t work for 4k logical sectors wit

Re: [PATCH v7 41/47] block: Leave BDS.backing_file constant

2020-07-28 Thread Max Reitz
On 27.07.20 14:27, Andrey Shinkevich wrote: > On 25.06.2020 18:22, Max Reitz wrote: >> Parts of the block layer treat BDS.backing_file as if it were whatever >> the image header says (i.e., if it is a relative path, it is relative to >> the overlay), other parts treat it l

Re: [PATCH v7 44/47] iotests: Add filter commit test cases

2020-07-28 Thread Max Reitz
On 27.07.20 19:45, Andrey Shinkevich wrote: > On 25.06.2020 18:22, Max Reitz wrote: >> This patch adds some tests on how commit copes with filter nodes. >> >> Signed-off-by: Max Reitz >> --- >>   tests/qemu-iotests/040 | 177

[PULL 0/3] Block patches for 5.1.0-rc2?

2020-07-28 Thread Max Reitz
w2 formats -------- Max Reitz (3): block: Fix bdrv_aligned_p*v() for qiov_offset != 0 iotests/028: Add test for cross-base-EOF reads iotests/197: Fix for non-qcow2 formats block/io.c | 10 ++ tests/qemu-iotests/028 | 19 +++ tests/qe

[PULL 2/3] iotests/028: Add test for cross-base-EOF reads

2020-07-28 Thread Max Reitz
Signed-off-by: Max Reitz Message-Id: <20200728120806.265916-3-mre...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy Tested-by: Vladimir Sementsov-Ogievskiy Tested-by: Claudio Fontana --- tests/qemu-iotests/028 | 19 +++ tests/qemu-iotests/028.out | 11

[PULL 1/3] block: Fix bdrv_aligned_p*v() for qiov_offset != 0

2020-07-28 Thread Max Reitz
ot;) Fixes: 28c4da28695bdbe04b336b2c9c463876cc3aaa6d ("block/io: bdrv_aligned_pwritev: use and support qiov_offset") Reported-by: Claudio Fontana Reported-by: Bruce Rogers Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz Message-Id: <20200728120806.265916-2-mre...@redhat.com

[PULL 3/3] iotests/197: Fix for non-qcow2 formats

2020-07-28 Thread Max Reitz
: 1855536256eb0a5708b04b85f744de69559ea323 ("iotests/197: Fix for compat=0.10") Reported-by: Thomas Huth Signed-off-by: Max Reitz Message-Id: <20200728131134.902519-1-mre...@redhat.com> Reviewed-by: Eric Blake --- tests/qemu-iotests/197 | 8 +--- tests/qemu-iotests/197.out | 2 +- 2 files chang

[PATCH v2] iotests/197: Fix for non-qcow2 formats

2020-07-28 Thread Max Reitz
: 1855536256eb0a5708b04b85f744de69559ea323 Reported-by: Thomas Huth Signed-off-by: Max Reitz --- v2: - Add --no-opts to the _make_test_img line so this passes for formats that have some default non-empty $IMGOPTS (like vmdk) --- tests/qemu-iotests/197 | 8 +--- tests/qemu-iotests/197.out | 2 +- 2 files changed, 6

[PATCH] iotests/197: Fix for non-qcow2 formats

2020-07-28 Thread Max Reitz
: 1855536256eb0a5708b04b85f744de69559ea323 Reported-by: Thomas Huth Signed-off-by: Max Reitz --- tests/qemu-iotests/197 | 8 +--- tests/qemu-iotests/197.out | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/197 b/tests/qemu-iotests/197 index 121959a09c..7d723b0a56 100755 --- a

[PATCH for-5.1 2/2] iotests/028: Add test for cross-base-EOF reads

2020-07-28 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/028 | 19 +++ tests/qemu-iotests/028.out | 11 +++ 2 files changed, 30 insertions(+) diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028 index 5d043cef92..6dd3ae09a3 100755 --- a/tests/qemu-iotests/028 +++ b

[PATCH for-5.1 0/2] block: Fix bdrv_aligned_p*v() for qiov_offset != 0

2020-07-28 Thread Max Reitz
Hi, Patch 1 is the fix, patch 2 adds a test. I think we must get this into 5.1, rc2 or not. Max Reitz (2): block: Fix bdrv_aligned_p*v() for qiov_offset != 0 iotests/028: Add test for cross-base-EOF reads block/io.c | 10 ++ tests/qemu-iotests/028 | 19

[PATCH for-5.1 1/2] block: Fix bdrv_aligned_p*v() for qiov_offset != 0

2020-07-28 Thread Max Reitz
Reported-by: Bruce Rogers Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- block/io.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/block/io.c b/block/io.c index b6564e34c5..ad3a51ed53 100644 --- a/block/io.c +++ b/block/io.c @@ -1524,12 +1524,13 @@ static

[PULL 3/3] iotests/197: Fix for compat=0.10

2020-07-27 Thread Max Reitz
test fails. Just force compat=1.1 for that particular case to enforce the cluster to get allocated. Fixes: 61b3043965fe3552ee2684a97e7cc809ca7a71b3 Signed-off-by: Max Reitz Message-Id: <20200727135237.1096841-1-mre...@redhat.com> Reviewed-by: Eric Blake --- tests/qemu-iotests/197 | 4 +

[PULL 1/3] block/amend: Check whether the node exists

2020-07-27 Thread Max Reitz
: ced914d0ab9fb2c900f873f6349a0b8eecd1fdbe Signed-off-by: Max Reitz Message-Id: <20200710095037.10885-1-mre...@redhat.com> Reviewed-by: Maxim Levitsky --- block/amend.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/amend.c b/block/amend.c index f4612dcf08..392df9ef83 100644

[PULL 2/3] iotests: Select a default machine for the rx and avr targets

2020-07-27 Thread Max Reitz
e already do for the arm- and tricore-softmmu targets. Signed-off-by: Thomas Huth Message-Id: <20200722161908.25383-1-th...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/check | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/qemu-

[PULL 0/3] Block patches for 5.1

2020-07-27 Thread Max Reitz
for qcow2 -o compat=0.10 -------- Max Reitz (2): block/amend: Check whether the node exists iotests/197: Fix for compat=0.10 Thomas Huth (1): iotests: Select a default machine for the rx and avr targets block/amend.c

[PATCH] iotests/197: Fix for compat=0.10

2020-07-27 Thread Max Reitz
test fails. Just force compat=1.1 for that particular case to enforce the cluster to get allocated. Fixes: 61b3043965fe3552ee2684a97e7cc809ca7a71b3 Signed-off-by: Max Reitz --- tests/qemu-iotests/197 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/197 b

Re: [PATCH 2/2] qemu-iotests: Test convert to qcow2 compressed to NBD

2020-07-27 Thread Max Reitz
On 26.07.20 17:25, Nir Soffer wrote: > Add test for "qemu-img convert -O qcow2 -c" to NBD target. The use case > is writing compressed disk content to OVA archive. > > Signed-off-by: Nir Soffer > --- > tests/qemu-iotests/302 | 83 ++ > tests/qemu-iotests/3

Re: [PATCH 1/2] block: nbd: Fix convert qcow2 compressed to nbd

2020-07-27 Thread Max Reitz
On 26.07.20 17:25, Nir Soffer wrote: > When converting to qcow2 compressed format, the last step is a special > zero length compressed write, ending in call to bdrv_co_truncate(). This > call always fail for the nbd driver since it does not implement > bdrv_co_truncate(). > > For block devices, wh

Re: [PATCH v7 34/47] backup: Deal with filters

2020-07-24 Thread Max Reitz
On 23.07.20 17:51, Andrey Shinkevich wrote: > On 25.06.2020 18:22, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >>   block/backup-top.c |  2 +- >>   block/backup.c |  9 + >>   blockdev.c | 19 +++ >>   3 files

Re: [PATCH v7 33/47] mirror: Deal with filters

2020-07-24 Thread Max Reitz
On 22.07.20 20:31, Andrey Shinkevich wrote: > On 25.06.2020 18:22, Max Reitz wrote: >> 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). >> >&g

Re: [PATCH v7 29/47] blockdev: Use CAF in external_snapshot_prepare()

2020-07-24 Thread Max Reitz
On 20.07.20 18:08, Andrey Shinkevich wrote: > On 25.06.2020 18:21, Max Reitz wrote: >> This allows us to differentiate between filters and nodes with COW >> backing files: Filters cannot be used as overlays at all (for this >> function). >> >> Signed-off-by: Max

Re: [PATCH v7 28/47] block/null: Implement bdrv_get_allocated_file_size

2020-07-24 Thread Max Reitz
On 20.07.20 17:10, Andrey Shinkevich wrote: > On 25.06.2020 18:21, Max Reitz wrote: >> It is trivial, so we might as well do it. >> >> Signed-off-by: Max Reitz >> --- >>   block/null.c   | 7 +++ >>   tests/qemu-iotests/153.out | 2

Re: [PATCH for-5.1] iotests: Select a default machine for the rx and avr targets

2020-07-24 Thread Max Reitz
On 22.07.20 18:19, Thomas Huth wrote: > If you are building only with either the new rx-softmmu or avr-softmmu > target, "make check-block" fails a couple of tests since there is no > default machine defined in these new targets. We have to select a machine > in the "check" script for these, just l

Re: [PATCH] block/amend: Check whether the node exists

2020-07-24 Thread Max Reitz
On 10.07.20 11:50, Max Reitz wrote: > We should check whether the user-specified node-name actually refers to > a node. The simplest way to do that is to use bdrv_lookup_bs() instead > of bdrv_find_node() (the former wraps the latter, and produces an error > message if necessary). &

Re: [PATCH] block/amend: Check whether the node exists

2020-07-24 Thread Max Reitz
On 23.07.20 19:56, Peter Maydell wrote: > On Fri, 10 Jul 2020 at 10:51, Max Reitz wrote: >> >> We should check whether the user-specified node-name actually refers to >> a node. The simplest way to do that is to use bdrv_lookup_bs() instead >> of bdrv_find_node() (

Re: [PATCH v2 20/20] simplebench: add bench-backup.py

2020-07-23 Thread Max Reitz
On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: > Add script to benchmark new backup architecture. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > scripts/simplebench/bench-backup.py | 132 > 1 file changed, 132 insertions(+) > create mode 100755 scri

Re: [PATCH v2 19/20] simplebench: bench_block_job: add cmd_options argument

2020-07-23 Thread Max Reitz
b.py > @@ -1,4 +1,4 @@ > -#!/usr/bin/env python > +#!/usr/bin/env python3 Looks a bit unrelated. Apart from that: Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH v2 18/20] block/block-copy: drop unused argument of block_copy()

2020-07-23 Thread Max Reitz
ns(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH v2 17/20] backup: move to block-copy

2020-07-23 Thread Max Reitz
On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: > This brings async request handling and block-status driven chunk sizes > to backup out of the box, which improves backup performance. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block-copy.h | 9 +-- > block/bac

Re: [PATCH v2 16/20] iotests: 257: prepare for backup over block-copy

2020-07-23 Thread Max Reitz
+++--- > 2 files changed, 154 insertions(+), 153 deletions(-) It’s a shame that we don’t run this test with the default configuration then, but I suppose that’s how it is. For now, at least. Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

<    7   8   9   10   11   12   13   14   15   16   >