From 7382b66de76101d625ed888ec7b7f82fd7da56d3 Mon Sep 17 00:00:00 2001 From: Nithya Balachandran Date: Fri, 30 May 2014 11:26:40 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/7929 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/dht/src/dht-helper.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'xlators/cluster/dht/src/dht-helper.c') 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; -- cgit