Re: [PATCH 4/6] block, migration: add bdrv_finalize_vmstate helper

2020-08-28 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, Aug 27, 2020 at 04:02:38PM +0300, Denis V. Lunev wrote: >> On 8/27/20 3:58 PM, Daniel P. Berrangé wrote: >> > On Thu, Jul 09, 2020 at 04:26:42PM +0300, Denis V. Lunev wrote: >> >> Right now bdrv_fclose() is just calling bdrv_flush(). >> >> >> >> The problem

Re: [PATCH v2 1/2] util/hexdump: Convert to take a void pointer argument

2020-08-28 Thread Li Qiang
Philippe Mathieu-Daudé 于2020年8月23日周日 上午2:11写道: > > Most uses of qemu_hexdump() do not take an array of char > as input, forcing use of cast. Since we can use this > helper to dump any kind of buffer, use a pointer to void > argument instead. > > Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH v2 (BROKEN) 0/6] migration: bring improved savevm/loadvm/delvm to QMP

2020-08-28 Thread Kevin Wolf
Am 28.08.2020 um 08:20 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 27.08.2020 um 13:06 hat Markus Armbruster geschrieben: > >> Daniel P. Berrangé writes: > >> > >> > On Wed, Aug 26, 2020 at 07:28:24PM +0100, Daniel P. Berrangé wrote: > >> >> On Wed, Aug 26, 2020 at

Re: [PATCH v2 0/2] util/hexdump: Cleanup qemu_hexdump()

2020-08-28 Thread Stefano Garzarella
On Sat, Aug 22, 2020 at 08:09:48PM +0200, Philippe Mathieu-Daudé wrote: > - Pass const void* buffer > - Reorder arguments > > Supersedes: <20200822150457.1322519-1-f4...@amsat.org> > > Philippe Mathieu-Daudé (2): > util/hexdump: Convert to take a void pointer argument > util/hexdump:

Re: [PATCH v2 (BROKEN) 0/6] migration: bring improved savevm/loadvm/delvm to QMP

2020-08-28 Thread Markus Armbruster
Kevin Wolf writes: > Am 27.08.2020 um 13:06 hat Markus Armbruster geschrieben: >> Daniel P. Berrangé writes: >> >> > On Wed, Aug 26, 2020 at 07:28:24PM +0100, Daniel P. Berrangé wrote: >> >> On Wed, Aug 26, 2020 at 05:52:06PM +0200, Markus Armbruster wrote: >> >> > Open questions: >> >>

Re: [PATCH v2 1/2] util/hexdump: Convert to take a void pointer argument

2020-08-28 Thread Edgar E. Iglesias
On Sat, Aug 22, 2020 at 08:09:49PM +0200, Philippe Mathieu-Daudé wrote: > Most uses of qemu_hexdump() do not take an array of char > as input, forcing use of cast. Since we can use this > helper to dump any kind of buffer, use a pointer to void > argument instead. > > Signed-off-by: Philippe

Re: [PATCH v2 2/2] util/hexdump: Reorder qemu_hexdump() arguments

2020-08-28 Thread Edgar E. Iglesias
On Sat, Aug 22, 2020 at 08:09:50PM +0200, Philippe Mathieu-Daudé wrote: > qemu_hexdump()'s pointer to the buffer and length of the > buffer are closely related arguments but are widely separated > in the argument list order (also, the format of > function prototypes is usually to have the FILE*

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

2020-08-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200828110828.13833-1-be...@igalia.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

[PATCH v2 2/7] qemu: Introduce functions to handle transient disk

2020-08-28 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Here is the implementation of transient option for qcow2 and raw format disk. This gets available directive in domain xml file like as: When the qemu command line options are built, a new qcow2 image is created with backing qcow2 by

[PATCH v2 3/7] qemu: Add transient disk handler to start and stop the guest

2020-08-28 Thread Masayoshi Mizuma
From: Masayoshi Mizuma The transient disk is attached before the guest starts. Remove the transient disk when the guest does shutdown. Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_process.c | 8 1 file changed, 8 insertions(+) diff --git a/src/qemu/qemu_process.c

