summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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_ */