summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-internal.h
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-04-27 21:40:19 -0700
committerVijay Bellur <vbellur@redhat.com>2013-06-08 14:50:20 -0700
commita3d7ab968438f4ef3440fdc4986fe5416a28e3cf (patch)
treec0ce12305c75da76758ad2b2e0f6d9c0779f16d8 /api/src/glfs-internal.h
parentaa51ae9d99ac5ee10849392352743d6d92cfed9f (diff)
gfapi: optimistic resolution with ESTALE detection
Enhance the path resolver to be optimistic. Instead of performing a wasteful ->lookup() fop for every component in every API call, build in speculation logic to consider the previous resolution result temporarily, and if it results in ESTALE either later in the path resolution or in the FOP, then retry resolution with ->lookup() at every level and retry the FOP. This is the same optimistic resolution/retry logic Linux kernel resolver is proposing to use. Change-Id: Iecbc25248754caf0915cd7205910563ff88ce5e7 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5159 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'api/src/glfs-internal.h')
-rw-r--r--api/src/glfs-internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/glfs-internal.h b/api/src/glfs-internal.h
index 082b8fa5c..7c622637d 100644
--- a/api/src/glfs-internal.h
+++ b/api/src/glfs-internal.h
@@ -57,9 +57,9 @@ int glfs_mgmt_init (struct glfs *fs);
void glfs_init_done (struct glfs *fs, int ret);
int glfs_process_volfp (struct glfs *fs, FILE *fp);
int glfs_resolve (struct glfs *fs, xlator_t *subvol, const char *path, loc_t *loc,
- struct iatt *iatt);
+ struct iatt *iatt, int reval);
int glfs_lresolve (struct glfs *fs, xlator_t *subvol, const char *path, loc_t *loc,
- struct iatt *iatt);
+ struct iatt *iatt, int reval);
void glfs_first_lookup (xlator_t *subvol);
static inline void