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

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: [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
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 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
. 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
-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 0/6] Block jobs patches for 2024-04-29

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
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: support unligned

[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
t...@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-Ogievskiy --- block/copy-b

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

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

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

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: Vladimir

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

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

[PATCH] tests/avocado: add hotplug_blk test

2024-04-09 Thread Vladimir Sementsov-Ogievskiy
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 --- tests/avocado/hotplug_blk.py | 69 1 file changed, 69

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

2024-04-09 Thread Vladimir Sementsov-Ogievskiy
static functions reachable only during option negotiation as also being coroutine_fn. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Eric Blake --- nbd/server.c | 102 +-- 1 file changed, 59 insertions(+), 43 deletions(-) diff --git a/nbd

Re: [PATCH v5 1/2] nbd/server: do not poll within a coroutine context

2024-04-09 Thread Vladimir Sementsov-Ogievskiy
Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v4] nbd/server: do not poll within a coroutine context

2024-04-08 Thread Vladimir Sementsov-Ogievskiy
ation") Signed-off-by: Zhu Yangyang [eblake: move callbacks to their use point] Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy still, some notes below --- v3: https://lists.gnu.org/archive/html/qemu-devel/2024-04/msg00375.html in v4, factor even the struct to th

Re: [PATCH v3] nbd/server: do not poll within a coroutine context

2024-04-05 Thread Vladimir Sementsov-Ogievskiy
On 04.04.24 04:42, Eric Blake wrote: From: Zhu Yangyang Coroutines are not supposed to block. Instead, they should yield. The client performs TLS upgrade outside of an AIOContext, during synchronous handshake; this still requires g_main_loop. But the server responds to TLS upgrade inside a

Re: [PATCH v4 0/5] backup: discard-source parameter

2024-04-05 Thread Vladimir Sementsov-Ogievskiy
On 13.03.24 18:28, Vladimir Sementsov-Ogievskiy wrote: Hi all! The main patch is 04, please look at it for description and diagram. v4: add t-b by Fiona add r-b by Fiona to 02-05 (patch 01 still lack an r-b) 05: fix copyrights and subject in the test 04: since 9.0 --> since

Re: [PATCH v5] blockcommit: Reopen base image as RO after abort

2024-04-05 Thread Vladimir Sementsov-Ogievskiy
02140002 < The last 2 means 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 Thanks, applied to my block branch. -- Best regards, Vladimir

Re: [PATCH 06/19] block/stream: fix -Werror=maybe-uninitialized false-positives

2024-04-03 Thread Vladimir Sementsov-Ogievskiy
On 03.04.24 20:50, Eric Blake wrote: On Wed, Apr 03, 2024 at 01:24:11PM +0400, Marc-André Lureau wrote: Unfortunately, it doesn't work in all cases. It seems to have issues with some guards: ../block/stream.c: In function ‘stream_run’: ../block/stream.c:216:12: error: ‘ret’ may be used

Re: [PATCH 06/19] block/stream: fix -Werror=maybe-uninitialized false-positives

2024-04-03 Thread Vladimir Sementsov-Ogievskiy
On 03.04.24 11:11, Marc-André Lureau wrote: Hi On Tue, Apr 2, 2024 at 11:24 PM Vladimir Sementsov-Ogievskiy wrote: On 02.04.24 18:34, Eric Blake wrote: On Tue, Apr 02, 2024 at 12:58:43PM +0300, Vladimir Sementsov-Ogievskiy wrote: Again, same false-positives, because

Re: [PATCH v2 2/4] mirror: allow specifying working bitmap

2024-04-02 Thread Vladimir Sementsov-Ogievskiy
On 07.03.24 16:47, 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 06/19] block/stream: fix -Werror=maybe-uninitialized false-positives

2024-04-02 Thread Vladimir Sementsov-Ogievskiy
On 02.04.24 18:34, Eric Blake wrote: On Tue, Apr 02, 2024 at 12:58:43PM +0300, Vladimir Sementsov-Ogievskiy wrote: Again, same false-positives, because of WITH_GRAPH_RDLOCK_GUARD().. Didn't you try to change WITH_ macros somehow, so that compiler believe in our good intentions? #define

