summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.h
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-07-14 00:20:28 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-14 14:44:18 -0700
commit32451a4dd02bdd95ec800d51267d2e6be43914a4 (patch)
tree6054625db937658faf1d451d4173a95fd76a8a86 /xlators/mgmt/glusterd/src/glusterd-op-sm.h
parent9186c9e84c857a0b1bfbfa4e7b46e9eb741186fb (diff)
Fixes a crash seen in create volume
Also includes some re-factoring changes. Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1063 (gluster volume create command segfaults) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1063
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.h')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.h b/xlators/mgmt/glusterd/src/glusterd-op-sm.h
index 61bdc8885ce..e080acee78e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.h
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.h
@@ -133,12 +133,17 @@ typedef struct glusterd_op_lock_ctx_ glusterd_op_lock_ctx_t;
struct glusterd_op_stage_ctx_ {
rpcsvc_request_t *req;
- void *stage_req;
+ gd1_mgmt_stage_op_req stage_req;
};
typedef struct glusterd_op_stage_ctx_ glusterd_op_stage_ctx_t;
-typedef glusterd_op_stage_ctx_t glusterd_op_commit_ctx_t;
+struct glusterd_op_commit_ctx_ {
+ rpcsvc_request_t *req;
+ gd1_mgmt_stage_op_req stage_req;
+};
+
+typedef struct glusterd_op_commit_ctx_ glusterd_op_commit_ctx_t;
int
glusterd_op_sm_new_event (glusterd_op_sm_event_type_t event_type,
@@ -158,9 +163,20 @@ glusterd_op_set_ctx (glusterd_op_t op, void *ctx);
int32_t
glusterd_op_set_op (glusterd_op_t op);
-int
+int32_t
+glusterd_op_clear_pending_op (glusterd_op_t op);
+
+int32_t
+glusterd_op_clear_commit_op (glusterd_op_t op);
+
+int
glusterd_op_build_payload (glusterd_op_t op, gd1_mgmt_stage_op_req **req);
+int32_t
+glusterd_op_stage_validate (gd1_mgmt_stage_op_req *req);
+
+int32_t
+glusterd_op_commit_perform (gd1_mgmt_stage_op_req *req);
void *
glusterd_op_get_ctx (glusterd_op_t op);