From 26a8202550593232f941cd2251cfbeb304991808 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Thu, 25 Nov 2010 00:17:08 +0000 Subject: nfs3: Fresh inode lookup on failed revalidation Brings in changes that were earlier introduced in commit: f5afcc47f9f00472d6c2b3f48127e02332cd457a but reverted because the patch was buggy and caused a seg-fault due to extra inode_unrefs. It fixes that extra inode_unref and cleans up the revalidation logic. Signed-off-by: Shehjar Tikoo Signed-off-by: Anand V. Avati BUG: 1756 (NFS must revalidate inode on first ESTALE on lookup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1756 --- xlators/nfs/server/src/nfs3.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xlators/nfs/server/src/nfs3.h') diff --git a/xlators/nfs/server/src/nfs3.h b/xlators/nfs/server/src/nfs3.h index a43fdc4af..be570803a 100644 --- a/xlators/nfs/server/src/nfs3.h +++ b/xlators/nfs/server/src/nfs3.h @@ -134,6 +134,10 @@ struct nfs3_state { int fdcount; }; +typedef enum nfs3_lookup_type { + GF_NFS3_REVALIDATE = 1, + GF_NFS3_FRESH, +} nfs3_lookup_type_t; typedef int (*nfs3_resume_fn_t) (void *cs); /* Structure used to communicate state between a fop and its callback. @@ -197,8 +201,10 @@ struct nfs3_local { int hashidx; fd_t *resolve_dir_fd; char *resolventry; + nfs3_lookup_type_t lookuptype; }; +#define nfs3_is_revalidate_lookup(cst) ((cst)->lookuptype == GF_NFS3_REVALIDATE) typedef struct nfs3_local nfs3_call_state_t; /* Queue of ops waiting for open fop to return. */ -- cgit