Re: [PATCH 06/19] block/stream: fix -Werror=maybe-uninitialized false-positives

2024-04-02 Thread Vladimir Sementsov-Ogievskiy
On 02.04.24 12:12, Marc-André Lureau wrote: Hi On Fri, Mar 29, 2024 at 12:35 PM Vladimir Sementsov-Ogievskiy wrote: On 28.03.24 13:20, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau ../block/stream.c:193:19: error: ‘unfiltered_bs’ may be used uninitialized [-Werror=maybe

Re: [PATCH v2 1/4] qapi/block-core: avoid the re-use of MirrorSyncMode for backup

2024-04-01 Thread Vladimir Sementsov-Ogievskiy
in mirror_start(). Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Fiona Ebner Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH for-9.1] migration: Add Error** argument to add_bitmaps_to_list()

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
On 29.03.24 13:56, Cédric Le Goater wrote: This allows to report more precise errors in the migration handler dirty_bitmap_save_setup(). Suggested-by Vladimir Sementsov-Ogievskiy Signed-off-by: Cédric Le Goater Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[PATCH v3 2/5] qdev-monitor: fix error message in find_device_state()

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
This "hotpluggable" here is misleading. Actually we check is object a device or not. Let's drop the word. Suggested-by: Markus Armbruster Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Markus Armbruster --- system/qdev-monitor.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH v3 0/5] vhost-user-blk: live resize additional APIs

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
v3: 02: add r-b by Markus 03: improve commit message 04: improve documentation, merge race-fix here (which was v2:05), rebase on master (migration_is_running() now without arguments) 05: improve documentation Vladimir Sementsov-Ogievskiy (5): vhost-user-blk: simplify and fix

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

2024-03-29 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 v3 5/5] qapi: introduce CONFIG_READ event

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
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: Vladimir Sementsov-Ogievskiy --- hw/virtio/virtio-pci.c | 9 + include/monitor

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

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
the sync only in RUNNING state. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/block/vhost-user-blk.c | 27 -- hw/virtio/virtio-pci.c| 9 include/hw/qdev-core.h| 3 +++ include/sysemu/runstate.h | 1 + qapi/qdev.json| 21

[PATCH v3 1/5] vhost-user-blk: simplify and fix vhost_user_blk_handle_config_change

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
reason to create extra branches in the logic. Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 6a856a

Re: [PATCH for-9.1 v5 07/14] migration: Add Error** argument to .save_setup() handler

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
On 29.03.24 13:53, Cédric Le Goater wrote: Hello Vladimir, On 3/29/24 10:32, Vladimir Sementsov-Ogievskiy wrote: On 20.03.24 09:49, Cédric Le Goater wrote: diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c index 2708abf3d762de774ed294d3fdb8e56690d2974c

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

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
to the backup source will too. If the granularity is too small, they will just be aligned down in cbw_co_pdiscard_snapshot() and thus effectively ignored. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Fiona Ebner --- block/backup.c| 2 +- block/copy-before-write.c | 2

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

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
node will too. If the granularity is too small, they will just be aligned down in cbw_co_pdiscard_snapshot() and thus effectively ignored. The QAPI uses uint32 so the value will be non-negative, but still fit into a uint64_t. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Fiona Ebner

Re: [PATCH for-9.1 v5 07/14] migration: Add Error** argument to .save_setup() handler

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
quot;Failed to initialize migration of block dirty bitmaps". with this, for block dirty bitmap migration: Acked-by: Vladimir Sementsov-Ogievskiy Still, a lot better is add errp to init_dirty_bitmap_migration() and to add_bitmaps_to_list() too: look, init_dirty_bitmap_migration() fails only

