diff options
author | Anand Avati <avati@redhat.com> | 2013-02-05 16:04:50 -0800 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-02-07 10:26:27 -0800 |
commit | 78ae7215614a7717d2cf838afefb1525fbb70602 (patch) | |
tree | 55434bfd663d5e725d9c62097a644c9c153e90d1 /contrib | |
parent | da9d54cac629d9c0f7ae6b431abfb134b5f0eca3 (diff) |
fuse-bridge: use READDIRPLUS support when available
This patch makes use of READDIRPLUS call when support is available
in the kernel.
Change-Id: Iac78881179567856b55af1f46594a2b2859309f0
BUG: 908128
Signed-off-by: Anand V. Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/3905
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/fuse-include/fuse_kernel.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/fuse-include/fuse_kernel.h b/contrib/fuse-include/fuse_kernel.h index e6fdcf809e5..c6396555c52 100644 --- a/contrib/fuse-include/fuse_kernel.h +++ b/contrib/fuse-include/fuse_kernel.h @@ -161,6 +161,7 @@ struct fuse_file_lock { #define FUSE_EXPORT_SUPPORT (1 << 4) #define FUSE_BIG_WRITES (1 << 5) #define FUSE_DONT_MASK (1 << 6) +#define FUSE_DO_READDIRPLUS (1 << 13) /** * CUSE INIT request/reply flags @@ -260,6 +261,7 @@ enum fuse_opcode { FUSE_IOCTL = 39, FUSE_POLL = 40, + FUSE_READDIRPLUS = 44, /* CUSE specific operations */ CUSE_INIT = 4096, }; @@ -564,6 +566,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; |