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

2024-08-28 Thread Vladimir Sementsov-Ogievskiy
til/coroutine-ucontext.c:175 Cc: qemu-sta...@nongnu.org Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Fiona Ebner Hi! Has this been forgotten or is it not needed for 9.1? My apologies, this is forgotten. I think rc4 is too late, I'll send Pull request as soon as 9.2 window open.

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

2024-08-02 Thread Vladimir Sementsov-Ogievskiy
On 16.07.24 16:32, Denis V. Lunev wrote: On 7/12/24 13:55, Vladimir Sementsov-Ogievskiy wrote: 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

Re: [PATCH v2 1/3] nbd: CVE-XXX: Use cookie to track generation of nbd-server

2024-08-02 Thread Vladimir Sementsov-Ogievskiy
On 02.08.24 04:32, Eric Blake wrote: As part of the QMP command nbd-server-start, the blockdev code was creating a single global nbd_server object, and telling the qio code to accept one or more client connections to the exposed listener socket. But even though we tear down the listener socket d

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

2024-08-02 Thread Vladimir Sementsov-Ogievskiy
On 29.07.24 15:25, Kevin Wolf wrote: Am 19.07.2024 um 12:35 hat Vladimir Sementsov-Ogievskiy geschrieben: 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 r

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

2024-08-02 Thread Vladimir Sementsov-Ogievskiy
On 18.07.24 13:59, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add a new-style command job-change, doing same thing as block-job-change. The aim is finally deprecate block-job-* APIs and move to job-* APIs. We add a new command to qapi/block-core.json, not to qapi/job.json

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

2024-08-02 Thread Vladimir Sementsov-Ogievskiy
On 18.07.24 14:01, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: That's a first step to move on newer job-* APIs. The difference between block-job-change and job-change is in find_block_job_locked() vs find_job_locked() functions. What's different? 1. find_block_

Re: [PATCH v2 3/4] block: allow commit to unmap zero blocks

2024-08-02 Thread Vladimir Sementsov-Ogievskiy
On 14.07.24 00:56, 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 other arbitrary data. S

Re: [PATCH v2 2/4] block: refactor commit_run for multiple write types

2024-08-02 Thread Vladimir Sementsov-Ogievskiy
On 14.07.24 00:56, Vincent Vanlaer wrote: Signed-off-by: Vincent Vanlaer Reviewed-by: Vladimir Sementsov-Ogievskiy Honestly, I don't like this (mostly preexisting, but your patch make the problem more obvious) code for its "nested success path" if (ret >= 0) { ret =

Re: [PATCH v2 1/4] block: get type of block allocation in commit_run

2024-08-02 Thread Vladimir Sementsov-Ogievskiy
On 14.07.24 00:56, Vincent Vanlaer wrote: bdrv_co_common_block_status_above not only returns whether the block is allocated, but also if it contains zeroes. Signed-off-by: Vincent Vanlaer Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

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

2024-08-01 Thread Vladimir Sementsov-Ogievskiy
On 01.08.24 11:37, Michael S. Tsirkin wrote: On Thu, Aug 01, 2024 at 11:35:19AM +0300, Vladimir Sementsov-Ogievskiy wrote: On 01.07.24 23:55, Michael S. Tsirkin wrote: On Mon, Jul 01, 2024 at 08:42:39AM -0400, Raphael Norwitz wrote: I have no issues with these APIs, but I'm not a QMP e

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

2024-08-01 Thread Vladimir Sementsov-Ogievskiy
s get ack from qapi maintainers please? We go them. Could you queue the patches please? On Tue, Jun 25, 2024 at 8:19 AM Vladimir Sementsov-Ogievskiy wrote: v5: 03: drop extra check on is is runstate running Vladimir Sementsov-Ogievskiy (3): qdev-monitor: add option to report Generic

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 pr

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 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 by

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 passe

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
calling 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 ra

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-06-30 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-06-30 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-06-30 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-by

