OSDN Git Service

vhost_scsi: flush IO vqs then send TMF rsp
authorMike Christie <michael.christie@oracle.com>
Mon, 26 Jun 2023 23:23:01 +0000 (18:23 -0500)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 3 Jul 2023 16:15:14 +0000 (12:15 -0400)
commit0a3eac5239d2ddcfef8cc5b0c40095981536db90
treefadfaeaf8e3f4c2963a770fa6b56592a14e6c41c
parent78af31cc4e147ddb8a7b0db800837ad5db3e2a58
vhost_scsi: flush IO vqs then send TMF rsp

With one worker we will always send the scsi cmd responses then send the
TMF rsp, because LIO will always complete the scsi cmds first then call
into us to send the TMF response.

With multiple workers, the IO vq workers could be running while the
TMF/ctl vq worker is running so this has us do a flush before completing
the TMF to make sure cmds are completed when it's work is later queued
and run.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Message-Id: <20230626232307.97930-12-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/scsi.c