summaryrefslogtreecommitdiffstats
path: root/xlators/nfs
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-03-12 18:07:09 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-14 03:05:54 -0700
commit91b4c34805f69c30c4730352eee873cee0dc17ee (patch)
tree6d45b25e39ddcb7505cabae249a2b1e4d5643d06 /xlators/nfs
parentdaa7cb945027e6564068310a9b857d0eb4ec1779 (diff)
nfs: no need to recalculate the 'ino' from gfid
it is guaranteed to be sent properly from posix layer itself now Change-Id: Ifbbf558f3bcfa609bf107a75c692003ca261ac0a Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 800831 Reviewed-on: http://review.gluster.com/2923 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/nfs')
-rw-r--r--xlators/nfs/server/src/nfs3-helpers.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c
index f8bf689feb7..68ec8e97005 100644
--- a/xlators/nfs/server/src/nfs3-helpers.c
+++ b/xlators/nfs/server/src/nfs3-helpers.c
@@ -102,21 +102,18 @@ struct nfs3stat_strerror nfs3stat_strerror_table[] = {
uint64_t
nfs3_iatt_gfid_to_ino (struct iatt *buf)
{
- uuid_t gfid = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
- uint64_t ino = 0;
+ uint64_t ino = 0;
if (!buf)
return 0;
- if ((buf->ia_ino != 1) && (uuid_compare (buf->ia_gfid, gfid) != 0)) {
- if (gf_nfs_enable_ino32()) {
- ino = (uint32_t )nfs_hash_gfid (buf->ia_gfid);
- goto hashout;
- }
+ 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
- ino = 1;
+ /* from posix its guaranteed to send unique ino */
+ ino = buf->ia_ino;
hashout:
return ino;