[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 18/30] virtiofsd: get/set features callbacks
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PATCH 18/30] virtiofsd: get/set features callbacks |
Date: |
Mon, 21 Oct 2019 11:58:20 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
Add the get/set features callbacks.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
contrib/virtiofsd/fuse_virtio.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/contrib/virtiofsd/fuse_virtio.c b/contrib/virtiofsd/fuse_virtio.c
index 9c58f11634..ee9b3af3a4 100644
--- a/contrib/virtiofsd/fuse_virtio.c
+++ b/contrib/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.23.0
- Re: [PATCH 11/30] virtiofsd: fuse: Make iov_length usable outside fuse_lowlevel.c, (continued)
- [PATCH 12/30] virtiofsd: Make fsync work even if only inode is passed in, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 14/30] virtiofsd: add -o source=PATH to help output, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 13/30] virtiofsd: Add options for virtio, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 15/30] virtiofsd: Open vhost connection instead of mounting, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 16/30] virtiofsd: Start wiring up vhost-user, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 17/30] virtiofsd: Add main virtio loop, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 19/30] virtiofsd: Start queue threads, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 20/30] virtiofsd: Poll kick_fd for queue, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 18/30] virtiofsd: get/set features callbacks,
Dr. David Alan Gilbert (git) <=
- [PATCH 23/30] virtiofsd: Keep track of replies, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 22/30] virtiofsd: Send replies to messages, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 21/30] virtiofsd: Start reading commands from queue, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 27/30] virtiofsd: make -f (foreground) the default, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 24/30] virtiofsd: Add Makefile wiring for virtiofsd contrib, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 26/30] virtiofsd: add --fd=FDNUM fd passing option, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 25/30] virtiofsd: Fast path for virtio read, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 29/30] virtiofsd: add --print-capabilities option, Dr. David Alan Gilbert (git), 2019/10/21