diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2010-10-05 01:58:46 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-05 03:42:56 -0700 |
commit | fe2777ccaff5d2660af65472962bbef8d10b1814 (patch) | |
tree | 85b0bdf32f9b0d549215b141d6f2c2833612a207 /xlators/nfs/server | |
parent | 25c2e7e18a07f76a8e2168eb9c3d8f87c558069e (diff) |
nfs3: Convert gfid to ino only for non-root
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1724 (kernel untar fails during add-brick)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1724
Diffstat (limited to 'xlators/nfs/server')
-rw-r--r-- | xlators/nfs/server/src/nfs3-helpers.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c index 1a229af0afe..2e0274624de 100644 --- a/xlators/nfs/server/src/nfs3-helpers.c +++ b/xlators/nfs/server/src/nfs3-helpers.c @@ -94,10 +94,15 @@ struct nfs3stat_strerror nfs3stat_strerror_table[] = { uint64_t nfs3_iatt_gfid_to_ino (struct iatt *buf) { + uint64_t ino = 0; + if (!buf) return 0; - memcpy (&buf->ia_ino, &buf->ia_gfid[8], sizeof (uint64_t)); + if (buf->ia_ino != 1) + memcpy (&buf->ia_ino, &buf->ia_gfid[8], sizeof (uint64_t)); + else + ino = 1; return buf->ia_ino; } |