public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Asias He <asias@redhat.com>
To: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
	target-devel@vger.kernel.org, Asias He <asias@redhat.com>
Subject: [PATCH V2 6/6] tcm_vhost: Flush vhost_work in vhost_scsi_flush()
Date: Fri,  8 Mar 2013 10:21:47 +0800	[thread overview]
Message-ID: <1362709307-12554-7-git-send-email-asias@redhat.com> (raw)
In-Reply-To: <1362709307-12554-1-git-send-email-asias@redhat.com>

We also need to flush the vhost_works. One is the completion vhost_work, the
other is event vhost_work.

Signed-off-by: Asias He <asias@redhat.com>
---
 drivers/vhost/tcm_vhost.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
index af80c7f..f80a545 100644
--- a/drivers/vhost/tcm_vhost.c
+++ b/drivers/vhost/tcm_vhost.c
@@ -1127,6 +1127,8 @@ static void vhost_scsi_flush(struct vhost_scsi *vs)
 
 	for (i = 0; i < VHOST_SCSI_MAX_VQ; i++)
 		vhost_scsi_flush_vq(vs, i);
+	vhost_work_flush(&vs->dev, &vs->vs_completion_work);
+	vhost_work_flush(&vs->dev, &vs->vs_event_work);
 }
 
 static int vhost_scsi_set_features(struct vhost_scsi *vs, u64 features)
-- 
1.8.1.4

  parent reply	other threads:[~2013-03-08  2:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08  2:21 [PATCH V2 0/6] tcm_vhost hotplug/hotunplug support and locking/flushing fix Asias He
2013-03-08  2:21 ` [PATCH V2 1/6] tcm_vhost: Add missed lock in vhost_scsi_clear_endpoint() Asias He
2013-03-08  2:21 ` [PATCH V2 2/6] tcm_vhost: Introduce tcm_vhost_check_feature() Asias He
2013-03-08  2:21 ` [PATCH V2 3/6] tcm_vhost: Introduce tcm_vhost_check_endpoint() Asias He
2013-03-08  2:21 ` [PATCH V2 4/6] tcm_vhost: Fix vs->vs_endpoint checking in vhost_scsi_handle_vq() Asias He
2013-03-08  2:21 ` [PATCH V2 5/6] tcm_vhost: Add hotplug/hotunplug support Asias He
2013-03-08  2:21 ` Asias He [this message]
2013-03-08  8:24 ` [PATCH V2 0/6] tcm_vhost hotplug/hotunplug support and locking/flushing fix Stefan Hajnoczi
2013-03-11 12:03 ` Michael S. Tsirkin
2013-03-12  2:31   ` Asias He
2013-03-12  9:55     ` Michael S. Tsirkin
2013-03-13  3:29       ` Asias He
2013-03-13  8:11       ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362709307-12554-7-git-send-email-asias@redhat.com \
    --to=asias@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=nab@linux-iscsi.org \
    --cc=pbonzini@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=stefanha@redhat.com \
    --cc=target-devel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox