diff options
author | Niels de Vos <ndevos@redhat.com> | 2015-06-11 01:07:56 +0200 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-06-13 23:35:58 -0700 |
commit | 5ab2ec4ad0129fb58d5287fcb7731be1b0dcf56e (patch) | |
tree | 35d1404d3bed6ada1266888e6294f5e3366335d1 /xlators | |
parent | 5a37c82036a381927bfea3784fbb7e762a4b5e3c (diff) |
logging: log "Stale filehandle" on the client as Debug
There are valid use-cases where a "Stale filehandle" is expected. One of
these is deleting a file through NFS-Ganesha. When the "filename" is
deleted, Ganesha will stat the file-handle to update its attributes. The
file-handle would still be valid in the case where there are hardlinks.
There is no need to log "Stale filehandle" as Warning. It is perfectly
fine to have this logged as Debug.
Cherry picked from commit ec7d0c3de11cbee1470308dcc10ec9f02e7fdfff:
> Change-Id: Ib9006d95a5d1f7dd394bf5d5994ad70740ad4ab2
> BUG: 1228731
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-on: http://review.gluster.org/11107
> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: soumya k <skoduri@redhat.com>
> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Change-Id: Ib9006d95a5d1f7dd394bf5d5994ad70740ad4ab2
BUG: 1228729
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/11169
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/protocol/client/src/client-rpc-fops.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c index f2e87b548c8..e8e3cdfbb40 100644 --- a/xlators/protocol/client/src/client-rpc-fops.c +++ b/xlators/protocol/client/src/client-rpc-fops.c @@ -478,7 +478,6 @@ client3_3_stat_cbk (struct rpc_req *req, struct iovec *iov, int count, xlator_t *this = NULL; dict_t *xdata = NULL; - this = THIS; frame = myframe; @@ -506,7 +505,11 @@ client3_3_stat_cbk (struct rpc_req *req, struct iovec *iov, int count, out: if (rsp.op_ret == -1) { - gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s", + /* stale filehandles are possible during normal operations, no + * need to spam the logs with these */ + gf_log (this->name, + rsp.op_errno == ESTALE ? GF_LOG_DEBUG : GF_LOG_WARNING, + "remote operation failed: %s", strerror (gf_error_to_errno (rsp.op_errno))); } |