Re: [PATCH v4] blockcommit: Reopen base image as RO after abort

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
} + All looks good to me except this: seems it is safer to place this "if" block before "bdrv_drained_end(); bdrv_unref();" above. With it moved: Reviewed-by: Vladimir Sementsov-Ogievskiy bs_opaque->job = NULL; bdrv_drained_end(src); @@

Re: [PATCH 06/19] block/stream: fix -Werror=maybe-uninitialized false-positives

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
, "unused variable initialization" is bad thing too. Anyway, if no better solution for now: Acked-by: Vladimir Sementsov-Ogievskiy --- block/stream.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/stream.c b/block/stream.c index 7031eef12b..9076203

Re: [PATCH 05/19] block/mirror: fix -Werror=maybe-uninitialized false-positive

2024-03-29 Thread Vladimir Sementsov-Ogievskiy
unconditionally. Probably we should mention this in a comment. Signed-off-by: Marc-André Lureau Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index 1bdce3b657..53dd7332ee

Re: [RFC 04/15] qapi: block-job-change: make copy-mode parameter optional

2024-03-28 Thread Vladimir Sementsov-Ogievskiy
On 28.03.24 12:24, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 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

Re: [RFC 01/15] scripts/qapi: support type-based unions

2024-03-28 Thread Vladimir Sementsov-Ogievskiy
On 28.03.24 12:15, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Look at block-job-change command: we have to specify both 'id' to chose the job to operate on and 'type' for QAPI union be parsed. But for user this looks redundant: when we specify 'id', QEMU should be able

Re: [RFC 01/15] scripts/qapi: support type-based unions

2024-03-28 Thread Vladimir Sementsov-Ogievskiy
On 28.03.24 12:40, Markus Armbruster wrote: Subject: all unions are type-based. Perhaps "support implicit union tags on the wire"? Yes, sounds good. Do you need this schema language feature for folding block jobs into the jobs abstraction, or is it just for making the wire protocol nicer

Re: [PATCH] qapi/block-core: improve Qcow2OverlapCheckFlags documentation

2024-03-25 Thread Vladimir Sementsov-Ogievskiy
On 25.03.24 16:04, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Most of fields have no description at all. Let's fix that. Still, no reason to place here more detailed descriptions of what these structures are, as we have public Qcow2 format specification. Signed-off

[PATCH] qapi/block-core: improve Qcow2OverlapCheckFlags documentation

2024-03-25 Thread Vladimir Sementsov-Ogievskiy
Most of fields have no description at all. Let's fix that. Still, no reason to place here more detailed descriptions of what these structures are, as we have public Qcow2 format specification. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 25 + 1

Re: [PATCH v3] blockcommit: Reopen base image as RO after abort

2024-03-15 Thread Vladimir Sementsov-Ogievskiy
On 15.03.24 12:55, Alexander Ivanov wrote: On 2/28/24 17:48, Vladimir Sementsov-Ogievskiy wrote: On 09.02.24 15:29, Alexander Ivanov wrote: Could you please review the patch? Sorry for long delay. Honestly, I don't like refcnt in block-driver. It violate incapsulation, refcnt is interal

Re: [PATCH v2 3/6] qdev-monitor: add option to report GenericError from find_device_state

2024-03-15 Thread Vladimir Sementsov-Ogievskiy
On 15.03.24 15:51, Markus Armbruster wrote: Sorry for the late answer. Vladimir Sementsov-Ogievskiy writes: On 07.03.24 12:46, Markus Armbruster wrote: [...] I appreciate the attempt to curb the spread of DeviceNotFound errors. Two issues: * Copy-pasting find_device_state() with a false

Re: [PATCH v4 4/5] qapi: blockdev-backup: add discard-source parameter

2024-03-14 Thread Vladimir Sementsov-Ogievskiy
On 13.03.24 19:08, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add a parameter that enables discard-after-copy. That is mostly useful in "push backup with fleecing" scheme, when source is snapshot-access format driver node, based on copy-before-write filter snaps

