diff options
| author | Rajesh Joseph <rjoseph@redhat.com> | 2013-05-21 16:48:12 +0530 | 
|---|---|---|
| committer | Vijay Bellur <vbellur@redhat.com> | 2013-05-24 05:45:58 -0700 | 
| commit | 757d697e586dd73edcd7400d9c6afee19ed49b85 (patch) | |
| tree | 650ae5a81eefc87f34d03fab9e68e91b957432d5 | |
| parent | 37f707023cb3777dcabd8b4be0d07878f9422025 (diff) | |
nfs: Unable to resolve FH
Bug (965435):  while deleting files/directory from multiple machines nfs server
logs show "Unable to resolve FH" error.
Cause: The error is shown whenever the server receives rmdir/remove call and the
file/directory is already deleted. Server always shows "Unable to resolve FH"
irrespective of what is the actual error.
Fix: The error message seems little misleading therefore changed the error
message to display the actual cause.
Change-Id: I4f9c151f737317d618278c59d9f66fe9f46350b8
BUG: 965435
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/5057
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
| -rw-r--r-- | xlators/nfs/server/src/nfs3.c | 18 | 
1 files changed, 8 insertions, 10 deletions
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c index 9b756712b..d119055eb 100644 --- a/xlators/nfs/server/src/nfs3.c +++ b/xlators/nfs/server/src/nfs3.c @@ -246,12 +246,10 @@ out:  #define nfs3_validate_gluster_fh(handle, status, errlabel)              \          do {                                                            \ -                if ((handle)) {                                         \ -                        if (!nfs3_fh_validate (handle)) {               \ -                                gf_log (GF_NFS3, GF_LOG_ERROR, "Bad Handle");\ -                                status = NFS3ERR_BADHANDLE;             \ -                                goto errlabel;                          \ -                        }                                               \ +                if (!nfs3_fh_validate (handle)) {                       \ +                        gf_log (GF_NFS3, GF_LOG_ERROR, "Bad Handle");   \ +                        status = NFS3ERR_BADHANDLE;                     \ +                        goto errlabel;                                  \                  }                                                       \          } while (0)                                                     \ @@ -267,8 +265,8 @@ out:                          uuid_unparse (cst->resolvefh.gfid, gfid);       \                          sprintf (buf, "(%s) %s : %s", trans->peerinfo.identifier,\                          xlatorp ? xlatorp->name : "ERR", gfid);         \ -                        gf_log (GF_NFS3, GF_LOG_ERROR, "Unable to resolve FH"\ -                                ": %s", buf);                           \ +                        gf_log (GF_NFS3, GF_LOG_ERROR, "%s: %s",        \ +                                strerror(cst->resolve_errno), buf);     \                          nfstat = nfs3_errno_to_nfsstat3 (cst->resolve_errno);\                          goto erlabl;                                    \                  }                                                       \ @@ -287,8 +285,8 @@ out:                          uuid_unparse (cst->resolvefh.gfid, gfid);       \                          sprintf (buf, "(%s) %s : %s", trans->peerinfo.identifier,\                          xlatorp ? xlatorp->name : "ERR", gfid);         \ -                        gf_log (GF_NFS3, GF_LOG_ERROR, "Unable to resolve FH"\ -                                ": %s", buf);                           \ +                        gf_log (GF_NFS3, GF_LOG_ERROR, "%s: %s",        \ +                                strerror(cst->resolve_errno), buf);     \                          nfstat = nfs3_errno_to_nfsstat3 (cs->resolve_errno);\                          goto erlabl;                                    \                  }                                                       \  | 
