diff options
| author | Niels de Vos <ndevos@redhat.com> | 2015-05-21 17:47:33 +0200 |
|---|---|---|
| committer | Niels de Vos <ndevos@redhat.com> | 2015-06-04 16:17:26 -0700 |
| commit | 883ab6fd29572aaa75e0f1dcd0a1421947b454b6 (patch) | |
| tree | 0f3fa979b31d28217f987e83b0bf899338c04a68 /xlators/mount/fuse/src/fuse-bridge.h | |
| parent | 1d0db2e1548ff08cac93e3a5c735a73b92e18791 (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.
Backport of:
> Change-Id: I33a6d28fb118bb23971f918ffeb983d7f033106e
> BUG: 1223889
> Reviewed-on: http://review.gluster.org/10881
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
> Tested-by: Cyril Peponnet <cyril@peponnet.fr> [on release-3.5]
Change-Id: I33a6d28fb118bb23971f918ffeb983d7f033106e
BUG: 1223890
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/10882
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.h')
| -rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.h b/xlators/mount/fuse/src/fuse-bridge.h index 1a0d74cd4cd..342d3c93c0f 100644 --- a/xlators/mount/fuse/src/fuse-bridge.h +++ b/xlators/mount/fuse/src/fuse-bridge.h @@ -153,6 +153,9 @@ typedef struct fuse_graph_switch_args fuse_graph_switch_args_t; #define FH_TO_FD(fh) ((_FH_TO_FD (fh))?(fd_ref (_FH_TO_FD (fh))):((fd_t *) 0)) +/* Use the same logic as the Linux NFS-client */ +#define GF_FUSE_SQUASH_INO(ino) (((uint32_t) ino) ^ (ino >> 32)) + #define FUSE_FOP(state, ret, op_num, fop, args ...) \ do { \ xlator_t *xl = NULL; \ |
