summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2014-07-22 13:45:41 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2014-07-30 04:36:28 -0700
commit73fc66fb2dd79b39b6021a6309fb859363c2e968 (patch)
treec0cc2155024a6434360e63d73fbc0ff385cc2cac /xlators/cluster/afr/src
parent9f41712d060a71259e4970b9c8b32771a6d1f2c7 (diff)
cluster/afr: Improve inodelk/entrylk failure log messages
Change-Id: Ie792875546b4f8e11ebf870a6e63aaf5cb221976 BUG: 1121920 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/8344 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src')
-rw-r--r--xlators/cluster/afr/src/afr-lk-common.c14
-rw-r--r--xlators/cluster/afr/src/afr-messages.h11
2 files changed, 18 insertions, 7 deletions
diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c
index e3e70007706..4b7f8b7fcc2 100644
--- a/xlators/cluster/afr/src/afr-lk-common.c
+++ b/xlators/cluster/afr/src/afr-lk-common.c
@@ -654,10 +654,11 @@ afr_unlock_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
priv = this->private;
if (op_ret < 0 && op_errno != ENOTCONN && op_errno != EBADFD) {
- gf_msg (this->name, GF_LOG_INFO, op_errno,
- AFR_MSG_ENTRY_UNLOCK_FAIL,
- "%s: unlock failed on subvolume %s "
+ gf_msg (this->name, GF_LOG_ERROR, op_errno,
+ AFR_MSG_INODE_UNLOCK_FAIL,
+ "path=%s gfid=%s: unlock failed on subvolume %s "
"with lock owner %s", local->loc.path,
+ loc_gfid_utoa (&(local->loc)),
priv->children[child_index]->name,
lkowner_utoa (&frame->root->lk_owner));
}
@@ -807,9 +808,10 @@ afr_unlock_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
op_errno, (int) ((long)cookie));
if (op_ret < 0) {
- gf_log (this->name, GF_LOG_ERROR,
- "%s: unlock failed on %d, reason: %s",
- local->loc.path, child_index, strerror (op_errno));
+ gf_msg (this->name, GF_LOG_ERROR, op_errno,
+ AFR_MSG_ENTRY_UNLOCK_FAIL,
+ "%s: unlock failed on %s", local->loc.path,
+ priv->children[child_index]->name);
}
int_lock->lockee[lockee_no].locked_nodes[child_index] &= LOCKED_NO;
diff --git a/xlators/cluster/afr/src/afr-messages.h b/xlators/cluster/afr/src/afr-messages.h
index 1c9f6bcc358..52bdead934b 100644
--- a/xlators/cluster/afr/src/afr-messages.h
+++ b/xlators/cluster/afr/src/afr-messages.h
@@ -45,7 +45,7 @@
*/
#define GLFS_COMP_BASE_AFR GLFS_MSGID_COMP_AFR
-#define GLFS_NUM_MESSAGES 9
+#define GLFS_NUM_MESSAGES 10
#define GLFS_MSGID_END (GLFS_COMP_BASE_AFR + GLFS_NUM_MESSAGES + 1)
#define glfs_msg_start_x GLFS_COMP_BASE_AFR, "Invalid: Start of messages"
@@ -133,6 +133,15 @@
#define AFR_MSG_OPEN_FAIL (GLFS_COMP_BASE_AFR + 9)
+/*!
+ * @messageid 108010
+ * @diagnosis Inode unlocks failed on a brick.
+ * @recommendedaction Error number in the log should give the reason why it
+ * failed. Also observe brick logs for more information.
+*/
+#define AFR_MSG_INODE_UNLOCK_FAIL (GLFS_COMP_BASE_AFR + 10)
+
+
#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
#endif /* !_AFR_MESSAGES_H_ */