summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-resolve.c
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2009-11-26 07:51:26 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-11-26 09:06:35 -0800
commitbf34a8714e6ab9dce0670c2648f839165904f2f7 (patch)
tree9b85c052d1a2127a49123064e3402d65db1a5e30 /xlators/protocol/server/src/server-resolve.c
parente91b3c49e3ab8787513764dfdadf503bc9a5da1f (diff)
protocol/server: Introduce option trace to log requests and replies in normal log.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
Diffstat (limited to 'xlators/protocol/server/src/server-resolve.c')
-rw-r--r--xlators/protocol/server/src/server-resolve.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c
index 3262d1e91..f7a2205e5 100644
--- a/xlators/protocol/server/src/server-resolve.c
+++ b/xlators/protocol/server/src/server-resolve.c
@@ -291,7 +291,7 @@ resolve_entry_simple (call_frame_t *frame)
/* simple resolution is decisive - request was for a
stale handle */
resolve->op_ret = -1;
- resolve->op_errno = ESTALE;
+ resolve->op_errno = ENOENT;
ret = -1;
goto out;
}
@@ -403,7 +403,7 @@ resolve_inode_simple (call_frame_t *frame)
if (inode->ino != 1 && inode->generation != resolve->gen) {
resolve->op_ret = -1;
- resolve->op_errno = ESTALE;
+ resolve->op_errno = ENOENT;
ret = -1;
goto out;
}
@@ -574,15 +574,20 @@ int
resolve_and_resume (call_frame_t *frame, server_resume_fn_t fn)
{
server_state_t *state = NULL;
+ xlator_t *this = NULL;
state = CALL_STATE (frame);
state->resume_fn = fn;
+ this = frame->this;
+
gf_log (BOUND_XL (frame)->name, GF_LOG_DEBUG,
"RESOLVE %s() on %s %s",
gf_fop_list[frame->root->op],
state->resolve.path, state->resolve2.path);
+ print_server_state (frame, state, this, 1);
+
server_resolve_all (frame);
return 0;