[PATCH v2 1/7] qemuSnapshotDiskPrepareOne: Get available even if snapdisk is NULL

2020-08-28 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Get available even if snapdisk argument is NULL at qemuSnapshotDiskPrepareOne() so that the caller can setup dd->src. Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_snapshot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v2 0/7] qemu: implementation of transient disk option

2020-08-28 Thread Masayoshi Mizuma
This patchset tries to implement transient option for qcow2 and raw format disk. This uses the snapshot cleanup codes: https://www.redhat.com/archives/libvir-list/2020-August/msg00299.html It gets user available to set to the domain xml file like as: Any

[PATCH v2 4/7] qemu: Transient option gets avaiable for qcow2 and raw format disk

2020-08-28 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_validate.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 488f258d00..82818a4fdc 100644 --- a/src/qemu/qemu_validate.c +++

[PATCH v2 6/7] qemu: Block disk hotplug when transient disk option is enabled

2020-08-28 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Block disk hotplug when transient disk option is enabled so far. Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_hotplug.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 2c6c30ce03..1c1b6c3acf 100644

[PATCH v2 7/7] qemu: Block blockjobs when transient disk option is enabled

2020-08-28 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Block blockjobs when transient disk option is enabled so far. Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_domain.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index e28f704dba..98a52e5476 100644 ---

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

2020-08-28 Thread 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 --- block/qcow2.h | 6 +++ block/qcow2-bitmap.c | 11 -- block/qcow2-cluster.c | 24 ++--

Re: [PATCH v7 1/8] Introduce yank feature

2020-08-28 Thread Lukas Straub
On Thu, 27 Aug 2020 14:37:00 +0200 Markus Armbruster wrote: > I apologize for not reviewing this much earlier. > > Lukas Straub writes: > > > The yank feature allows to recover from hanging qemu by "yanking" > > at various parts. Other qemu systems can register themselves and > > multiple

[PATCH v2 5/7] qemu: Block migration when transient disk option is enabled

2020-08-28 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Block migration when transient disk option is enabled because migration requires some blockjobs. Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_migration.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/qemu/qemu_migration.c

Re: QEMU build error with --disable-qcow1

2020-08-28 Thread Paolo Bonzini
On 28/08/20 18:34, Thomas Huth wrote: > > Linking target qemu-nbd > libblock.fa(block_qcow2-threads.c.o): In function `qcow2_zlib_compress': > /tmp/qemu-test/../../home/thuth/devel/qemu/block/qcow2-threads.c:101: > undefined reference to `deflateInit2_' >

QEMU build error with --disable-qcow1

2020-08-28 Thread Thomas Huth
Hi, if I run "configure" with --disable-qcow1, I currently get a build error: Linking target qemu-nbd libblock.fa(block_qcow2-threads.c.o): In function `qcow2_zlib_compress': /tmp/qemu-test/../../home/thuth/devel/qemu/block/qcow2-threads.c:101: undefined reference to `deflateInit2_'

Re: [PATCH v7 4/4] block: apply COR-filter to block-stream jobs

2020-08-28 Thread Andrey Shinkevich
On 24.08.2020 14:30, Vladimir Sementsov-Ogievskiy wrote: 24.08.2020 11:31, 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

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

2020-08-28 Thread Andrey Shinkevich via
Provide API for the COR-filter insertion/removal. Also, drop the filter child permissions for an inactive state when the filter node is being removed. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/copy-on-read.c | 104

[PATCH v8 1/7] copy-on-read: Support preadv/pwritev_part functions

2020-08-28 Thread Andrey Shinkevich via
Add support for the recently introduced functions bdrv_co_preadv_part() and bdrv_co_pwritev_part() to the COR-filter driver. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/copy-on-read.c | 28 1 file changed, 16 insertions(+),

[PATCH v8 0/7] Apply COR-filter to the block-stream permanently

