summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-09-06 00:13:04 +0530
committerAnand Avati <avati@redhat.com>2012-09-06 00:34:15 -0700
commitd6c99b6134f1eb90b3a8020c3538101df266e9b5 (patch)
treea5ec27bcf3136ddfda5ce5f21917bea50ad3be58 /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parent54b71368ef290bc579f113e683a82b09893fb50a (diff)
libglusterfs/dict: make 'dict_t' a opaque object
* ie, don't dereference dict_t pointer, instead use APIs everywhere * other than dict_t only 'data_t' should be the valid export from dict.h * added 'dict_foreach_fnmatch()' API * changed dict_lookup() to use data_t, instead of data_pair_t Change-Id: I400bb0dd55519a7c5d2a107e67c8e7a7207228dc Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 850917 Reviewed-on: http://review.gluster.org/3829 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index aea27500d6a..4385f876498 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -851,7 +851,7 @@ out:
}
-static void
+static int
_delete_reconfig_opt (dict_t *this, char *key, data_t *value, void *data)
{
int32_t *is_force = 0;
@@ -873,7 +873,7 @@ _delete_reconfig_opt (dict_t *this, char *key, data_t *value, void *data)
key, value->data);
dict_del (this, key);
out:
- return;
+ return 0;
}
static int
@@ -3045,7 +3045,7 @@ glusterd_op_commit_perform (glusterd_op_t op, dict_t *dict, char **op_errstr,
return ret;
}
-void
+int
_profile_volume_add_brick_rsp (dict_t *this, char *key, data_t *value,
void *data)
{
@@ -3058,6 +3058,7 @@ _profile_volume_add_brick_rsp (dict_t *this, char *key, data_t *value,
GF_ASSERT (new_value);
snprintf (new_key, sizeof (new_key), "%d-%s", rsp_ctx->count, key);
dict_set (rsp_ctx->dict, new_key, new_value);
+ return 0;
}
int
@@ -3113,7 +3114,7 @@ glusterd_profile_volume_brick_rsp (void *pending_entry,
//input-key: <replica-id>:<child-id>-*
//output-key: <brick-id>-*
-void
+int
_heal_volume_add_shd_rsp (dict_t *this, char *key, data_t *value, void *data)
{
char new_key[256] = {0,};
@@ -3170,7 +3171,7 @@ _heal_volume_add_shd_rsp (dict_t *this, char *key, data_t *value, void *data)
dict_set (rsp_ctx->dict, new_key, new_value);
out:
- return;
+ return 0;
}
int
@@ -3206,7 +3207,7 @@ out:
return ret;
}
-void
+int
_status_volume_add_brick_rsp (dict_t *this, char *key, data_t *value,
void *data)
{
@@ -3219,7 +3220,7 @@ _status_volume_add_brick_rsp (dict_t *this, char *key, data_t *value,
snprintf (new_key, sizeof (new_key), "brick%d.%s", rsp_ctx->count, key);
dict_set (rsp_ctx->dict, new_key, new_value);
- return;
+ return 0;
}
int