summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.h
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-07-19 05:54:25 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-19 05:11:05 -0700
commita6b90707bf68fe62bf115cfb143d9df69627cb64 (patch)
tree86a98f2e31bd9ec3cdba8b05386ef2d928bc09ed /xlators/mgmt/glusterd/src/glusterd.h
parent87ec1b72dac8f50f9eb4ba3b127baca19993ae94 (diff)
Changes for volume commands
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1161 (gluster volume start command segfaults glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1161
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index d92ec31cd..a998ce449 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -54,12 +54,14 @@ typedef struct {
rpcsvc_t *rpc;
rpc_clnt_prog_t *mgmt;
struct list_head volumes;
+ struct list_head hostnames;
} glusterd_conf_t;
struct glusterd_brickinfo {
char hostname[1024];
char path[PATH_MAX];
struct list_head brick_list;
+ uuid_t uuid;
};
typedef struct glusterd_brickinfo glusterd_brickinfo_t;
@@ -70,19 +72,23 @@ struct glusterd_volinfo_ {
int brick_count;
struct list_head vol_list;
struct list_head bricks;
+ glusterd_volume_status status;
};
typedef struct glusterd_volinfo_ glusterd_volinfo_t;
#define GLUSTERD_DEFAULT_WORKDIR "/etc/glusterd"
-#define GLUSTERD_DEFAULT_PORT 4284
+#define GLUSTERD_DEFAULT_PORT 6969
typedef ssize_t (*gd_serialize_t) (struct iovec outmsg, void *args);
#define GLUSTERD_GET_VOLUME_DIR(path, volinfo, priv) \
snprintf (path, PATH_MAX, "%s/vols/%s", priv->workdir,\
volinfo->volname);
+
+#define GLUSTERD_GET_BRICK_PIDFILE(pidfile, volpath, hostname)\
+ snprintf (pidfile, PATH_MAX, "%s/run/%s.pid", volpath, hostname);
int
glusterd_probe_begin (rpcsvc_request_t *req, const char *hoststr);
@@ -170,4 +176,31 @@ glusterd_list_friends (rpcsvc_request_t *req, dict_t *dict, int32_t flags);
int
glusterd_handle_cli_list_friends (rpcsvc_request_t *req);
+
+int
+glusterd_handle_cli_start_volume (rpcsvc_request_t *req);
+
+int32_t
+glusterd_start_volume (rpcsvc_request_t *req, char *volname, int flags);
+
+int
+glusterd_handle_friend_update (rpcsvc_request_t *req);
+
+int
+glusterd_handle_cli_stop_volume (rpcsvc_request_t *req);
+
+int
+glusterd_stop_volume (rpcsvc_request_t *req, char *volname, int flags);
+
+int32_t
+glusterd_delete_volume (rpcsvc_request_t *req, char *volname, int flags);
+
+int
+glusterd_handle_cli_delete_volume (rpcsvc_request_t *req);
+
+int
+glusterd_handle_cli_get_volume (rpcsvc_request_t *req);
+
+int32_t
+glusterd_get_volumes (rpcsvc_request_t *req, dict_t *dict, int32_t flags);
#endif