diff options
author | Niels de Vos <ndevos@redhat.com> | 2012-09-18 14:39:51 +0200 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-09-18 06:54:59 -0700 |
commit | 9cc24de746ce0e616fa09120b89aaa9a626f33cb (patch) | |
tree | bdc62f0ea7ec7fc061ab22277d50f4a6a7a57fd4 /xlators/mount/fuse/src/fuse-bridge.h | |
parent | f4831ec958fd8a37e759b6e3338377808be8bc2e (diff) |
mount/fuse: readdir() should return 32-bit inodes when 'enable-ino32' is used
The glusterfs mount option 'enable-ino32' does not change the behaviour
of readdir(). fuse_readdir_cbk() uses entry->d_ino directly, and this
was missed in commit c13823bd16b26bc471d3efb15f63b76fbfdf0309.
By adding the function gf_fuse_fill_dirent(), the fuse_dirent structure
is filled in a similar way as the fuse_attr structure. This helper uses
the same function to squash the 64-bit inode in a 32-bit attribute.
Change-Id: Ia20e7144613124a58691e7935cb793b6256aef79
BUG: 850352
URL: http://lists.nongnu.org/archive/html/gluster-devel/2012-09/msg00051.html
Tested-by: Steve Bakke <sbakke@netzyn.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/3955
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.h')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.h b/xlators/mount/fuse/src/fuse-bridge.h index 22097f57ab9..c700554f9be 100644 --- a/xlators/mount/fuse/src/fuse-bridge.h +++ b/xlators/mount/fuse/src/fuse-bridge.h @@ -416,6 +416,8 @@ fuse_state_t *get_fuse_state (xlator_t *this, fuse_in_header_t *finh); void free_fuse_state (fuse_state_t *state); void gf_fuse_stat2attr (struct iatt *st, struct fuse_attr *fa, gf_boolean_t enable_ino32); +void gf_fuse_fill_dirent (gf_dirent_t *entry, struct fuse_dirent *fde, + gf_boolean_t enable_ino32); uint64_t inode_to_fuse_nodeid (inode_t *inode); xlator_t *fuse_active_subvol (xlator_t *fuse); inode_t *fuse_ino_to_inode (uint64_t ino, xlator_t *fuse); |