summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-helper.c
diff options
context:
space:
mode:
authorNithya Balachandran <nbalacha@redhat.com>2014-05-30 11:26:40 +0530
committerVijay Bellur <vbellur@redhat.com>2014-06-16 06:25:51 -0700
commit7382b66de76101d625ed888ec7b7f82fd7da56d3 (patch)
treee28bc5b65c6557907c4e011ca1ca7776cabd0656 /xlators/cluster/dht/src/dht-helper.c
parent0031bd1d18c874f3b68b59df7f84fce354b9b86c (diff)
Cluster/DHT: New logging framework
Moved all relevant DHT gf_log calls to the new logging framework. Change-Id: I3af3cfe0416e332774a6c4ff6a091d006c400af2 BUG: 1075611 Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/7929 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-helper.c')
-rw-r--r--xlators/cluster/dht/src/dht-helper.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index 58af04db392..7f0748a07cc 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -440,18 +440,18 @@ dht_subvol_get_hashed (xlator_t *this, loc_t *loc)
layout = dht_layout_get (this, loc->parent);
if (!layout) {
- gf_log (this->name, GF_LOG_DEBUG,
- "layout missing path=%s parent=%s",
- loc->path, uuid_utoa (loc->parent->gfid));
+ gf_msg_debug (this->name, 0,
+ "Missing layout. path=%s, parent gfid =%s",
+ loc->path, uuid_utoa (loc->parent->gfid));
goto out;
}
subvol = dht_layout_search (this, layout, loc->name);
if (!subvol) {
- gf_log (this->name, GF_LOG_DEBUG,
- "could not find subvolume for path=%s",
- loc->path);
+ gf_msg_debug (this->name, 0,
+ "No hashed subvolume for path=%s",
+ loc->path);
goto out;
}
@@ -816,7 +816,8 @@ dht_migration_complete_check_task (void *data)
}
if (uuid_compare (stbuf.ia_gfid, local->loc.inode->gfid)) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ DHT_MSG_GFID_MISMATCH,
"%s: gfid different on the target file on %s",
local->loc.path, dst_node->name);
ret = -1;
@@ -830,9 +831,10 @@ dht_migration_complete_check_task (void *data)
ret = dht_layout_preset (this, dst_node, inode);
if (ret != 0) {
- gf_log (this->name, GF_LOG_DEBUG,
- "%s: could not set preset layout for subvol %s",
- local->loc.path, dst_node->name);
+ gf_msg_debug (this->name, 0,
+ "%s: could not set preset layout "
+ "for subvol %s", local->loc.path,
+ dst_node->name);
ret = -1;
local->op_errno = EINVAL;
goto out;
@@ -1011,7 +1013,8 @@ dht_rebalance_inprogress_task (void *data)
}
if (uuid_compare (stbuf.ia_gfid, local->loc.inode->gfid)) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ DHT_MSG_GFID_MISMATCH,
"%s: gfid different on the target file on %s",
local->loc.path, dst_node->name);
ret = -1;