prevent few excessive logs

Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
This commit is contained in:
Amar Tumballi 2011-04-21 07:08:28 +00:00 committed by Anand Avati
parent 2c12b90a84
commit 81c0415855
6 changed files with 23 additions and 22 deletions

View File

@ -585,6 +585,8 @@ pl_common_inodelk (call_frame_t *frame, xlator_t *this,
"Releasing all locks from transport %p", transport);
release_inode_locks_of_transport (this, dom, inode, transport);
op_ret = 0;
goto unwind;
}

View File

@ -1489,8 +1489,10 @@ quota_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
size = buf->ia_blocks * 512;
}
if (local->oldloc.parent != local->newloc.parent) {
quota_update_size (this, local->oldloc.parent, NULL, 0, (-size));
quota_update_size (this, local->newloc.parent, NULL, 0, size);
}
if (!(IA_ISREG (local->oldloc.inode->ia_type)
|| IA_ISLNK (local->oldloc.inode->ia_type))) {
@ -2083,7 +2085,7 @@ quota_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
quota_inode_ctx_get (local->loc.inode, -1, this, NULL, NULL,
&ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
gf_log (this->name, GF_LOG_DEBUG,
"quota context not set in inode (ino:%"PRId64
", gfid:%s)", local->loc.inode->ino,
uuid_utoa (local->loc.inode->gfid));
@ -2416,7 +2418,7 @@ quota_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
quota_inode_ctx_get (local->loc.inode, -1, this, NULL, NULL,
&ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
gf_log (this->name, GF_LOG_DEBUG,
"quota context not set in inode (ino:%"PRId64
", gfid:%s)", local->loc.inode->ino,
uuid_utoa (local->loc.inode->gfid));

View File

@ -2493,9 +2493,9 @@ fuse_xattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
"storage");
} else {
gf_log ("glusterfs-fuse", GF_LOG_WARNING,
"%"PRIu64": %s() %s => -1 (%s)",
"%"PRIu64": %s(%s) %s => -1 (%s)",
frame->root->unique,
gf_fop_list[frame->root->op],
gf_fop_list[frame->root->op], state->name,
state->loc.path, strerror (op_errno));
}
} else {

View File

@ -887,7 +887,7 @@ client3_1_getxattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
strerror (op_errno));
}
STACK_UNWIND_STRICT (getxattr, frame, op_ret, op_errno, dict);
@ -970,7 +970,7 @@ client3_1_fgetxattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
strerror (op_errno));
}
STACK_UNWIND_STRICT (fgetxattr, frame, op_ret, op_errno, dict);
if (rsp.dict.dict_val) {
@ -2212,7 +2212,7 @@ client3_1_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count,
gf_log (frame->this->name, GF_LOG_DEBUG,
"gfid changed for %s", local->loc.path);
rsp.op_ret = -1;
rsp.op_errno = ESTALE;
op_errno = ESTALE;
goto out;
}
@ -2222,11 +2222,10 @@ out:
rsp.op_errno = op_errno;
frame->local = NULL;
if (rsp.op_ret == -1) {
/* any error other than ENOENT or for revalidate for ENOENT too */
if ((gf_error_to_errno (rsp.op_errno) != ENOENT) ||
!uuid_is_null (local->loc.inode->gfid))
/* any error other than ENOENT */
if (rsp.op_errno != ENOENT)
gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
strerror (rsp.op_errno));
else
gf_log (this->name, GF_LOG_TRACE, "not found on remote node");

View File

@ -161,7 +161,7 @@ out:
if (op_ret) {
gf_log (this->name,
(op_errno == ENOENT ? GF_LOG_TRACE : GF_LOG_INFO),
((op_errno == ENOENT) ? GF_LOG_TRACE : GF_LOG_INFO),
"%"PRId64": LOOKUP %s (%"PRId64") ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
state->loc.inode ? state->loc.inode->ino : 0,
@ -736,10 +736,9 @@ out:
rsp.dict.dict_len = len;
if (op_ret == -1)
gf_log (this->name, GF_LOG_INFO,
"%"PRId64": GETXATTR %s (%"PRId64") ==> %"PRId32" (%s)",
"%"PRId64": GETXATTR %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
state->loc.inode ? state->loc.inode->ino : 0,
op_ret, strerror (op_errno));
state->name, op_ret, strerror (op_errno));
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
xdr_serialize_getxattr_rsp);
@ -801,10 +800,9 @@ out:
rsp.dict.dict_len = len;
if (op_ret == -1)
gf_log (this->name, GF_LOG_INFO,
"%"PRId64": FGETXATTR %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
"%"PRId64": FGETXATTR %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
state->fd ? state->fd->inode->ino : 0, op_ret,
strerror (op_errno));
state->name, op_ret, strerror (op_errno));
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
xdr_serialize_fgetxattr_rsp);

View File

@ -3460,8 +3460,8 @@ posix_removexattr (call_frame_t *frame, xlator_t *this,
op_errno = errno;
if (op_errno != ENOATTR && op_errno != EPERM)
gf_log (this->name, GF_LOG_ERROR,
"removexattr on %s: %s", loc->path,
strerror (op_errno));
"removexattr on %s (for %s): %s", loc->path,
name, strerror (op_errno));
goto out;
}