diff options
| author | Daniil Tatianin <d-tatianin@yandex-team.ru> | 2025-06-10 00:25:47 +0300 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-07-14 09:16:40 -0400 |
| commit | 07fde5901b5254d3b9706df22dbb16cfacf966d5 (patch) | |
| tree | 3d8ea444cb447bd716ff84921fda81ced4500dbd /include/hw/virtio/vhost-user-blk.h | |
| parent | 2f527fff460a2c67fd37298dbd7fe42fffdb738b (diff) | |
| download | focaccia-qemu-07fde5901b5254d3b9706df22dbb16cfacf966d5.tar.gz focaccia-qemu-07fde5901b5254d3b9706df22dbb16cfacf966d5.zip | |
vhost-user-blk: add an option to skip GET_VRING_BASE for force shutdown
If we have a server running disk requests that is for whatever reason hanging or not able to process any more IO requests but still has some in-flight requests previously issued by the guest OS, QEMU will still try to drain the vring before shutting down even if it was explicitly asked to do a "force shutdown" via SIGTERM or QMP quit. This is not useful since the guest is no longer running at this point since it was killed by QEMU earlier in the process. At this point, we don't care about whatever in-flight IO it might have pending, we just want QEMU to shut down. Add an option called "skip-get-vring-base-on-force-shutdown" to allow SIGTERM/QMP quit() to actually act like a "force shutdown" at least for vhost-user-blk devices since those require the drain operation to shut down gracefully unlike, for example, network devices. Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru> Message-Id: <20250609212547.2859224-4-d-tatianin@yandex-team.ru> Acked-by: Raphael Norwitz <raphael@enfabrica.net> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/virtio/vhost-user-blk.h')
| -rw-r--r-- | include/hw/virtio/vhost-user-blk.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost-user-blk.h b/include/hw/virtio/vhost-user-blk.h index ea085ee1ed..a10f785672 100644 --- a/include/hw/virtio/vhost-user-blk.h +++ b/include/hw/virtio/vhost-user-blk.h @@ -50,6 +50,8 @@ struct VHostUserBlk { bool connected; /* vhost_user_blk_start/vhost_user_blk_stop */ bool started_vu; + + bool skip_get_vring_base_on_force_shutdown; }; #endif |