mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
vhost-user-blk: Add support to reconnect backend
Since we now support the message VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD. The backend is able to restart safely because it can track inflight I/O in shared memory. This patch allows qemu to reconnect the backend after connection closed. Signed-off-by: Xie Yongji <xieyongji@baidu.com> Signed-off-by: Ni Xun <nixun@baidu.com> Signed-off-by: Zhang Yu <zhangyu31@baidu.com> Message-Id: <20190320112646.3712-7-xieyongji@baidu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
a57f009108
commit
77542d4314
2 changed files with 139 additions and 23 deletions
|
@ -38,6 +38,9 @@ typedef struct VHostUserBlk {
|
|||
struct vhost_dev dev;
|
||||
struct vhost_inflight *inflight;
|
||||
VhostUserState vhost_user;
|
||||
struct vhost_virtqueue *vqs;
|
||||
guint watch;
|
||||
bool connected;
|
||||
} VHostUserBlk;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue