aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2010-11-08 18:38:23 +0100
committerMiklos Szeredi <mszeredi@suse.cz>2010-11-08 18:38:23 +0100
commit0741f702a5bdae2087e3531e25193c515ee011d8 (patch)
tree4060b78a40f35be9271c7da131d590688f08b2da /include
parent2fcbc2a5a94983813c533c015134c6974f8ee636 (diff)
downloadandroid_external_fuse-0741f702a5bdae2087e3531e25193c515ee011d8.tar.gz
android_external_fuse-0741f702a5bdae2087e3531e25193c515ee011d8.tar.bz2
android_external_fuse-0741f702a5bdae2087e3531e25193c515ee011d8.zip
libfuse: add store request
Request data to be stored in the kernel buffers for a given inode.
Diffstat (limited to 'include')
-rw-r--r--include/fuse_kernel.h13
-rw-r--r--include/fuse_lowlevel.h25
2 files changed, 37 insertions, 1 deletions
diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h
index 384c9f3..25d3555 100644
--- a/include/fuse_kernel.h
+++ b/include/fuse_kernel.h
@@ -63,6 +63,9 @@
*
* 7.14
* - add splice support to fuse device
+ *
+ * 7.15
+ * - add store notify
*/
#ifndef _LINUX_FUSE_H
@@ -99,7 +102,7 @@
#define FUSE_KERNEL_VERSION 7
/** Minor version number of this interface */
-#define FUSE_KERNEL_MINOR_VERSION 14
+#define FUSE_KERNEL_MINOR_VERSION 15
/** The node ID of the root inode */
#define FUSE_ROOT_ID 1
@@ -291,6 +294,7 @@ enum fuse_notify_code {
FUSE_NOTIFY_POLL = 1,
FUSE_NOTIFY_INVAL_INODE = 2,
FUSE_NOTIFY_INVAL_ENTRY = 3,
+ FUSE_NOTIFY_STORE = 4,
FUSE_NOTIFY_CODE_MAX,
};
@@ -599,4 +603,11 @@ struct fuse_notify_inval_entry_out {
__u32 padding;
};
+struct fuse_notify_store_out {
+ __u64 nodeid;
+ __u64 offset;
+ __u32 size;
+ __u32 padding;
+};
+
#endif /* _LINUX_FUSE_H */
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
index 9132846..0a8fdf1 100644
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -1224,6 +1224,31 @@ int fuse_lowlevel_notify_inval_inode(struct fuse_chan *ch, fuse_ino_t ino,
int fuse_lowlevel_notify_inval_entry(struct fuse_chan *ch, fuse_ino_t parent,
const char *name, size_t namelen);
+/**
+ * Store data to the kernel buffers
+ *
+ * Synchronously store data in the kernel buffers belonging to the
+ * given inode. The stored data is marked up-to-date (no read will be
+ * performed against it, unless it's invalidated or evicted from the
+ * cache).
+ *
+ * If the stored data overflows the current file size, then the size
+ * is extended, similarly to a write(2) on the filesystem.
+ *
+ * If this function returns an error, then the store wasn't fully
+ * completed, but it may have been partially completed.
+ *
+ * @param ch the channel through which to send the invalidation
+ * @param ino the inode number
+ * @param offset the starting offset into the file to store to
+ * @param bufv buffer vector
+ * @param flags flags controlling the copy
+ * @return zero for success, -errno for failure
+ */
+int fuse_lowlevel_notify_store(struct fuse_chan *ch, fuse_ino_t ino,
+ off_t offset, struct fuse_bufvec *bufv,
+ enum fuse_buf_copy_flags flags);
+
/* ----------------------------------------------------------- *
* Utility functions *
* ----------------------------------------------------------- */