From a3d7ab968438f4ef3440fdc4986fe5416a28e3cf Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Sat, 27 Apr 2013 21:40:19 -0700 Subject: 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 Reviewed-on: http://review.gluster.org/5159 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- api/src/glfs-internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/src/glfs-internal.h') 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 -- cgit