[PATCH v4 0/5] backup: discard-source parameter

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
Hi all! The main patch is 04, please look at it for description and diagram. v4: add t-b by Fiona add r-b by Fiona to 02-05 (patch 01 still lack an r-b) 05: fix copyrights and subject in the test 04: since 9.0 --> since 9.1 (we missed a soft freeze for 9.0) Vladimir Sement

[PATCH v4 4/5] qapi: blockdev-backup: add discard-source parameter

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fiona Ebner Tested-by: Fiona Ebner --- block/backup.c | 5 +++-- block/block-copy.c | 9 + block/copy-before-write.c | 15 +-- block/copy-before-write.h

[PATCH v4 3/5] block/copy-before-write: create block_copy bitmap in filter node

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
copy_bitmap. That's all not ideal: it would be better if internal bitmap of block-copy object is not attached to any node. But that is not possible now. The simplest solution is just create copy_bitmap in filter node, where anyway two other bitmaps are created. Signed-off-by: Vladimir Sementsov

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

2024-03-13 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 --- .../qemu-iotests/tests/backup-discard-source | 152 ++ .../tests/backup-discard-source.out | 5 + 2 files changed, 157

[PATCH v4 1/5] block/copy-before-write: fix permission

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
t...@openvz.org/ [2] https://patchew.org/QEMU/2023101718.932733-1-vsement...@yandex-team.ru/ Signed-off-by: Vladimir Sementsov-Ogievskiy Tested-by: Fiona Ebner --- block/copy-before-write.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/block/copy-before-w

[PATCH v4 2/5] block/copy-before-write: support unligned snapshot-discard

2024-03-13 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 --- block/copy-before-write.c | 16 +--- 1 file

[RFC 10/15] qapi: query-jobs: add information specific for job type

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
Duplicate the feature from query-block-jobs. It's a step to finally deprecate query-block-jobs command and move to query-jobs. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 14 -- include/qemu/job.h | 5 + job-qmp.c | 6 ++ qapi/job.json

[RFC 05/15] qapi: JobChangeOptions: make type member optional and deprecated

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
Now QEMU can understand type directly from the job itself, type is redundant. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockjob.c | 2 +- docs/about/deprecated.rst| 6 ++ job-qmp.c| 17 + qapi/block

[RFC 01/15] scripts/qapi: support type-based unions

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
Sementsov-Ogievskiy --- scripts/qapi/introspect.py | 5 +++- scripts/qapi/schema.py | 50 +++--- scripts/qapi/types.py | 3 ++- scripts/qapi/visit.py | 43 ++-- 4 files changed, 73 insertions(+), 28 deletions(-) diff --git

[RFC 12/15] qapi: rename BlockDeviceIoStatus to IoStatus

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
| \ xargs sed -i 's/BlockDeviceIoStatus/IoStatus/g' git grep -l BLOCK_DEVICE_IO_STATUS | \ xargs sed -i 's/BLOCK_DEVICE_IO_STATUS/IO_STATUS/g' Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-backend.c | 14 +++--- block/mirror.c

[RFC 11/15] job-qmp: job_query_single_locked: add assertion on job ret

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
job->ret must be always set together with job->err. Let's assert this. Reproting no-error to the user, when job->err is unset and job->ret is somehow set would be a bug. Signed-off-by: Vladimir Sementsov-Ogievskiy --- job-qmp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/job

[RFC 07/15] qapi: add job-change

2024-03-13 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 --- docs/about/deprecated.rst | 4 ++-- job-qmp.c | 14 ++ qapi/block-core.json | 10

[RFC 14/15] qapi: query-job: add block-job specific information

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
Add io-status and speed, which make sense only for block-jobs. This allows us to finally deprecate old query-block-jobs API in the next commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 6 ++ block/commit.c | 6 ++ block/mirror.c

[RFC 06/15] blockjob: move change action implementation to job from block-job

2024-03-13 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

[RFC 13/15] qapi: move IoStatus to common.json

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
We will need to use the structure both in block-core.json and job.json. So, move it to common.json, which could be then included to job.json. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 16 qapi/common.json | 16 2 files changed

