diff options
author | Anand Avati <avati@redhat.com> | 2012-04-15 22:14:38 -0700 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-04-21 01:26:24 -0700 |
commit | 66fddb979d7f33a86869211c06e4a9ef4a54a080 (patch) | |
tree | 745c31cd664402ccc41c47c211a2a4cad3e27ae0 /xlators | |
parent | e2216fbc37831f76039cae77bf724550827daa0f (diff) |
storage/posix: prefer absolute path handles over GFID handlesv3.3.0qa37
Change-Id: I9afefa2f8a39c5f2c77271ea64aff95249c88821
BUG: 791187
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.com/3204
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/storage/posix/src/posix-handle.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/xlators/storage/posix/src/posix-handle.h b/xlators/storage/posix/src/posix-handle.h index a8fd9228a..ec4baec5b 100644 --- a/xlators/storage/posix/src/posix-handle.h +++ b/xlators/storage/posix/src/posix-handle.h @@ -74,6 +74,11 @@ "null gfid for path %s", loc->path); \ break; \ } \ + if (LOC_HAS_ABSPATH (loc)) { \ + MAKE_REAL_PATH (rpath, this, loc->path); \ + op_ret = posix_pstat (this, loc->gfid, rpath, iatt_p); \ + break; \ + } \ errno = 0; \ op_ret = posix_istat (this, loc->gfid, NULL, iatt_p); \ if (errno != ELOOP) { \ @@ -81,11 +86,6 @@ break; \ } \ /* __ret == -1 && errno == ELOOP */ \ - if (LOC_HAS_ABSPATH (loc)) { \ - MAKE_REAL_PATH (rpath, this, loc->path); \ - op_ret = posix_pstat (this, loc->gfid, rpath, iatt_p); \ - break; \ - } \ } while (0) @@ -98,6 +98,13 @@ break; \ } \ \ + if (LOC_HAS_ABSPATH (loc)) { \ + MAKE_REAL_PATH (entp, this, loc->path); \ + __parp = strdupa (entp); \ + parp = dirname (__parp); \ + op_ret = posix_pstat (this, NULL, entp, ent_p); \ + break; \ + } \ errno = 0; \ op_ret = posix_istat (this, loc->pargfid, loc->name, ent_p); \ if (errno != ELOOP) { \ @@ -106,13 +113,6 @@ break; \ } \ /* __ret == -1 && errno == ELOOP */ \ - if (LOC_HAS_ABSPATH (loc)) { \ - MAKE_REAL_PATH (entp, this, loc->path); \ - __parp = strdupa (entp); \ - parp = dirname (__parp); \ - op_ret = posix_pstat (this, NULL, entp, ent_p); \ - break; \ - } \ /* expand ELOOP */ \ } while (0) |