From ba98d9f472979d4bd648933b7940eb20e3c82116 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Tue, 27 Jul 2010 06:16:50 +0000 Subject: nfs3: Return ESTALE when fh resolver exhausts dirents During hard fh resolution, if a directory traversal goes right through to end-of-dir without finding a hash match, we need to return an ESTALE, not ENOENT. Signed-off-by: Shehjar Tikoo Signed-off-by: Anand V. Avati BUG: 854 (nfs server didn't start) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=854 --- xlators/nfs/server/src/nfs3-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/nfs/server') diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c index ada6f88f1..fa0e751c7 100644 --- a/xlators/nfs/server/src/nfs3-helpers.c +++ b/xlators/nfs/server/src/nfs3-helpers.c @@ -2864,7 +2864,7 @@ nfs3_fh_resolve_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, gf_log (GF_NFS3, GF_LOG_TRACE, "Directory read done: %s: %s", cs->resolvedloc.path, strerror (op_ret)); cs->resolve_ret = -1; - cs->resolve_errno = ENOENT; + cs->resolve_errno = ESTALE; nfs3_call_resume (cs); goto err; } -- cgit