[RFC 09/15] qapi: job-complete: introduce no-block-replace option for mirror

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
er mode of "complete", not "cancel". Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 8 +--- include/qemu/job.h | 8 +++- job-qmp.c| 20 +++- job.c

[RFC 04/15] qapi: block-job-change: make copy-mode parameter optional

2024-03-13 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 | 5 + qapi/block-core.json | 2 +- 2 files changed, 6

[RFC 02/15] qapi: rename BlockJobChangeOptions to JobChangeOptions

2024-03-13 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

[RFC 08/15] qapi: job-change: support speed parameter

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
Allow change job speed through job-change command. Old block-job-set-speed would be deprecated soon. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 8 ++ block/commit.c | 10 ++- block/mirror.c | 60

[RFC 15/15] qapi/block-core: derpecate block-job- APIs

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
documentation changes for details). Signed-off-by: Vladimir Sementsov-Ogievskiy --- docs/about/deprecated.rst | 73 +-- qapi/block-core.json | 59 ++- 2 files changed, 129 insertions(+), 3 deletions(-) diff --git a/docs/about

[RFC 03/15] blockjob: block_job_change_locked(): check job type

2024-03-13 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

[RFC 00/15] block job API

2024-03-13 Thread Vladimir Sementsov-Ogievskiy
: support soft-cancelling ready mirror job in new API (as an option to job-complete) 10-14: prepare query-jobs to substitute query-block-jobs 15: finally, deprecate old APIs RFC: the series are untested. I plan to move tests to using new APIs instead of deprecated ones in v2. Vladimir Sementsov

Re: [PATCH v2 00/10] mirror: allow switching from background to active mode

2024-03-12 Thread Vladimir Sementsov-Ogievskiy
On 12.03.24 18:49, Kevin Wolf wrote: Am 12.03.2024 um 14:44 hat Vladimir Sementsov-Ogievskiy geschrieben: On 11.03.24 18:15, Vladimir Sementsov-Ogievskiy wrote: On 08.03.24 11:52, Kevin Wolf wrote: Am 07.03.2024 um 20:42 hat Vladimir Sementsov-Ogievskiy geschrieben: On 04.03.24 14:09, Peter

Re: [PATCH v2 00/10] mirror: allow switching from background to active mode

2024-03-12 Thread Vladimir Sementsov-Ogievskiy
On 11.03.24 18:15, Vladimir Sementsov-Ogievskiy wrote: On 08.03.24 11:52, Kevin Wolf wrote: Am 07.03.2024 um 20:42 hat Vladimir Sementsov-Ogievskiy geschrieben: On 04.03.24 14:09, Peter Krempa wrote: On Mon, Mar 04, 2024 at 11:48:54 +0100, Kevin Wolf wrote: Am 28.02.2024 um 19:07 hat

Re: [PATCH v2 00/10] mirror: allow switching from background to active mode

2024-03-11 Thread Vladimir Sementsov-Ogievskiy
On 11.03.24 00:07, Peter Krempa wrote: On Thu, Mar 07, 2024 at 22:42:56 +0300, Vladimir Sementsov-Ogievskiy wrote: On 04.03.24 14:09, Peter Krempa wrote: On Mon, Mar 04, 2024 at 11:48:54 +0100, Kevin Wolf wrote: Am 28.02.2024 um 19:07 hat Vladimir Sementsov-Ogievskiy geschrieben: On 03.11.23

Re: [PATCH v2 00/10] mirror: allow switching from background to active mode

2024-03-11 Thread Vladimir Sementsov-Ogievskiy
On 08.03.24 11:52, Kevin Wolf wrote: Am 07.03.2024 um 20:42 hat Vladimir Sementsov-Ogievskiy geschrieben: On 04.03.24 14:09, Peter Krempa wrote: On Mon, Mar 04, 2024 at 11:48:54 +0100, Kevin Wolf wrote: Am 28.02.2024 um 19:07 hat Vladimir Sementsov-Ogievskiy geschrieben: On 03.11.23 18:56

