diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2010-10-29 05:38:13 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-10-29 04:17:08 -0700 |
commit | c65be2d304c67e57447d6d4a2e53fae07e31ff5c (patch) | |
tree | 29261d0e1fcd46136889a4a9542789b8a6fd4d03 /xlators/nfs/server/src/nfs3-helpers.c | |
parent | 413b2a5f9b77fd3d7f3b26c848482ec7b914102f (diff) |
nfs: Introduce nfs.enable-ino32 to support legacy 32-bit only appsv3.1.1qa2
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1972 (xcs get doesn't work with gNFS)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1972
Diffstat (limited to 'xlators/nfs/server/src/nfs3-helpers.c')
-rw-r--r-- | xlators/nfs/server/src/nfs3-helpers.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c index 2a8b1b5b114..298a5c858cf 100644 --- a/xlators/nfs/server/src/nfs3-helpers.c +++ b/xlators/nfs/server/src/nfs3-helpers.c @@ -99,11 +99,17 @@ nfs3_iatt_gfid_to_ino (struct iatt *buf) if (!buf) return 0; - if (buf->ia_ino != 1) + if ((buf->ia_ino != 1) && (buf->ia_gfid[15] != 1)) { + if (gf_nfs_enable_ino32()) { + ino = (uint32_t )nfs_hash_gfid (buf->ia_gfid); + goto hashout; + } + memcpy (&ino, &buf->ia_gfid[8], sizeof (uint64_t)); - else + } else ino = 1; +hashout: return ino; } |