OSDN Git Service

vhost-user-common: send get_inflight_fd once
authorLi Feng <fengli@smartx.com>
Mon, 9 Oct 2023 04:46:57 +0000 (12:46 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 22 Oct 2023 09:18:17 +0000 (05:18 -0400)
commitf7bd1437ba877e6509fff2b5ffce82500bc79559
treef87048f26f0daa8630d58f40aaa4c389d94b65b5
parentaa0c9aec575f6dba4e6548ad9e5de1b1899d843e
vhost-user-common: send get_inflight_fd once

Currently the get_inflight_fd will be sent every time the device is started, and
the backend will allocate shared memory to save the inflight state. If the
backend finds that it receives the second get_inflight_fd, it will release the
previous shared memory, which breaks inflight working logic.

This patch is a preparation for the following patches.

Signed-off-by: Li Feng <fengli@smartx.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <20231009044735.941655-2-fengli@smartx.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/scsi/vhost-scsi-common.c