Re: [PATCH v9 4/7] qapi: add blockdev-replace command

2024-07-19 Thread Vladimir Sementsov-Ogievskiy
On 18.07.24 15:00, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add a command that can replace bs in following BdrvChild structures: - qdev blk root child - block-export blk root child - any child of BlockDriverState selected by child-name Signed-off-by: Vladimir

Re: [PATCH v9 2/7] block/export: add blk_by_export_id()

2024-07-19 Thread Vladimir Sementsov-Ogievskiy
On 18.07.24 14:48, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: We need it for further blockdev-replace functionality. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/export/export.c | 18 ++ include/sysemu/block-backend-global

Re: [PATCH v2 1/3] block/commit: implement final flush

2024-07-19 Thread Vladimir Sementsov-Ogievskiy
On 18.07.24 22:22, Kevin Wolf wrote: Am 26.06.2024 um 16:50 hat Vladimir Sementsov-Ogievskiy geschrieben: Actually block job is not completed without the final flush. It's rather unexpected to have broken target when job was successfully completed long ago and now we fail to flush or process

Re: [PATCH v5 3/3] qapi: introduce device-sync-config

2024-07-19 Thread Vladimir Sementsov-Ogievskiy
On 18.07.24 11:27, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add command to sync config from vhost-user backend to the device. It may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not triggered interrupt to the guest or just not available (not supported

Re: [PATCH v5 0/3] vhost-user-blk: live resize additional APIs

2024-07-19 Thread Vladimir Sementsov-Ogievskiy
On 18.07.24 11:31, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: ping. Markus, Eric, could someone give an ACC for QAPI part? I apologize for the delay. It was pretty bad. No problem, I myself make worse delays now when busy with other work, thanks for reviewing

Re: [PATCH v2] block/reqlist: allow adding overlapping requests

2024-07-12 Thread Vladimir Sementsov-Ogievskiy
sta...@nongnu.org Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Fiona Ebner --- Changes in v2: * different approach, allowing overlapping requests for copy-before-write rather than waiting for them. block-copy already asserts there are no conflicts before adding a request. block/c

Re: [PATCH v3 0/2] backup: allow specifying minimum cluster size

2024-07-12 Thread Vladimir Sementsov-Ogievskiy
On 11.07.24 15:09, Fiona Ebner wrote: Discussion for v2: https://lore.kernel.org/qemu-devel/20240528120114.344416-1-f.eb...@proxmox.com/ Changes in v3: * Pass min_cluster_size option directly without checking has_min_cluster_size, because the default is 0 anyways. * Calculate maximum of

Re: [PATCH v3 2/2] backup: add minimum cluster size to performance options

2024-07-12 Thread Vladimir Sementsov-Ogievskiy
Sementsov-Ogievskiy Acked-by: Markus Armbruster (QAPI schema) Signed-off-by: Fiona Ebner Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v3 1/2] copy-before-write: allow specifying minimum cluster size

2024-07-12 Thread Vladimir Sementsov-Ogievskiy
it. The calculation in block_copy_calculate_cluster_size() is done in the target int64_t type. Suggested-by: Vladimir Sementsov-Ogievskiy Acked-by: Markus Armbruster (QAPI schema) Signed-off-by: Fiona Ebner Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH] block/copy-before-write: wait for conflicts when read locking to avoid assertion failure

2024-07-12 Thread Vladimir Sementsov-Ogievskiy
On 11.07.24 16:36, Fiona Ebner wrote: There is no protection against two callers of cbw_snapshot_read_lock() calling reqlist_init_req() with overlapping ranges, and reqlist_init_req() asserts that there are no conflicting requests. In particular, two cbw_co_snapshot_block_status() callers can

Re: [PATCH 1/2] block: zero data data corruption using prealloc-filter

2024-07-12 Thread Vladimir Sementsov-Ogievskiy
On 11.07.24 16:32, Andrey Drobyshev wrote: From: "Denis V. Lunev" We have observed that some clusters in the QCOW2 files are zeroed while preallocation filter is used. We are able to trace down the following sequence when prealloc-filter is used: co=0x55e7cbed7680 qcow2_co_pwritev_task()

Re: [PATCH v2 1/2] block: zero data data corruption using prealloc-filter

