[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/6] virtiofsd: Opt in for slave start/stop/shutdown functionalit
From: |
Vivek Goyal |
Subject: |
[PATCH 6/6] virtiofsd: Opt in for slave start/stop/shutdown functionality |
Date: |
Mon, 25 Jan 2021 13:01:15 -0500 |
This is an opt-in feature not enabled by default. Enable it in
protocol features by setting VHOST_USER_PROTOCOL_F_SLAVE_CH_START_STOP.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
---
tools/virtiofsd/fuse_virtio.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c
index 6805d8ba01..9328c8fac6 100644
--- a/tools/virtiofsd/fuse_virtio.c
+++ b/tools/virtiofsd/fuse_virtio.c
@@ -103,6 +103,11 @@ static void fv_set_features(VuDev *dev, uint64_t features)
{
}
+static uint64_t fv_get_protocol_features(VuDev *dev)
+{
+ return 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_CH_START_STOP;
+}
+
/*
* Callback from libvhost-user if there's a new fd we're supposed to listen
* to, typically a queue kick?
@@ -902,6 +907,7 @@ static const VuDevIface fv_iface = {
.get_features = fv_get_features,
.set_features = fv_set_features,
+ .get_protocol_features = fv_get_protocol_features,
/* Don't need process message, we've not got any at vhost-user level */
.queue_set_started = fv_queue_set_started,
--
2.25.4
[PATCH 4/6] qemu, vhost-user: Extend protocol to start/stop/flush slave channel, Vivek Goyal, 2021/01/25