aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fuse.h
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2010-07-12 14:41:40 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2010-07-12 14:41:40 +0200
commit2d45ba381a74a743eeaa2b06c7c5c0d2bf73ba1a (patch)
tree8a195d072cab99c088004b74ac5889252f348542 /include/linux/fuse.h
parentfuse: add store request (diff)
downloadlinux-dev-2d45ba381a74a743eeaa2b06c7c5c0d2bf73ba1a.tar.xz
linux-dev-2d45ba381a74a743eeaa2b06c7c5c0d2bf73ba1a.zip
fuse: add retrieve request
Userspace filesystem can request data to be retrieved from the inode's mapping. This request is synchronous and the retrieved data is queued as a new request. If the write to the fuse device returns an error then the retrieve request was not completed and a reply will not be sent. Only present pages are returned in the retrieve reply. Retrieving stops when it finds a non-present page and only data prior to that is returned. This request doesn't change the dirty state of pages. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'include/linux/fuse.h')
-rw-r--r--include/linux/fuse.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index a90bd49834aa..c3c578e09833 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -40,6 +40,7 @@
*
* 7.15
* - add store notify
+ * - add retrieve notify
*/
#ifndef _LINUX_FUSE_H
@@ -254,6 +255,7 @@ enum fuse_opcode {
FUSE_DESTROY = 38,
FUSE_IOCTL = 39,
FUSE_POLL = 40,
+ FUSE_NOTIFY_REPLY = 41,
/* CUSE specific operations */
CUSE_INIT = 4096,
@@ -264,6 +266,7 @@ enum fuse_notify_code {
FUSE_NOTIFY_INVAL_INODE = 2,
FUSE_NOTIFY_INVAL_ENTRY = 3,
FUSE_NOTIFY_STORE = 4,
+ FUSE_NOTIFY_RETRIEVE = 5,
FUSE_NOTIFY_CODE_MAX,
};
@@ -579,4 +582,22 @@ struct fuse_notify_store_out {
__u32 padding;
};
+struct fuse_notify_retrieve_out {
+ __u64 notify_unique;
+ __u64 nodeid;
+ __u64 offset;
+ __u32 size;
+ __u32 padding;
+};
+
+/* Matches the size of fuse_write_in */
+struct fuse_notify_retrieve_in {
+ __u64 dummy1;
+ __u64 offset;
+ __u32 size;
+ __u32 dummy2;
+ __u64 dummy3;
+ __u64 dummy4;
+};
+
#endif /* _LINUX_FUSE_H */