summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2009-07-08 18:17:58 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2009-07-08 18:17:58 +0200
commit37d217f029a56a6d385f99773fb27dfcb51f9a46 (patch)
tree90b8cf1f1b77d8ff732dc2ee8ab032aaabfbdcd1
parentfuse: make the number of max background requests and congestion threshold tun... (diff)
downloadlinux-37d217f029a56a6d385f99773fb27dfcb51f9a46.tar.xz
linux-37d217f029a56a6d385f99773fb27dfcb51f9a46.zip
fuse: document protocol version negotiation
Clarify how the protocol version should be negotiated between kernel and userspace. Notably libfuse didn't correctly handle the case when the supported major versions didn't match. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
-rw-r--r--include/linux/fuse.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index b3700f0ac268..3e2925a34bf0 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -41,6 +41,26 @@
#include <linux/types.h>
+/*
+ * Version negotiation:
+ *
+ * Both the kernel and userspace send the version they support in the
+ * INIT request and reply respectively.
+ *
+ * If the major versions match then both shall use the smallest
+ * of the two minor versions for communication.
+ *
+ * If the kernel supports a larger major version, then userspace shall
+ * reply with the major version it supports, ignore the rest of the
+ * INIT message and expect a new INIT message from the kernel with a
+ * matching major version.
+ *
+ * If the library supports a larger major version, then it shall fall
+ * back to the major protocol version sent by the kernel for
+ * communication and reply with that major version (and an arbitrary
+ * supported minor version).
+ */
+
/** Version number of this interface */
#define FUSE_KERNEL_VERSION 7