[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 021/111] virtiofsd: get/set features callbacks
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 021/111] virtiofsd: get/set features callbacks |
Date: |
Thu, 23 Jan 2020 11:57:11 +0000 |
From: "Dr. David Alan Gilbert" <address@hidden>
Add the get/set features callbacks.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
tools/virtiofsd/fuse_virtio.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c
index 1928a2025c..4819e56568 100644
--- a/tools/virtiofsd/fuse_virtio.c
+++ b/tools/virtiofsd/fuse_virtio.c
@@ -46,6 +46,17 @@ struct virtio_fs_config {
uint32_t num_queues;
};
+/* Callback from libvhost-user */
+static uint64_t fv_get_features(VuDev *dev)
+{
+ return 1ULL << VIRTIO_F_VERSION_1;
+}
+
+/* Callback from libvhost-user */
+static void fv_set_features(VuDev *dev, uint64_t features)
+{
+}
+
/*
* Callback from libvhost-user if there's a new fd we're supposed to listen
* to, typically a queue kick?
@@ -78,7 +89,9 @@ static bool fv_queue_order(VuDev *dev, int qidx)
}
static const VuDevIface fv_iface = {
- /* TODO: Add other callbacks */
+ .get_features = fv_get_features,
+ .set_features = fv_set_features,
+
.queue_is_processed_in_order = fv_queue_order,
};
--
2.24.1
- [PULL 012/111] virtiofsd: Fix common header and define for QEMU builds, (continued)
- [PULL 012/111] virtiofsd: Fix common header and define for QEMU builds, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 018/111] virtiofsd: Open vhost connection instead of mounting, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 016/111] virtiofsd: Add options for virtio, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 023/111] virtiofsd: Poll kick_fd for queue, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 025/111] virtiofsd: Send replies to messages, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 024/111] virtiofsd: Start reading commands from queue, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 027/111] virtiofsd: Add Makefile wiring for virtiofsd contrib, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 026/111] virtiofsd: Keep track of replies, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 029/111] virtiofsd: add --fd=FDNUM fd passing option, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 031/111] virtiofsd: add vhost-user.json file, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 021/111] virtiofsd: get/set features callbacks,
Dr. David Alan Gilbert (git) <=
- [PULL 022/111] virtiofsd: Start queue threads, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 017/111] virtiofsd: add -o source=PATH to help output, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 019/111] virtiofsd: Start wiring up vhost-user, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 028/111] virtiofsd: Fast path for virtio read, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 007/111] virtiofsd: Format imported files to qemu style, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 035/111] virtiofsd: passthrough_ll: add lo_map for ino/fh indirection, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 033/111] virtiofs: Add maintainers entry, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 032/111] virtiofsd: add --print-capabilities option, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 034/111] virtiofsd: passthrough_ll: create new files in caller's context, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 030/111] virtiofsd: make -f (foreground) the default, Dr. David Alan Gilbert (git), 2020/01/23