summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-bridge.c
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2015-05-21 17:47:33 +0200
committerRaghavendra G <rgowdapp@redhat.com>2015-05-28 02:14:59 -0700
commit47c604c2d2ccd8fb62c1ad155f63545b87ada851 (patch)
tree44d8a49b1412ccf21014fbf98e9a38f5f949a52e /xlators/mount/fuse/src/fuse-bridge.c
parentae9604bbdb4f87ee3f6f11adc3ce6cd140620055 (diff)
fuse: squash 64-bit inodes in readdirp when enable-ino32 is set
The structures returned by readdirp contain the inode 2x. Only one of them was squashed into 32-bits when enable-ino32 is enabled. Change-Id: I33a6d28fb118bb23971f918ffeb983d7f033106e BUG: 1223889 Signed-off-by: Niels de Vos <ndevos@redhat.com> Tested-by: Cyril Peponnet <cyril@peponnet.fr> [on release-3.5] Reviewed-on: http://review.gluster.org/10881 Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.c')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 605a24c9091..84efd6ca510 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -2760,7 +2760,12 @@ fuse_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
fde = (struct fuse_direntplus *)(buf + size);
feo = &fde->entry_out;
- fde->dirent.ino = entry->d_ino;
+
+ if (priv->enable_ino32)
+ fde->dirent.ino = GF_FUSE_SQUASH_INO(entry->d_ino);
+ else
+ fde->dirent.ino = entry->d_ino;
+
fde->dirent.off = entry->d_off;
fde->dirent.type = entry->d_type;
fde->dirent.namelen = strlen (entry->d_name);