diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-04-29 03:23:55 -0700 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-30 17:08:26 +0530 |
commit | 78aa2ee7d2f646a41f19858db9c48a8afc82e83f (patch) | |
tree | 3da8e4fc5e519a9fbecf984b53f51ec31685680d /xlators/features/locks/src/internal.c | |
parent | d22b495e0c4c180de63082add3e3e3168f1a0e1f (diff) |
Cleaned up log messages in features/locks.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/features/locks/src/internal.c')
-rw-r--r-- | xlators/features/locks/src/internal.c | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/xlators/features/locks/src/internal.c b/xlators/features/locks/src/internal.c index 5bdaeac7083..817dab4a17e 100644 --- a/xlators/features/locks/src/internal.c +++ b/xlators/features/locks/src/internal.c @@ -67,7 +67,7 @@ release_inode_locks_of_transport (xlator_t *this, inode_path (inode, NULL, &path); - gf_log (this->name, GF_LOG_DEBUG, + gf_log (this->name, GF_LOG_TRACE, "releasing lock on %s held by " "{transport=%p, pid=%"PRId64"}", path, trans, @@ -129,7 +129,7 @@ pl_inodelk (call_frame_t *frame, xlator_t *this, pinode = pl_inode_get (this, loc->inode); if (!pinode) { gf_log (this->name, GF_LOG_ERROR, - "out of memory :("); + "Out of memory."); op_errno = ENOMEM; goto unwind; } @@ -139,8 +139,8 @@ pl_inodelk (call_frame_t *frame, xlator_t *this, special case: this means release all locks from this transport */ - gf_log (this->name, GF_LOG_DEBUG, - "releasing all locks from transport %p", transport); + gf_log (this->name, GF_LOG_TRACE, + "Releasing all locks from transport %p", transport); release_inode_locks_of_transport (this, loc->inode, transport); goto unwind; @@ -149,7 +149,7 @@ pl_inodelk (call_frame_t *frame, xlator_t *this, reqlock = new_posix_lock (flock, transport, client_pid); if (!reqlock) { gf_log (this->name, GF_LOG_ERROR, - "out of memory :("); + "Out of memory."); op_ret = -1; op_errno = ENOMEM; goto unwind; @@ -172,7 +172,7 @@ pl_inodelk (call_frame_t *frame, xlator_t *this, if (can_block) goto out; - gf_log (this->name, GF_LOG_DEBUG, "returning EAGAIN"); + gf_log (this->name, GF_LOG_TRACE, "returning EAGAIN"); op_errno = EAGAIN; __destroy_lock (reqlock); goto unwind; @@ -181,8 +181,9 @@ pl_inodelk (call_frame_t *frame, xlator_t *this, default: op_errno = ENOTSUP; - gf_log (this->name, GF_LOG_ERROR, - "lock command F_GETLK not supported for GF_FILE_LK (cmd=%d)", + gf_log (this->name, GF_LOG_DEBUG, + "Lock command F_GETLK not supported for [f]inodelk " + "(cmd=%d)", cmd); goto unwind; } @@ -229,7 +230,7 @@ pl_finodelk (call_frame_t *frame, xlator_t *this, pinode = pl_inode_get (this, fd->inode); if (!pinode) { gf_log (this->name, GF_LOG_ERROR, - "out of memory :("); + "Out of memory."); op_errno = ENOMEM; goto unwind; } @@ -239,8 +240,8 @@ pl_finodelk (call_frame_t *frame, xlator_t *this, special case: this means release all locks from this transport */ - gf_log (this->name, GF_LOG_DEBUG, - "releasing all locks from transport %p", transport); + gf_log (this->name, GF_LOG_TRACE, + "Releasing all locks from transport %p", transport); release_inode_locks_of_transport (this, fd->inode, transport); goto unwind; @@ -249,7 +250,7 @@ pl_finodelk (call_frame_t *frame, xlator_t *this, reqlock = new_posix_lock (flock, transport, client_pid); if (!reqlock) { gf_log (this->name, GF_LOG_ERROR, - "out of memory :("); + "Out of memory."); op_ret = -1; op_errno = ENOMEM; goto unwind; @@ -273,7 +274,7 @@ pl_finodelk (call_frame_t *frame, xlator_t *this, if (can_block) goto out; - gf_log (this->name, GF_LOG_DEBUG, "returning EAGAIN"); + gf_log (this->name, GF_LOG_TRACE, "Returning EAGAIN"); op_errno = EAGAIN; __destroy_lock (reqlock); goto unwind; @@ -283,7 +284,8 @@ pl_finodelk (call_frame_t *frame, xlator_t *this, default: op_errno = ENOTSUP; gf_log (this->name, GF_LOG_ERROR, - "lock command F_GETLK not supported for GF_FILE_LK (cmd=%d)", + "Lock command F_GETLK not supported for [f]inodelk " + "(cmd=%d)", cmd); goto unwind; } @@ -462,8 +464,8 @@ __lock_name (pl_inode_t *pinode, const char *basename, entrylk_type type, goto out; } - gf_log (this->name, GF_LOG_DEBUG, - "blocking lock: {pinode=%p, basename=%s}", + gf_log (this->name, GF_LOG_TRACE, + "Blocking lock: {pinode=%p, basename=%s}", pinode, basename); lock->frame = frame; @@ -550,8 +552,8 @@ __unlock_name (pl_inode_t *pinode, const char *basename, entrylk_type type) ret_lock = lock; } } else { - gf_log ("locks", GF_LOG_ERROR, - "unlock for a non-existing lock!"); + gf_log ("locks", GF_LOG_DEBUG, + "Unlock for a non-existing lock!"); goto out; } @@ -575,8 +577,8 @@ __grant_blocked_entry_locks (xlator_t *this, pl_inode_t *pl_inode, /* TODO: error checking */ - gf_log ("locks", GF_LOG_DEBUG, - "trying to unblock: {pinode=%p, basename=%s}", + gf_log ("locks", GF_LOG_TRACE, + "Trying to unblock: {pinode=%p, basename=%s}", pl_inode, bl->basename); bl_ret = __lock_name (pl_inode, bl->basename, bl->type, @@ -703,7 +705,7 @@ pl_entrylk (call_frame_t *frame, xlator_t *this, pinode = pl_inode_get (this, loc->inode); if (!pinode) { gf_log (this->name, GF_LOG_ERROR, - "out of memory :("); + "Out of memory."); op_errno = ENOMEM; goto out; } @@ -717,8 +719,8 @@ pl_entrylk (call_frame_t *frame, xlator_t *this, all locks from this transport */ - gf_log (this->name, GF_LOG_DEBUG, - "releasing locks for transport %p", transport); + gf_log (this->name, GF_LOG_TRACE, + "Releasing locks for transport %p", transport); release_entry_locks_for_transport (this, pinode, transport); op_ret = 0; @@ -773,7 +775,8 @@ pl_entrylk (call_frame_t *frame, xlator_t *this, default: gf_log (this->name, GF_LOG_ERROR, - "unexpected case!"); + "Unexpected case in entrylk (cmd=%d). Please send" + "a bug report to gluster-devel@nongnu.org", cmd); goto out; } @@ -812,7 +815,7 @@ pl_fentrylk (call_frame_t *frame, xlator_t *this, pinode = pl_inode_get (this, fd->inode); if (!pinode) { gf_log (this->name, GF_LOG_ERROR, - "out of memory :("); + "Out of memory :("); goto out; } @@ -825,8 +828,8 @@ pl_fentrylk (call_frame_t *frame, xlator_t *this, all locks from this transport */ - gf_log (this->name, GF_LOG_DEBUG, - "releasing locks for transport %p", transport); + gf_log (this->name, GF_LOG_TRACE, + "Releasing locks for transport %p", transport); release_entry_locks_for_transport (this, pinode, transport); op_ret = 0; @@ -876,8 +879,10 @@ pl_fentrylk (call_frame_t *frame, xlator_t *this, break; default: - gf_log (this->name, GF_LOG_ERROR, - "unexpected case!"); + gf_log (this->name, GF_LOG_DEBUG, + "Unexpected case in fentrylk (cmd=%d). " + "Please send a bug report to gluster-devel@nongnu.org", + cmd); goto out; } |