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

Vladimir Sementsov-Ogievskiy posted 6 patches 8 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240301171143.809835-1-vsementsov@yandex-team.ru
Maintainers: Raphael Norwitz <raphael@enfabrica.net>, "Michael S. Tsirkin" <mst@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Markus Armbruster <armbru@redhat.com>, "Dr. David Alan Gilbert" <dave@treblig.org>, Eric Blake <eblake@redhat.com>
There is a newer version of this series
hw/block/vhost-user-blk.c | 32 +++++++++++-------
hw/virtio/virtio-pci.c    | 18 ++++++++++
include/hw/qdev-core.h    |  3 ++
include/monitor/qdev.h    |  2 ++
include/sysemu/runstate.h |  1 +
monitor/monitor.c         |  1 +
qapi/qdev.json            | 43 ++++++++++++++++++++++++
stubs/qdev.c              |  6 ++++
system/qdev-monitor.c     | 71 ++++++++++++++++++++++++++++++++++++---
system/runstate.c         |  5 +++
10 files changed, 165 insertions(+), 17 deletions(-)
[PATCH v2 0/6] vhost-user-blk: live resize additional APIs
Posted by Vladimir Sementsov-Ogievskiy 8 months, 4 weeks ago
v2:
- now based on master
- drop x- prefixes, still keep new APIs "unstable"

Also:

01: add a-b by Raphael
    add note about removed comment "valid for resize only"
02-03: new patches, following review of old "02", which is now 04
04: use GenericError
    wording
    keep short name device-sync-config still
06: rename event to VIRTIO_CONFIG_READ

===

In vhost-user protocol we have VHOST_USER_BACKEND_CONFIG_CHANGE_MSG,
which backend may send to notify Qemu, that we should re-read the
config, and notify the guest.

Still that's not always convenient: backend may not support this
message. Also, having QMP command to force config sync is more reliable
than waiting for notification from external program. It also may be
helpful for debug/restore: if we have changed disk size, but guest
doesn't see that, it's good to have a separate QMP command to trigger
resync of the config.

So, the series proposes two experimental APIs:

1. device-sync-config command, to trigger config synchronization

2. CONFIG_READ event, which notify management tool that guest read the
updated config. Of course, that can't guarantee that the guest correctly
handled the updated 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_change
  qdev-monitor: fix error message in find_device_state()
  qdev-monitor: add option to report GenericError from find_device_state
  qapi: introduce device-sync-config
  qapi: device-sync-config: check runstate
  qapi: introduce CONFIG_READ event

 hw/block/vhost-user-blk.c | 32 +++++++++++-------
 hw/virtio/virtio-pci.c    | 18 ++++++++++
 include/hw/qdev-core.h    |  3 ++
 include/monitor/qdev.h    |  2 ++
 include/sysemu/runstate.h |  1 +
 monitor/monitor.c         |  1 +
 qapi/qdev.json            | 43 ++++++++++++++++++++++++
 stubs/qdev.c              |  6 ++++
 system/qdev-monitor.c     | 71 ++++++++++++++++++++++++++++++++++++---
 system/runstate.c         |  5 +++
 10 files changed, 165 insertions(+), 17 deletions(-)

-- 
2.34.1