aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_kernel.h
diff options
context:
space:
mode:
authorFeng Shuo <steve.shuo.feng@gmail.com>2013-01-04 16:23:31 +0800
committerMiklos Szeredi <mszeredi@suse.cz>2013-02-07 14:58:50 +0100
commitf448ac69d1791f4b5c1ce2771624e261cb1797b4 (patch)
tree4c8348915460af579afab632b87887d17d561377 /include/fuse_kernel.h
parent914871b20a901e3e1e981c92bc42b1c93b7ab81b (diff)
downloadlibfuse-f448ac69d1791f4b5c1ce2771624e261cb1797b4.tar.gz
libfuse: add readdirplus support in fuse_lowlevel_ops
This patch implements readdirplus support in FUSE usersapce. It adds a new fuse lowlevel operations fuse_lowleve_ops::readdir_plus, corespoding mount options and helper functions to maintain buffer. [From: Eric Wong <normalperson@yhbt.net>] This makes our terminology consistent with NFS and our kernel module, as well as reducing user/developer confusion in the command-line. Note: I'm keeping "fuse_add_direntry_plus" since that is less standardized in its use than "readdirplus" for now. Signed-off-by: Feng Shuo <steve.shuo.feng@gmail.com>
Diffstat (limited to 'include/fuse_kernel.h')
-rw-r--r--include/fuse_kernel.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h
index df8e9b9..28fefbb 100644
--- a/include/fuse_kernel.h
+++ b/include/fuse_kernel.h
@@ -86,6 +86,9 @@
*
* 7.20
* - add FUSE_AUTO_INVAL_DATA
+ *
+ * 7.21
+ * - add FUSE_READDIRPLUS
*/
#ifndef _LINUX_FUSE_H
@@ -126,7 +129,7 @@
#define FUSE_KERNEL_VERSION 7
/** Minor version number of this interface */
-#define FUSE_KERNEL_MINOR_VERSION 20
+#define FUSE_KERNEL_MINOR_VERSION 21
/** The node ID of the root inode */
#define FUSE_ROOT_ID 1
@@ -228,6 +231,7 @@ struct fuse_file_lock {
#define FUSE_FLOCK_LOCKS (1 << 10)
#define FUSE_HAS_IOCTL_DIR (1 << 11)
#define FUSE_AUTO_INVAL_DATA (1 << 12)
+#define FUSE_DO_READDIRPLUS (1 << 13)
/**
* CUSE INIT request/reply flags
@@ -334,6 +338,7 @@ enum fuse_opcode {
FUSE_NOTIFY_REPLY = 41,
FUSE_BATCH_FORGET = 42,
FUSE_FALLOCATE = 43,
+ FUSE_READDIRPLUS = 44,
/* CUSE specific operations */
CUSE_INIT = 4096,
@@ -665,6 +670,16 @@ struct fuse_dirent {
#define FUSE_DIRENT_SIZE(d) \
FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
+struct fuse_direntplus {
+ struct fuse_entry_out entry_out;
+ struct fuse_dirent dirent;
+};
+
+#define FUSE_NAME_OFFSET_DIRENTPLUS \
+ offsetof(struct fuse_direntplus, dirent.name)
+#define FUSE_DIRENTPLUS_SIZE(d) \
+ FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen)
+
struct fuse_notify_inval_inode_out {
__u64 ino;
__s64 off;