[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 that

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 Seme

[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/c

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

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
things 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/bl

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

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
up job too. 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 10

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

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
am job too. 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/bloc

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

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
it job too. 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

[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 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 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 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

[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 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 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/bloc

[PATCH v9 0/7] blockdev-replace

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
re: https://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_

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-Ogie

[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

[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
x27;s/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

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

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
ic API, 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

[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 +3

[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

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

2024-06-26 Thread Vladimir Sementsov-Ogievskiy
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

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
CC: Kevin Wolf CC: 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

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
pread 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-monito

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

2024-06-25 Thread Vladimir Sementsov-Ogievskiy
allow 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

[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
_cluster_size, INT64_MAX); 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) {

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

2024-06-25 Thread Vladimir Sementsov-Ogievskiy
calling 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

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 sen

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 n

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 n

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(

[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

[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 insert

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
s/qemu-iotests/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_c

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

2024-05-28 Thread Vladimir Sementsov-Ogievskiy
t "iotests: 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 de2e

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.

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: [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
t "iotests: 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/2024

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 by

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: [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] block/copy-before-write: use uint64_t for timeout in nanoseconds

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
ating 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

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/p

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
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.626493-6-vsement...@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievskiy --- .../qemu-iotests/tests/backup-d

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
gs. 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 +

[PULL 1/6] blockcommit: Reopen base image as RO after abort

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
ans RW mode If the base image is in RW mode at the end of blockcommit and was in RO mode before blockcommit, reopen the base BDS in RO. Signed-off-by: Alexander Ivanov Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20240404091136.129811-1-alexander.iva...@virtuozzo.com> Signed

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
ntsov-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-

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
it: Reopen base image as RO after abort Alexander Ivanov (1): blockcommit: Reopen base image as RO after abort Vladimir Sementsov-Ogievskiy (5): block/copy-before-write: fix permission block/copy-before-write: suppor

[PULL 3/6] block/copy-before-write: support unligned snapshot-discard

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
First thing that crashes on unligned access here is bdrv_reset_dirty_bitmap(). Correct way is to align-down the snapshot-discard request. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fiona Ebner Tested-by: Fiona Ebner Message-Id: <20240313152822.626493-3-vsement...@yandex-team

[PULL 2/6] block/copy-before-write: fix permission

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
2902.590099-1-vsement...@openvz.org/ [2] https://patchew.org/QEMU/2023101718.932733-1-vsement...@yandex-team.ru/ Signed-off-by: Vladimir Sementsov-Ogievskiy Tested-by: Fiona Ebner Message-Id: <20240313152822.626493-2-vsement...@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievski

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

2024-04-29 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

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
v4: Fixes 01-02 from v3 are already merged. 02: new, split out from 03 03: refacting vhost_user_blk_handle_config_change() split out to 02 drop current_run_state_str() helper some rewordings (Markus) Vladimir Sementsov-Ogievskiy (3): qdev-monitor: add option to report GenericError from

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
allow 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| 23 +++ system/qdev-monitor.c

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
pread 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-monito

Re: [PATCH v3 5/5] qapi: introduce CONFIG_READ event

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
On 24.04.24 15:11, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Send a new event when guest reads virtio-pci config after virtio_notify_config() call. That's useful to check that guest fetched modified config, for example after resizing disk backend. Signed-off-by: Vla

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
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 failed or not triggered interrupt to the guest or just not available (not supported by

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

2024-04-24 Thread Vladimir Sementsov-Ogievskiy
ping!) -- Best regards, Vladimir

Re: [PATCH v5 2/2] nbd/server: Mark negotiation functions as coroutine_fn

2024-04-10 Thread Vladimir Sementsov-Ogievskiy
On 09.04.24 18:49, Eric Blake wrote: On Tue, Apr 09, 2024 at 09:30:39AM +0300, Vladimir Sementsov-Ogievskiy wrote: On 08.04.24 19:00, Eric Blake wrote: nbd_negotiate() is already marked coroutine_fn. And given the fix in the previous patch to have nbd_negotiate_handle_starttls not create and

  1   2   3   4   5   6   7   8   9   10   >