diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2010-11-03 06:35:27 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-11-03 21:36:51 -0700 |
commit | d6d7a85487d8ec8017d1d13aa36642ad0355b3e4 (patch) | |
tree | 19afd12a6943d9490ff3116e44ff211238e788c9 /xlators/nfs/server/src/nfs3-helpers.c | |
parent | 5afc77d585c480f185dd7b24b753a6924218bb86 (diff) |
nfs3: More robust root gfid checks
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2051 (find fails with loop detected error)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2051
Diffstat (limited to 'xlators/nfs/server/src/nfs3-helpers.c')
-rw-r--r-- | xlators/nfs/server/src/nfs3-helpers.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c index 298a5c858cf..cff029d6e72 100644 --- a/xlators/nfs/server/src/nfs3-helpers.c +++ b/xlators/nfs/server/src/nfs3-helpers.c @@ -94,12 +94,13 @@ 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; if (!buf) return 0; - if ((buf->ia_ino != 1) && (buf->ia_gfid[15] != 1)) { + 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; |