diff options
Diffstat (limited to 'xlators/cluster/dht/src/switch.c')
| -rw-r--r-- | xlators/cluster/dht/src/switch.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/xlators/cluster/dht/src/switch.c b/xlators/cluster/dht/src/switch.c index c86a0a9b75b..f1e9a399442 100644 --- a/xlators/cluster/dht/src/switch.c +++ b/xlators/cluster/dht/src/switch.c @@ -290,7 +290,8 @@ switch_lookup (call_frame_t *frame, xlator_t *this, ret = dict_set_uint32 (local->xattr_req, conf->xattr_name, 4 * 4); if (ret < 0) - gf_log (this->name, GF_LOG_WARNING, + gf_msg (this->name, GF_LOG_WARNING, 0, + DHT_MSG_DICT_SET_FAILED, "failed to set dict value for %s", conf->xattr_name); @@ -309,14 +310,16 @@ switch_lookup (call_frame_t *frame, xlator_t *this, ret = dict_set_uint32 (local->xattr_req, conf->xattr_name, 4 * 4); if (ret < 0) - gf_log (this->name, GF_LOG_WARNING, + gf_msg (this->name, GF_LOG_WARNING, 0, + DHT_MSG_DICT_SET_FAILED, "failed to set dict value for %s", conf->xattr_name); ret = dict_set_uint32 (local->xattr_req, conf->link_xattr_name, 256); if (ret < 0) - gf_log (this->name, GF_LOG_WARNING, + gf_msg (this->name, GF_LOG_WARNING, EINVAL, + DHT_MSG_DICT_SET_FAILED, "failed to set dict value for %s", conf->link_xattr_name); @@ -657,7 +660,8 @@ set_switch_pattern (xlator_t *this, dht_conf_t *conf, pattern = strtok_r (dup_str, ":", &tmp_str1); childs = strtok_r (NULL, ":", &tmp_str1); if (strncmp (pattern, "*", 2) == 0) { - gf_log ("switch", GF_LOG_INFO, + gf_msg ("switch", GF_LOG_INFO, 0, + DHT_MSG_SWITCH_PATTERN_INFO, "'*' pattern will be taken by default " "for all the unconfigured child nodes," " hence neglecting current option"); @@ -676,7 +680,8 @@ set_switch_pattern (xlator_t *this, dht_conf_t *conf, idx++; child = strtok_r (NULL, ",", &tmp); } else { - gf_log (this->name, GF_LOG_ERROR, + gf_msg (this->name, GF_LOG_ERROR, 0, + DHT_MSG_SUBVOL_ERROR, "%s is not a subvolume of %s. " "pattern can only be scheduled " "only to a subvolume of %s", @@ -718,7 +723,8 @@ set_switch_pattern (xlator_t *this, dht_conf_t *conf, } } else { /* error */ - gf_log ("switch", GF_LOG_ERROR, + gf_msg ("switch", GF_LOG_ERROR, 0, + DHT_MSG_SET_SWITCH_PATTERN_ERROR, "Check \"scheduler.switch.case\" " "option in unify volume. Exiting"); goto err; @@ -750,7 +756,8 @@ set_switch_pattern (xlator_t *this, dht_conf_t *conf, flag++; } if (!flag) { - gf_log ("switch", GF_LOG_ERROR, + gf_msg ("switch", GF_LOG_ERROR, 0, + DHT_MSG_SET_SWITCH_PATTERN_ERROR, "No nodes left for pattern '*'. Exiting"); goto err; } |
