summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-read-txn.c
diff options
context:
space:
mode:
authorarao <arao@redhat.com>2015-03-06 12:33:05 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-06-27 05:25:05 -0700
commit58a736111fa1db4f10c6646e81066434260f674f (patch)
tree98b40c45c6510c0ca9a9a33062b46b0411815556 /xlators/cluster/afr/src/afr-read-txn.c
parent7a3736b4a46dd07d65e27d892a85299a37fdd9a2 (diff)
afr: Porting messages to new logging framework
updated Change-Id: I94ac7b2cb0d43a82cf0eeee21407cff9b575c458 BUG: 1194640 Signed-off-by: arao <arao@redhat.com> Signed-off-by: Mohamed Ashiq <mliyazud@redhat.com> Reviewed-on: http://review.gluster.org/9897 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-read-txn.c')
-rw-r--r--xlators/cluster/afr/src/afr-read-txn.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr-read-txn.c b/xlators/cluster/afr/src/afr-read-txn.c
index 6e545497108..a998ccedbed 100644
--- a/xlators/cluster/afr/src/afr-read-txn.c
+++ b/xlators/cluster/afr/src/afr-read-txn.c
@@ -10,6 +10,7 @@
#include "afr.h"
#include "afr-transaction.h"
+#include "afr-messages.h"
int
afr_read_txn_next_subvol (call_frame_t *frame, xlator_t *this)
@@ -216,9 +217,9 @@ afr_read_txn (call_frame_t *frame, xlator_t *this, inode_t *inode,
/* very first transaction on this inode */
goto refresh;
- gf_log (this->name, GF_LOG_DEBUG, "%s: generation now vs cached: %d, "
- "%d", uuid_utoa (inode->gfid), local->event_generation,
- event_generation);
+ gf_msg_debug (this->name, 0, "%s: generation now vs cached: %d, "
+ "%d", uuid_utoa (inode->gfid), local->event_generation,
+ event_generation);
if (local->event_generation != event_generation)
/* servers have disconnected / reconnected, and possibly
rebooted, very likely changing the state of freshness
@@ -229,7 +230,7 @@ afr_read_txn (call_frame_t *frame, xlator_t *this, inode_t *inode,
local->readable, NULL);
if (read_subvol < 0 || read_subvol > priv->child_count) {
- gf_msg (this->name, GF_LOG_WARNING, 0, AFR_MSG_SPLIT_BRAIN,
+ gf_msg (this->name, GF_LOG_WARNING, 0, AFR_MSG_SPLIT_BRAIN,
"Unreadable subvolume %d found with event generation "
"%d for gfid %s. (Possible split-brain)",
read_subvol, event_generation, uuid_utoa(inode->gfid));
@@ -238,7 +239,8 @@ afr_read_txn (call_frame_t *frame, xlator_t *this, inode_t *inode,
if (!local->child_up[read_subvol]) {
/* should never happen, just in case */
- gf_log (this->name, GF_LOG_WARNING, "subvolume %d is the "
+ gf_msg (this->name, GF_LOG_WARNING, 0,
+ AFR_MSG_READ_SUBVOL_ERROR, "subvolume %d is the "
"read subvolume in this generation, but is not up",
read_subvol);
goto refresh;