The logic looks ok from the vhost-user-blk side but some comments inline. On Mon, Oct 20, 2025 at 1:47 AM Alexandr Moshkov <[email protected]> wrote: > > Hi! > > During inter-host migration, waiting for disk requests to be drained > in the vhost-user backend can incur significant downtime. > > This can be avoided if QEMU migrates the inflight region in vhost-user-blk. > Thus, during the qemu migration, the vhost-user backend can cancel all > inflight requests and > then, after migration, they will be executed on another host. > > At first, I tried to implement migration for all vhost-user devices that > support inflight at once, > but this would require a lot of changes both in vhost-user-blk (to transfer > it to the base class) and > in the vhost-user-base base class (inflight implementation and remodeling + a > large refactor). >
Even if it's a more significant change I'd rather generalize as much logic as possible and expose it as a vhost-user protocol feature. IMO too much vhost-user device-agnositic code is being pushed into vhost-user-blk. As Markus noted this also conflicts significantly with Vladimir's series so I'd suggest waiting until those are in, or possibly attempting to generalize on top of his changes. > Therefore, for now I decided to leave this idea for later and > implement the migration of the inflight region first for vhost-user-blk. > > Alexandr Moshkov (2): > vhost: support inflight save/load > vhost-user-blk: support inflight migration > > hw/block/vhost-user-blk.c | 52 ++++++++++++++++++++++++++++++++++++ > hw/virtio/vhost.c | 56 +++++++++++++++++++++++++++++++++++++++ > include/hw/virtio/vhost.h | 2 ++ > migration/options.c | 7 +++++ > migration/options.h | 1 + > qapi/migration.json | 9 +++++-- > 6 files changed, 125 insertions(+), 2 deletions(-) > > -- > 2.34.1 > >
