[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 021/108] virtiofsd: get/set features callbacks
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 021/108] virtiofsd: get/set features callbacks |
Date: |
Thu, 23 Jan 2020 16:45:03 +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 014/108] vitriofsd/passthrough_ll: fix fallocate() ifdefs, (continued)
- [PULL 014/108] vitriofsd/passthrough_ll: fix fallocate() ifdefs, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 013/108] virtiofsd: Trim out compatibility code, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 017/108] virtiofsd: add -o source=PATH to help output, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 015/108] virtiofsd: Make fsync work even if only inode is passed in, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 016/108] virtiofsd: Add options for virtio, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 019/108] virtiofsd: Start wiring up vhost-user, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 001/108] virtiofsd: Pull in upstream headers, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 020/108] virtiofsd: Add main virtio loop, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 007/108] virtiofsd: Format imported files to qemu style, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 018/108] virtiofsd: Open vhost connection instead of mounting, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 021/108] virtiofsd: get/set features callbacks,
Dr. David Alan Gilbert (git) <=
- [PULL 022/108] virtiofsd: Start queue threads, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 025/108] virtiofsd: Send replies to messages, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 026/108] virtiofsd: Keep track of replies, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 023/108] virtiofsd: Poll kick_fd for queue, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 024/108] virtiofsd: Start reading commands from queue, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 027/108] virtiofsd: Add Makefile wiring for virtiofsd contrib, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 029/108] virtiofsd: add --fd=FDNUM fd passing option, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 031/108] virtiofsd: add vhost-user.json file, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 030/108] virtiofsd: make -f (foreground) the default, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 034/108] virtiofsd: passthrough_ll: create new files in caller's context, Dr. David Alan Gilbert (git), 2020/01/23