Re: [PATCH v2 00/10] mirror: allow switching from background to active mode

2024-03-07 Thread Vladimir Sementsov-Ogievskiy
On 04.03.24 14:09, Peter Krempa wrote: On Mon, Mar 04, 2024 at 11:48:54 +0100, Kevin Wolf wrote: Am 28.02.2024 um 19:07 hat Vladimir Sementsov-Ogievskiy geschrieben: On 03.11.23 18:56, Markus Armbruster wrote: Kevin Wolf writes: [...] Is the job abstraction a failure? We have

Re: [PATCH v2 3/6] qdev-monitor: add option to report GenericError from find_device_state

2024-03-07 Thread Vladimir Sementsov-Ogievskiy
On 07.03.24 12:46, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 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/system/qdev-monitor.c index

Re: [PATCH v2 6/6] qapi: introduce CONFIG_READ event

2024-03-07 Thread Vladimir Sementsov-Ogievskiy
On 07.03.24 13:01, 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: Vladimir

Re: [PATCH v2 5/6] qapi: device-sync-config: check runstate

2024-03-07 Thread Vladimir Sementsov-Ogievskiy
On 07.03.24 12:57, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Command result is racy if allow it during migration. Let's allow the sync only in RUNNING state. Signed-off-by: Vladimir Sementsov-Ogievskiy If I understand this correctly, the previous commit introduces

Re: [PATCH v2 4/6] qapi: introduce device-sync-config

2024-03-07 Thread Vladimir Sementsov-Ogievskiy
On 07.03.24 12:54, 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 v2 3/6] qdev-monitor: add option to report GenericError from find_device_state

2024-03-07 Thread Vladimir Sementsov-Ogievskiy
On 07.03.24 12:46, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 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/system/qdev-monitor.c index

Re: [RFC 0/4] mirror: implement incremental and bitmap modes

2024-03-07 Thread Vladimir Sementsov-Ogievskiy
On 06.03.24 16:44, Fiona Ebner wrote: Am 29.02.24 um 13:47 schrieb Fiona Ebner: Am 29.02.24 um 12:48 schrieb Vladimir Sementsov-Ogievskiy: On 29.02.24 13:11, Fiona Ebner wrote: The iotest creates a new target image for each incremental sync which only records the diff relative

[PATCH v2 0/6] vhost-user-blk: live resize additional APIs

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
config, but it's still better than nothing: for sure guest will not show new disk size until it read the updated config. So, management tool may wait for this event to report success to the user. Vladimir Sementsov-Ogievskiy (6): vhost-user-blk: simplify and fix vhost_user_blk_handle_config_ch

[PATCH v2 5/6] qapi: device-sync-config: check runstate

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
Command result is racy if allow it during migration. Let's allow the sync only in RUNNING state. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/runstate.h | 1 + system/qdev-monitor.c | 27 ++- system/runstate.c | 5 + 3 files changed

[PATCH v2 4/6] qapi: introduce device-sync-config

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
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 vhost-user server). Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/block/vhost

[PATCH v2 6/6] qapi: introduce CONFIG_READ event

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
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: Vladimir Sementsov-Ogievskiy --- hw/virtio/virtio-pci.c | 9 + include/monitor

[PATCH v2 1/6] vhost-user-blk: simplify and fix vhost_user_blk_handle_config_change

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
reason to create extra branches in the logic. Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 6a856a

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

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
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/system/qdev-monitor.c index 9febb743f1..cf7481e416 100644 --- a/system/qdev-monitor.c +++ b/system/qdev-monitor.c

[PATCH v2 2/6] qdev-monitor: fix error message in find_device_state()

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
This "hotpluggable" here is misleading. Actually we check is object a device or not. Let's drop the word. SUggested-by: Markus Armbruster Signed-off-by: Vladimir Sementsov-Ogievskiy --- system/qdev-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s

  1   2   3   4   5   6   7   8   9   10   >