2020-08-28 Thread Andrey Shinkevich via
Note: this series is based on the another one "block: Deal with filters" by Max Reitz that could be found in the branches: https://git.xanclic.moe/XanClic/qemu child-access-functions-v6 https://github.com/XanClic/qemu child-access-functions-v6 v8: 03: qapi - version changed to

[PATCH] block: always link with zlib

2020-08-28 Thread Paolo Bonzini
The qcow2 driver needs the zlib dependency. While emulators provided it through the migration code, this is not true of the tools. Move the dependency from the qcow1 rule directly into block_ss so that it is included unconditionally. Fixes build with --disable-qcow1. Reported-by: Thomas Huth

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

2020-08-28 Thread Andrey Shinkevich via
To keep the base node unchanged during the block-stream operation, freeze it as the other part of the backing chain with the intermediate nodes related to the job. This patch revers the change made with the commit c624b015bf as the correct base file name and its format have to be written down to

[PATCH v8 3/7] qapi: add filter-node-name to block-stream

2020-08-28 Thread Andrey Shinkevich via
Provide the possibility to pass the 'filter-node-name' parameter to the block-stream job as it is done for the commit block job. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/monitor/block-hmp-cmds.c | 4 ++-- block/stream.c | 4 +++-

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

2020-08-28 Thread Andrey Shinkevich via
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 driver. The rest of the functionality will be implemented in the patch that follows. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 41

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

2020-08-28 Thread Andrey Shinkevich via
Limit the guest's COR operations by the base node in the backing chain during a stream job. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 49 + 1 file changed, 49 insertions(+) diff --git a/block/copy-on-read.c

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

2020-08-28 Thread Andrey Shinkevich via
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. The COR-filter insertion incurs changes in the iotests

[PATCH v3 5/5] qemu-iotests: Simplify FilePath __init__

2020-08-28 Thread Nir Soffer
Use list comprehension instead of append loop. Signed-off-by: Nir Soffer Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 7a20c9..cd0abf37e5

[PATCH v3 1/5] qemu-iotests: Fix FilePaths cleanup

2020-08-28 Thread 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 --- tests/qemu-iotests/iotests.py | 8 1

[PATCH v3 3/5] qemu-iotests: Support varargs syntax in FilePaths

2020-08-28 Thread Nir Soffer
Accept variable number of names instead of a sequence: with FilePaths("a", "b", "c") as (a, b, c): The disadvantage is that base_dir must be used as kwarg: with FilePaths("a", "b", base_dir=soc_dir) as (sock1, sock2): But this is more clear and calling optional argument as positional

[PATCH v3 4/5] qemu-iotests: Merge FilePaths and FilePath

2020-08-28 Thread Nir Soffer
FilePath creates now one temporary file: with FilePath("a") as a: Or more: with FilePath("a", "b", "c") as (a, b, c): This is also the behavior of the file_path() helper, used by some of the tests. Now we have only 2 helpers for creating temporary files instead of 3. Signed-off-by:

[PATCH v3 2/5] qemu-iotests: Fix FilePaths docstring

2020-08-28 Thread Nir Soffer
When this class was extracted from FilePath, the docstring was not updated for generating multiple files, and the example usage was referencing unrelated file. While fixing the docstring, add example for creating sockets, which should use iotests.sock_dir instead of the default base_dir. Fixes:

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

2020-08-28 Thread Nir Soffer
Fix some issues introduced when iotests.FilePaths was added and merge it back into FilePath keeping the option to create multiple file names. Changes since v2: - Improve dosting to show how sockets should be created [Max] v2 was here:

Re: Dropping posix_fallocate for -o preallocation falloc

2020-08-28 Thread Nir Soffer
On Tue, Aug 25, 2020 at 2:27 PM Kevin Wolf wrote: > > Am 23.08.2020 um 16:46 hat Nir Soffer geschrieben: > > Using -o preallocation falloc works great on NFS 4.2 and local file system, > > when fallocate() is supported, but when it is not, posix_fallocate falls > > back > > to very inefficient