2024-07-12 Thread Vladimir Sementsov-Ogievskiy
On 12.07.24 12:46, Andrey Drobyshev wrote: From: "Denis V. Lunev" We have observed that some clusters in the QCOW2 files are zeroed while preallocation filter is used. We are able to trace down the following sequence when prealloc-filter is used: co=0x55e7cbed7680 qcow2_co_pwritev_task()

Re: [PATCH v5 0/3] vhost-user-blk: live resize additional APIs

2024-07-11 Thread Vladimir Sementsov-Ogievskiy
ping. Markus, Eric, could someone give an ACC for QAPI part? On 25.06.24 15:18, Vladimir Sementsov-Ogievskiy wrote: v5: 03: drop extra check on is is runstate running Vladimir Sementsov-Ogievskiy (3): qdev-monitor: add option to report GenericError from find_device_state vhost-user-blk

Re: [PATCH] block/curl: rewrite http header parsing function

2024-07-01 Thread Vladimir Sementsov-Ogievskiy
On 01.07.24 09:55, Michael Tokarev wrote: 01.07.2024 09:54, Vladimir Sementsov-Ogievskiy wrote: +    const char *t = "accept-ranges : bytes "; /* A lowercase template */ Note: you make parser less strict: you allow "bytes" to be uppercase (was allowed only for accept-ra

Re: [PATCH] block/curl: rewrite http header parsing function

2024-07-01 Thread Vladimir Sementsov-Ogievskiy
On 29.06.24 17:25, Michael Tokarev wrote: Existing code was long, unclear and twisty. Signed-off-by: Michael Tokarev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/curl.c | 44 ++-- 1 file changed, 18 insertions(+), 26 deletions(-) diff

Re: [PATCH] block/curl: use strlen instead of strchr

2024-07-01 Thread Vladimir Sementsov-Ogievskiy
On 01.07.24 09:34, Vladimir Sementsov-Ogievskiy wrote: On 29.06.24 09:20, Michael Tokarev wrote: On 6/28/24 08:49, Vladimir Sementsov-Ogievskiy wrote: We already know where colon is, so no reason to search for it. Also, avoid a code, which looks like we forget to check return value of strchr

Re: [PATCH] block/curl: use strlen instead of strchr

2024-07-01 Thread Vladimir Sementsov-Ogievskiy
On 29.06.24 09:20, Michael Tokarev wrote: On 6/28/24 08:49, Vladimir Sementsov-Ogievskiy wrote: We already know where colon is, so no reason to search for it. Also, avoid a code, which looks like we forget to check return value of strchr() to NULL. Suggested-by: Kevin Wolf Signed-off

[PATCH] block/curl: use strlen instead of strchr

2024-06-27 Thread Vladimir Sementsov-Ogievskiy
We already know where colon is, so no reason to search for it. Also, avoid a code, which looks like we forget to check return value of strchr() to NULL. Suggested-by: Kevin Wolf Signed-off-by: Vladimir Sementsov-Ogievskiy --- This replaces my patch [PATCH] block/curl: explicitly assert

Re: [PATCH] block/curl: explicitly assert that strchr returns non-NULL value

2024-06-27 Thread Vladimir Sementsov-Ogievskiy
On 27.06.24 21:05, Kevin Wolf wrote: Am 27.06.2024 um 17:30 hat Vladimir Sementsov-Ogievskiy geschrieben: strchr may return NULL if colon is not found. It seems clearer to assert explicitly that we don't expect it here, than dereference 1 in the next line. Signed-off-by: Vladimir Sementsov

[PATCH] hw/core/loader: gunzip(): fix memory leak on error path

2024-06-27 Thread Vladimir Sementsov-Ogievskiy
We should call inflateEnd() like on success path to cleanup state in s variable. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/core/loader.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/core/loader.c b/hw/core/loader.c index 2f8105d7de..a3bea1e718 100644 --- a/hw/core/loader.c

[PATCH] block/curl: explicitly assert that strchr returns non-NULL value

2024-06-27 Thread Vladimir Sementsov-Ogievskiy
strchr may return NULL if colon is not found. It seems clearer to assert explicitly that we don't expect it here, than dereference 1 in the next line. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/curl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/curl.c

[PATCH v2 3/3] block/backup: implement final flush

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 2 +- block/block-copy.c | 7 +++ include/block/block-copy.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/block/backup.c b/block/backup.c index 3dd2e229d2..fee78ba5ad 100644

[PATCH v2 0/3] block-jobs: add final flush

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
for other jobs: backup, stream, commit. v2: rework stream and commit, also split into 3 commits. Vladimir Sementsov-Ogievskiy (3): block/commit: implement final flush block/stream: implement final flush block/backup: implement final flush block/backup.c | 2 +- block/block-copy.c

[PATCH v2 2/3] block/stream: implement final flush

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/stream.c | 67 ++ 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/block/stream.c b/block/stream.c index 7031eef12b..893db258d4 100644 --- a/block/stream.c +++ b/block/stream.c

[PATCH v2 1/3] block/commit: implement final flush

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/commit.c | 41 +++-- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/block/commit.c b/block/commit.c index 7c3fdcb0ca..81971692a2 100644 --- a/block/commit.c +++ b/block/commit.c @@ -134,6

[PATCH 2/3] vl.c: select_machine(): use g_autoptr

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- system/vl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/system/vl.c b/system/vl.c index fa81037ce2..947b433905 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1667,7 +1667,7 @@ static MachineClass *select_machine(QDict

[PATCH 3/3] vl.c: select_machine(): add selected machine type to error message

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- system/vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/vl.c b/system/vl.c index 947b433905..a6a4b470a7 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1674,7 +1674,7 @@ static MachineClass *select_machine(QDict *qdict

[PATCH 0/3] vl.c: select_machine(): improve error message

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here are three simple patches, improving select_machine() function a bit. Vladimir Sementsov-Ogievskiy (3): vl.c: select_machine(): use ERRP_GUARD instead of error propagation vl.c: select_machine(): use g_autoptr vl.c: select_machine(): add selected machine type to error message

[PATCH 1/3] vl.c: select_machine(): use ERRP_GUARD instead of error propagation

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- system/vl.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/system/vl.c b/system/vl.c index cfcb674425..fa81037ce2 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1665,28 +1665,28 @@ static const QEMUOption

[PATCH v9 1/7] block-backend: blk_root(): drop const specifier on return type

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
We'll need get non-const child pointer for graph modifications in further commits. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-backend.c | 2 +- include/sysemu/block-backend-global-state.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v9 2/7] block/export: add blk_by_export_id()

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
We need it for further blockdev-replace functionality. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/export/export.c | 18 ++ include/sysemu/block-backend-global-state.h | 1 + 2 files changed, 19 insertions(+) diff --git a/block/export/export.c b

[PATCH v9 0/7] blockdev-replace

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
//www.mail-archive.com/qemu-devel@nongnu.org/msg994945.html Vladimir Sementsov-Ogievskiy (7): block-backend: blk_root(): drop const specifier on return type block/export: add blk_by_export_id() block: make bdrv_find_child() function public qapi: add blockdev-replace command block: bdrv_get_xdbg_b

[PATCH v9 7/7] iotests: add filter-insertion

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
Demonstrate new blockdev-replace API for filter insertion and removal. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/filter-insertion | 236 ++ tests/qemu-iotests/tests/filter-insertion.out | 5 + 2 files changed, 241 insertions(+) create mode

[PATCH v9 4/7] qapi: add blockdev-replace command

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
Add a command that can replace bs in following BdrvChild structures: - qdev blk root child - block-export blk root child - any child of BlockDriverState selected by child-name Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 56 +++ qapi/block

[PATCH v9 6/7] iotests.py: introduce VM.assert_edges_list() method

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
Add an alternative method to check block graph, to be used in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index

[PATCH v9 3/7] block: make bdrv_find_child() function public

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
To be reused soon for blockdev-replace functionality. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 13 + blockdev.c | 14 -- include/block/block_int-io.h | 2 ++ 3 files changed, 15 insertions(+), 14 deletions(-) diff

[PATCH v9 5/7] block: bdrv_get_xdbg_block_graph(): report export ids

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
Currently for block exports we report empty blk names. That's not good. Let's try to find corresponding block export and report its id. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 4 block/export/export.c | 13 + include/block/export.h

Re: [PATCH v4] virtio: add VIRTQUEUE_ERROR QAPI event

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
ping4 On 17.10.23 15:39, Vladimir Sementsov-Ogievskiy wrote: For now we only log the vhost device error, when virtqueue is actually stopped. Let's add a QAPI event, which makes possible: - collect statistics of such errors - make immediate actions: take core dumps or do some other

Re: [PATCH v2] block-backend: per-device throttling of BLOCK_IO_ERROR reports

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
ping2 On 09.01.24 16:13, Vladimir Sementsov-Ogievskiy wrote: From: Leonid Kaplan BLOCK_IO_ERROR events comes from guest, so we must throttle them. We still want per-device throttling, so let's use device id as a key. Signed-off-by: Leonid Kaplan Signed-off-by: Vladimir Sementsov-Ogievskiy

[PATCH v2 3/7] qapi: block-job-change: make copy-mode parameter optional

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
We are going to add more parameters to change. We want to make possible to change only one or any subset of available options. So all the options should be optional. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 4 qapi/block-core.json | 3 ++- 2 files changed, 6

[PATCH v2 1/7] qapi: rename BlockJobChangeOptions to JobChangeOptions

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
/BlockJobChangeOptions/JobChangeOptions/g' Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 4 ++-- blockdev.c | 2 +- blockjob.c | 2 +- include/block/blockjob.h | 2 +- include/block/blockjob_int.h | 2 +- qapi/block-core.json

[PATCH v2 7/7] iotests/mirror-change-copy-mode: switch to job-change command

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
block-job-change is deprecated, let's move test to job-change. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/mirror-change-copy-mode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/tests/mirror-change-copy-mode b/tests/qemu

[PATCH v2 0/7] introduce job-change qmp command

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
bt that this was good idea, as it makes QAPI protocol dependent on context) 03: improve documentation 06: deprecated only block-job-change for now 07: new Vladimir Sementsov-Ogievskiy (7): qapi: rename BlockJobChangeOptions to JobChangeOptions blockjob: block_job_change_locked(): check job type qa

[PATCH v2 2/7] blockjob: block_job_change_locked(): check job type

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
User may specify wrong type for the job id. Let's check it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockjob.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/blockjob.c b/blockjob.c index 8cfbb15543..788cb1e07d 100644 --- a/blockjob.c +++ b/blockjob.c @@ -319,6 +319,12

[PATCH v2 6/7] qapi/block-core: derpecate block-job-change

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
, no needs to document this change. 2. find_block_job_locked() reports DeviceNotActive on failure, when find_job_locked() reports GenericError. Still, for block-job-change errors are not documented at all, so be silent in deprecated.txt as well. Signed-off-by: Vladimir Sementsov-Ogievskiy

[PATCH v2 4/7] blockjob: move change action implementation to job from block-job

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
Like for other block-job-* APIs we want have the actual functionality in job layer and make block-job-change to be a deprecated duplication of job-change in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 7 +++ blockdev.c

[PATCH v2 5/7] qapi: add job-change

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
to refactor when we finally drop deprecated block-job-* APIs. @type argument of the new command immediately becomes deprecated. Signed-off-by: Vladimir Sementsov-Ogievskiy --- job-qmp.c| 14 ++ qapi/block-core.json | 10 ++ 2 files changed, 24 insertions(+) diff

Re: [PATCH 1/2] block: allow commit to unmap zero blocks

2024-06-25 Thread Vladimir Sementsov-Ogievskiy
On 26.05.24 22:29, Vincent Vanlaer wrote: Non-active block commits do not discard blocks only containing zeros, causing images to lose sparseness after the commit. This commit fixes that by writing zero blocks using blk_co_pwrite_zeroes rather than writing them out as any oother arbitrary data.

Re: [PATCH 1/1] prealloc: add truncate mode for prealloc filter

2024-06-25 Thread Vladimir Sementsov-Ogievskiy
: Hanna Reitz CC: Vladimir Sementsov-Ogievskiy --- block/preallocate.c | 50 +++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/block/preallocate.c b/block/preallocate.c index 4d82125036..6d31627325 100644 --- a/block/preallocate.c +++ b

Re: [PATCH] tests/avocado: add hotplug_blk test

2024-06-25 Thread Vladimir Sementsov-Ogievskiy
ping2 On 09.04.24 09:58, Vladimir Sementsov-Ogievskiy wrote: Introduce a test, that checks that plug/unplug of virtio-blk device works. (the test is developed by copying hotplug_cpu.py, so keep original copyright) Signed-off-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[PATCH v5 1/3] qdev-monitor: add option to report GenericError from find_device_state

2024-06-25 Thread Vladimir Sementsov-Ogievskiy
of DeviceNotFound anyway - also, nothing prevent simply copy-pasting find_device_state() calls with false argument Signed-off-by: Vladimir Sementsov-Ogievskiy --- system/qdev-monitor.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/system/qdev-monitor.c b

[PATCH v5 3/3] qapi: introduce device-sync-config

2024-06-25 Thread Vladimir Sementsov-Ogievskiy
the sync only in RUNNING state. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/block/vhost-user-blk.c | 1 + hw/virtio/virtio-pci.c| 9 + include/hw/qdev-core.h| 3 +++ qapi/qdev.json| 24 system/qdev-monitor.c | 38

[PATCH v5 0/3] vhost-user-blk: live resize additional APIs

2024-06-25 Thread Vladimir Sementsov-Ogievskiy
v5: 03: drop extra check on is is runstate running Vladimir Sementsov-Ogievskiy (3): qdev-monitor: add option to report GenericError from find_device_state vhost-user-blk: split vhost_user_blk_sync_config() qapi: introduce device-sync-config hw/block/vhost-user-blk.c | 27

[PATCH v5 2/3] vhost-user-blk: split vhost_user_blk_sync_config()

2024-06-25 Thread Vladimir Sementsov-Ogievskiy
Split vhost_user_blk_sync_config() out from vhost_user_blk_handle_config_change(), to be reused in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/block/vhost-user-blk.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/hw

Re: [PATCH v2 1/2] copy-before-write: allow specifying minimum cluster size

2024-06-25 Thread Vladimir Sementsov-Ogievskiy
On 28.05.24 15:01, Fiona Ebner wrote: +if (min_cluster_size > INT64_MAX) { +error_setg(errp, "min-cluster-size too large: %lu > %ld", + min_cluster_size, INT64_MAX); Better use PRIu64 and PRIi64 macros -- Best regards, Vladimir

Re: [PATCH v2 2/2] backup: add minimum cluster size to performance options

2024-06-25 Thread Vladimir Sementsov-Ogievskiy
); opts leaked here. with that fixed: Reviewed-by: Vladimir Sementsov-Ogievskiy +return NULL; +} +qdict_put_int(opts, "min-cluster-size", (int64_t)min_cluster_size); + top = bdrv_insert_node(source, opts, flags, errp); if (!top) { return NULL; di

Re: [PATCH v2 1/2] copy-before-write: allow specifying minimum cluster size

2024-06-25 Thread Vladimir Sementsov-Ogievskiy
it. The calculation in block_copy_calculate_cluster_size() is done in the target int64_t type. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Fiona Ebner --- Changes in v2: * Use 'size' type in QAPI. * Remove option in cbw_parse_options(), i.e. before parsing generic blockdev options

Re: [PATCH v4 5/5] blockdev: mirror: check for target's cluster size when using bitmap

2024-06-24 Thread Vladimir Sementsov-Ogievskiy
On 21.05.24 15:20, Fiona Ebner wrote: When using mirror with a bitmap and the target does not do COW and is is a diff image, i.e. one that should only contain the delta and was not synced to previously, a too large cluster size for the target can be problematic. In particular, when the mirror

Re: [PATCH v4 4/5] iotests: add test for bitmap mirror

2024-06-24 Thread Vladimir Sementsov-Ogievskiy
On 21.05.24 15:20, Fiona Ebner wrote: From: Fabian Grünbichler heavily based on/practically forked off iotest 257 for bitmap backups, but: really, heavily. Making a duplication is always bad idea. Could we instead just add test-cases to 257? - no writes to filter node 'mirror-top' between

Re: [PATCH v4 3/5] mirror: allow specifying working bitmap

2024-06-24 Thread Vladimir Sementsov-Ogievskiy
On 21.05.24 15:20, Fiona Ebner wrote: From: John Snow for the mirror job. The bitmap's granularity is used as the job's granularity. The new @bitmap parameter is marked unstable in the QAPI and can currently only be used for @sync=full mode. Clusters initially dirty in the bitmap as well as

Re: [PATCH v4 3/5] mirror: allow specifying working bitmap

2024-06-24 Thread Vladimir Sementsov-Ogievskiy
On 21.05.24 15:20, Fiona Ebner wrote: From: John Snow for the mirror job. The bitmap's granularity is used as the job's granularity. The new @bitmap parameter is marked unstable in the QAPI and can currently only be used for @sync=full mode. Clusters initially dirty in the bitmap as well as

Re: [PATCH v4 2/5] block/mirror: replace is_none_mode with sync_mode in MirrorBlockJob struct

2024-06-24 Thread Vladimir Sementsov-Ogievskiy
commands will be made to fail earlier with a clean error. Signed-off-by: Fiona Ebner Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[PATCH 1/2] iotests/backup-discard-source: convert size variable to be int

2024-06-20 Thread Vladimir Sementsov-Ogievskiy
Make variable reusable in code for checks. Don't care to change "512 * 1024" invocations as they will be dropped in the next commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/backup-discard-source | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH 0/2] fix backup-discard-source test for XFS

2024-06-20 Thread Vladimir Sementsov-Ogievskiy
Hi all! As Kevin reported, the test doesn't work on XFS, as it rely on disk usage. Fix it, switching to dirty bitmap for guest write tracking. Vladimir Sementsov-Ogievskiy (2): iotests/backup-discard-source: convert size variable to be int iotests/backup-discard-source: don't use actual

[PATCH 2/2] iotests/backup-discard-source: don't use actual-size

2024-06-20 Thread Vladimir Sementsov-Ogievskiy
Relying on disk usage is bad thing, and test just doesn't work on XFS. Let's instead add a dirty bitmap to track writes to test image. Signed-off-by: Vladimir Sementsov-Ogievskiy --- .../qemu-iotests/tests/backup-discard-source | 29 +-- 1 file changed, 20 insertions(+), 9

Re: [PATCH v4 5/5] iotests: add backup-discard-source

2024-06-20 Thread Vladimir Sementsov-Ogievskiy
On 13.06.24 11:02, Kevin Wolf wrote: Am 12.06.2024 um 21:21 hat Vladimir Sementsov-Ogievskiy geschrieben: On 11.06.24 20:49, Kevin Wolf wrote: Am 13.03.2024 um 16:28 hat Vladimir Sementsov-Ogievskiy geschrieben: Add test for a new backup option: discard-source. Signed-off-by: Vladimir

Re: [PATCH v4 5/5] iotests: add backup-discard-source

2024-06-12 Thread Vladimir Sementsov-Ogievskiy
On 11.06.24 20:49, Kevin Wolf wrote: Am 13.03.2024 um 16:28 hat Vladimir Sementsov-Ogievskiy geschrieben: Add test for a new backup option: discard-source. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fiona Ebner Tested-by: Fiona Ebner This test fails for me, and it already

[PULL v2 0/7] Block jobs patches for 2024-04-29

2024-05-28 Thread Vladimir Sementsov-Ogievskiy
ests/tests/backup-discard-source.out Alexander Ivanov (1): blockcommit: Reopen base image as RO after abort Vladimir Sementsov-Ogievskiy (6): block/copy-before-write: fix permission block/copy-before-write: support unligned snapshot-discard block/copy-before-write: create block_copy bitmap

[PULL v2 7/7] iotests/pylintrc: allow up to 10 similar lines

2024-05-28 Thread Vladimir Sementsov-Ogievskiy
: add backup-discard-source" Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/pylintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/pylintrc b/tests/qemu-iotests/pylintrc index de2e0c2781..05b75ee

Re: [PATCH] iotests/pylintrc: allow up to 10 similar lines

2024-05-28 Thread Vladimir Sementsov-Ogievskiy
On 30.04.24 12:13, Vladimir Sementsov-Ogievskiy wrote: We want to have similar QMP objects in different tests. Reworking these objects to make common parts by calling some helper functions doesn't seem good. It's a lot more comfortable to see the whole QAPI request in one place. So, let's

Re: [PATCH v4 3/3] qapi: introduce device-sync-config

2024-05-01 Thread Vladimir Sementsov-Ogievskiy
On 30.04.24 11:31, Vladimir Sementsov-Ogievskiy wrote: On 30.04.24 11:19, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add command to sync config from vhost-user backend to the device. It may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not triggered

Re: [PATCH v6 4/5] migration: process_incoming_migration_co(): rework error reporting

2024-05-01 Thread Vladimir Sementsov-Ogievskiy
On 30.04.24 12:16, Philippe Mathieu-Daudé wrote: On 30/4/24 10:56, Vladimir Sementsov-Ogievskiy wrote: Unify error reporting in the function. This simplifies the following commit, which will not-exit-on-error behavior variant to the function. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [PULL 6/6] iotests: add backup-discard-source

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
On 30.04.24 12:13, Kevin Wolf wrote: Am 29.04.2024 um 20:39 hat Vladimir Sementsov-Ogievskiy geschrieben: [Add John] On 29.04.24 17:18, Richard Henderson wrote: On 4/29/24 04:51, Vladimir Sementsov-Ogievskiy wrote: Add test for a new backup option: discard-source. Signed-off-by: Vladimir

[PATCH] iotests/pylintrc: allow up to 10 similar lines

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
: add backup-discard-source" Signed-off-by: Vladimir Sementsov-Ogievskiy --- Hi all! That's a patch to unblock my PR "[PULL 0/6] Block jobs patches for 2024-04-29" <20240429115157.2260885-1-vsement...@yandex-team.ru> https://patchew.org/QEMU/20240429115157.2260885-1

[PATCH v6 4/5] migration: process_incoming_migration_co(): rework error reporting

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
Unify error reporting in the function. This simplifies the following commit, which will not-exit-on-error behavior variant to the function. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff

[PATCH v6 1/5] migration: move trace-point from migrate_fd_error to migrate_set_error

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
Cover more cases by trace-point. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu --- migration/migration.c | 4 +++- migration/trace-events | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration

[PATCH v6 5/5] qapi: introduce exit-on-error parameter for migrate-incoming

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
the behavior of x-exit-preconfig, it should be another patch. Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Markus Armbruster --- migration/migration-hmp-cmds.c | 2 +- migration/migration.c | 33 +++-- migration/migration.h | 3 +++ qapi

[PATCH v6 2/5] migration: process_incoming_migration_co(): complete cleanup on failure

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
Make call to migration_incoming_state_destroy(), instead of doing only partial of it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu --- migration/migration.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/migration

[PATCH v6 0/5] migration: do not exit on incoming failure

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
Hi all! The series brings an option to not immediately exit on incoming migration failure, giving a possibility to orchestrator to get the error through QAPI and shutdown QEMU by "quit". v6: 01,02: add r-b by Peter 03: only fix potential use-after-free 04: rework error handling, drop r-b v5: -

[PATCH v6 3/5] migration: process_incoming_migration_co(): fix reporting s->error

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
It's bad idea to leave critical section with error object freed, but s->error still set, this theoretically may lead to use-after-free crash. Let's avoid it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migrat

Re: [PATCH v5 3/5] migration: process_incoming_migration_co(): fix reporting s->error

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
On 30.04.24 11:09, Vladimir Sementsov-Ogievskiy wrote: On 30.04.24 11:06, Vladimir Sementsov-Ogievskiy wrote: On 29.04.24 22:32, Peter Xu wrote: On Mon, Apr 29, 2024 at 10:14:24PM +0300, Vladimir Sementsov-Ogievskiy wrote: It's bad idea to leave critical section with error object freed, but s

Re: [PATCH v4 3/3] qapi: introduce device-sync-config

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
On 30.04.24 11:19, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add command to sync config from vhost-user backend to the device. It may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not triggered interrupt to the guest or just not available (not supported

Re: [PATCH v4 2/3] vhost-user-blk: split vhost_user_blk_sync_config()

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
On 30.04.24 11:15, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Split vhost_user_blk_sync_config() out from vhost_user_blk_handle_config_change(), to be reused in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/block/vhost-user-blk.c | 26

Re: [PATCH v5 3/5] migration: process_incoming_migration_co(): fix reporting s->error

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
On 30.04.24 11:06, Vladimir Sementsov-Ogievskiy wrote: On 29.04.24 22:32, Peter Xu wrote: On Mon, Apr 29, 2024 at 10:14:24PM +0300, Vladimir Sementsov-Ogievskiy wrote: It's bad idea to leave critical section with error object freed, but s->error still set, this theoretically may lead to

Re: [PATCH v5 3/5] migration: process_incoming_migration_co(): fix reporting s->error

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
On 29.04.24 22:32, Peter Xu wrote: On Mon, Apr 29, 2024 at 10:14:24PM +0300, Vladimir Sementsov-Ogievskiy wrote: It's bad idea to leave critical section with error object freed, but s->error still set, this theoretically may lead to use-after-free crash. Let's avoid it. Signed-off-by: Vladi

Re: [PATCH v5 4/5] migration: process_incoming_migration_co(): rework error reporting

2024-04-30 Thread Vladimir Sementsov-Ogievskiy
On 29.04.24 22:39, Peter Xu wrote: On Mon, Apr 29, 2024 at 10:14:25PM +0300, Vladimir Sementsov-Ogievskiy wrote: Unify error reporting in the function. This simplifies the following commit, which will not-exit-on-error behavior variant to the function. Signed-off-by: Vladimir Sementsov

[PATCH v5 1/5] migration: move trace-point from migrate_fd_error to migrate_set_error

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
Cover more cases by trace-point. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fabiano Rosas --- migration/migration.c | 4 +++- migration/trace-events | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index

[PATCH v5 0/5] migration: do not exit on incoming failure

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
Hi all! The series brings an option to not immediately exit on incoming migration failure, giving a possibility to orchestrator to get the error through QAPI and shutdown QEMU by "quit". v5: - add "migration: process_incoming_migration_co(): fix reporting s->error" v4: - add r-b and a-b by

[PATCH v5 4/5] migration: process_incoming_migration_co(): rework error reporting

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
Unify error reporting in the function. This simplifies the following commit, which will not-exit-on-error behavior variant to the function. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fabiano Rosas --- migration/migration.c | 17 ++--- 1 file changed, 10 insertions

[PATCH v5 3/5] migration: process_incoming_migration_co(): fix reporting s->error

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
It's bad idea to leave critical section with error object freed, but s->error still set, this theoretically may lead to use-after-free crash. Let's avoid it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 24 1 file changed, 12 insertions(+),

[PATCH v5 2/5] migration: process_incoming_migration_co(): complete cleanup on failure

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
Make call to migration_incoming_state_destroy(), instead of doing only partial of it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fabiano Rosas --- migration/migration.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/migration/migration.c b/migration

[PATCH v5 5/5] qapi: introduce exit-on-error parameter for migrate-incoming

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
the behavior of x-exit-preconfig, it should be another patch. Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Markus Armbruster --- migration/migration-hmp-cmds.c | 2 +- migration/migration.c | 38 +++--- migration/migration.h | 3 +++ qapi

Re: [PULL 6/6] iotests: add backup-discard-source

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
[Add John] On 29.04.24 17:18, Richard Henderson wrote: On 4/29/24 04:51, Vladimir Sementsov-Ogievskiy wrote: Add test for a new backup option: discard-source. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fiona Ebner Tested-by: Fiona Ebner Message-Id: <20240313152822.62649

Re: [PATCH v3 4/4] qapi: introduce exit-on-error parameter for migrate-incoming

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
On 29.04.24 16:06, Fabiano Rosas wrote: Vladimir Sementsov-Ogievskiy writes: On 25.04.24 23:30, Fabiano Rosas wrote: @@ -797,13 +801,18 @@ fail: MIGRATION_STATUS_FAILED); migration_incoming_state_destroy(); -if (migrate_has_error(s

Re: [PATCH] block/copy-before-write: use uint64_t for timeout in nanoseconds

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
the subject helps to understand:   Use uint64_t for timeout in nanoseconds ... Oh, sorry. I'll try to remember that for the future. Should I re-send as a v2? Not necessary, I can touch up the message when applying to my block branch. Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best

Re: [PATCH v3 4/5] qapi: introduce device-sync-config

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
On 29.04.24 16:04, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: On 29.04.24 13:51, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: On 24.04.24 14:48, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add command to sync config from vhost-user

Re: [PATCH v3 4/5] qapi: introduce device-sync-config

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
On 29.04.24 13:51, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: On 24.04.24 14:48, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add command to sync config from vhost-user backend to the device. It may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG

Re: [PULL 0/6] Block jobs patches for 2024-04-29

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
Sorry for too much CC-ing, I've mistakenly added --cc-cmd=./scripts/get_maintainer.pl On 29.04.24 14:51, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit fd87be1dada5672f877e03c2ca8504458292c479: Merge tag 'accel-20240426' of https://github.com/philmd/qemu

[PULL 4/6] block/copy-before-write: create block_copy bitmap in filter node

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
-Ogievskiy Reviewed-by: Fiona Ebner Tested-by: Fiona Ebner Message-Id: <20240313152822.626493-4-vsement...@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-copy.c | 3 +- block/copy-before-write.c | 2 +- include/block/block-copy.h | 1 + tests/qemu-iotes

[PULL 5/6] qapi: blockdev-backup: add discard-source parameter

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fiona Ebner Tested-by: Fiona Ebner Acked-by: Markus Armbruster Message-Id: <20240313152822.626493-5-vsement...@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 5 +++--

  1   2   3   4   5   6   7   8   9   10   >