diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2012-12-06 14:03:34 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2012-12-06 17:09:18 +0200 |
commit | 935cdee7ee159569b0aaa10bd9244660f6672b08 (patch) | |
tree | 366e06bee572c2578fcce51926a8ae25e04ce66d /drivers/vhost/tcm_vhost.c | |
parent | 4a7d6455b07845d92e025da222f11de519f90def (diff) |
vhost: avoid backend flush on vring ops
vring changes already do a flush internally where appropriate, so we do
not need a second flush.
It's currently not very expensive but a follow-up patch makes flush more
heavy-weight, so remove the extra flush here to avoid regressing
performance if call or kick fds are changed on data path.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/tcm_vhost.c')
-rw-r--r-- | drivers/vhost/tcm_vhost.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c index ef8884482439..33e5f90dfcf5 100644 --- a/drivers/vhost/tcm_vhost.c +++ b/drivers/vhost/tcm_vhost.c @@ -970,7 +970,10 @@ static long vhost_scsi_ioctl(struct file *f, unsigned int ioctl, return vhost_scsi_set_features(vs, features); default: mutex_lock(&vs->dev.mutex); - r = vhost_dev_ioctl(&vs->dev, ioctl, arg); + r = vhost_dev_ioctl(&vs->dev, ioctl, argp); + /* TODO: flush backend after dev ioctl. */ + if (r == -ENOIOCTLCMD) + r = vhost_vring_ioctl(&vs->dev, ioctl, argp); mutex_unlock(&vs->dev.mutex); return r; } |