|
|
887953 |
From afcb244f1264af8b0df42b5c79905fd52f01b924 Mon Sep 17 00:00:00 2001
|
|
|
887953 |
From: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
887953 |
Date: Thu, 15 Nov 2018 13:18:36 +0530
|
|
|
887953 |
Subject: [PATCH 449/450] glusterd/mux: Optimize brick disconnect handler code
|
|
|
887953 |
|
|
|
887953 |
Removed unnecessary iteration during brick disconnect
|
|
|
887953 |
handler when multiplex is enabled.
|
|
|
887953 |
|
|
|
887953 |
>Change-Id: I62dd3337b7e7da085da5d76aaae206e0b0edff9f
|
|
|
887953 |
>fixes: bz#1650115
|
|
|
887953 |
>Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
887953 |
upstream patch : https://review.gluster.org/#/c/glusterfs/+/21651/
|
|
|
887953 |
|
|
|
887953 |
Change-Id: I62dd3337b7e7da085da5d76aaae206e0b0edff9f
|
|
|
887953 |
BUG: 1649651
|
|
|
887953 |
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
887953 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/156327
|
|
|
887953 |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
887953 |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
887953 |
---
|
|
|
887953 |
xlators/mgmt/glusterd/src/glusterd-handler.c | 74 ++++------------
|
|
|
887953 |
xlators/mgmt/glusterd/src/glusterd-utils.c | 122 +++++++++++++--------------
|
|
|
887953 |
xlators/mgmt/glusterd/src/glusterd-utils.h | 3 +-
|
|
|
887953 |
xlators/mgmt/glusterd/src/glusterd.h | 21 +++--
|
|
|
887953 |
4 files changed, 87 insertions(+), 133 deletions(-)
|
|
|
887953 |
|
|
|
887953 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
|
|
|
887953 |
index a129afc..cab0dec 100644
|
|
|
887953 |
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
|
|
|
887953 |
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
|
|
|
887953 |
@@ -6046,37 +6046,6 @@ out:
|
|
|
887953 |
|
|
|
887953 |
static int gd_stale_rpc_disconnect_log;
|
|
|
887953 |
|
|
|
887953 |
-static int
|
|
|
887953 |
-glusterd_mark_bricks_stopped_by_proc (glusterd_brick_proc_t *brick_proc) {
|
|
|
887953 |
- glusterd_brickinfo_t *brickinfo = NULL;
|
|
|
887953 |
- glusterd_brickinfo_t *brickinfo_tmp = NULL;
|
|
|
887953 |
- glusterd_volinfo_t *volinfo = NULL;
|
|
|
887953 |
- int ret = -1;
|
|
|
887953 |
-
|
|
|
887953 |
- cds_list_for_each_entry (brickinfo, &brick_proc->bricks, brick_list) {
|
|
|
887953 |
- ret = glusterd_get_volinfo_from_brick (brickinfo->path,
|
|
|
887953 |
- &volinfo);
|
|
|
887953 |
- if (ret) {
|
|
|
887953 |
- gf_msg (THIS->name, GF_LOG_ERROR, 0,
|
|
|
887953 |
- GD_MSG_VOLINFO_GET_FAIL, "Failed to get volinfo"
|
|
|
887953 |
- " from brick(%s)", brickinfo->path);
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- }
|
|
|
887953 |
- cds_list_for_each_entry (brickinfo_tmp, &volinfo->bricks,
|
|
|
887953 |
- brick_list) {
|
|
|
887953 |
- if (strcmp (brickinfo->path,
|
|
|
887953 |
- brickinfo_tmp->path) == 0) {
|
|
|
887953 |
- glusterd_set_brick_status (brickinfo_tmp,
|
|
|
887953 |
- GF_BRICK_STOPPED);
|
|
|
887953 |
- brickinfo_tmp->start_triggered = _gf_false;
|
|
|
887953 |
- }
|
|
|
887953 |
- }
|
|
|
887953 |
- }
|
|
|
887953 |
- return 0;
|
|
|
887953 |
-out:
|
|
|
887953 |
- return ret;
|
|
|
887953 |
-}
|
|
|
887953 |
-
|
|
|
887953 |
int
|
|
|
887953 |
__glusterd_brick_rpc_notify (struct rpc_clnt *rpc, void *mydata,
|
|
|
887953 |
rpc_clnt_event_t event, void *data)
|
|
|
887953 |
@@ -6087,7 +6056,6 @@ __glusterd_brick_rpc_notify (struct rpc_clnt *rpc, void *mydata,
|
|
|
887953 |
glusterd_brickinfo_t *brickinfo = NULL;
|
|
|
887953 |
glusterd_volinfo_t *volinfo = NULL;
|
|
|
887953 |
xlator_t *this = NULL;
|
|
|
887953 |
- int temp = 0;
|
|
|
887953 |
int32_t pid = -1;
|
|
|
887953 |
glusterd_brickinfo_t *brickinfo_tmp = NULL;
|
|
|
887953 |
glusterd_brick_proc_t *brick_proc = NULL;
|
|
|
887953 |
@@ -6218,33 +6186,21 @@ __glusterd_brick_rpc_notify (struct rpc_clnt *rpc, void *mydata,
|
|
|
887953 |
}
|
|
|
887953 |
}
|
|
|
887953 |
|
|
|
887953 |
- if (is_brick_mx_enabled()) {
|
|
|
887953 |
- cds_list_for_each_entry (brick_proc, &conf->brick_procs,
|
|
|
887953 |
- brick_proc_list) {
|
|
|
887953 |
- cds_list_for_each_entry (brickinfo_tmp,
|
|
|
887953 |
- &brick_proc->bricks,
|
|
|
887953 |
- brick_list) {
|
|
|
887953 |
- if (strcmp (brickinfo_tmp->path,
|
|
|
887953 |
- brickinfo->path) == 0) {
|
|
|
887953 |
- ret = glusterd_mark_bricks_stopped_by_proc
|
|
|
887953 |
- (brick_proc);
|
|
|
887953 |
- if (ret) {
|
|
|
887953 |
- gf_msg(THIS->name,
|
|
|
887953 |
- GF_LOG_ERROR, 0,
|
|
|
887953 |
- GD_MSG_BRICK_STOP_FAIL,
|
|
|
887953 |
- "Unable to stop "
|
|
|
887953 |
- "bricks of process"
|
|
|
887953 |
- " to which brick(%s)"
|
|
|
887953 |
- " belongs",
|
|
|
887953 |
- brickinfo->path);
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- }
|
|
|
887953 |
- temp = 1;
|
|
|
887953 |
- break;
|
|
|
887953 |
- }
|
|
|
887953 |
- }
|
|
|
887953 |
- if (temp == 1)
|
|
|
887953 |
- break;
|
|
|
887953 |
+ if (is_brick_mx_enabled() && glusterd_is_brick_started(brickinfo)) {
|
|
|
887953 |
+ brick_proc = brickinfo->brick_proc;
|
|
|
887953 |
+ if (!brick_proc)
|
|
|
887953 |
+ break;
|
|
|
887953 |
+ cds_list_for_each_entry(brickinfo_tmp, &brick_proc->bricks,
|
|
|
887953 |
+ mux_bricks)
|
|
|
887953 |
+ {
|
|
|
887953 |
+ glusterd_set_brick_status(brickinfo_tmp, GF_BRICK_STOPPED);
|
|
|
887953 |
+ brickinfo_tmp->start_triggered = _gf_false;
|
|
|
887953 |
+ /* When bricks are stopped, ports also need to
|
|
|
887953 |
+ * be cleaned up
|
|
|
887953 |
+ */
|
|
|
887953 |
+ pmap_registry_remove(
|
|
|
887953 |
+ THIS, brickinfo_tmp->port, brickinfo_tmp->path,
|
|
|
887953 |
+ GF_PMAP_PORT_BRICKSERVER, NULL, _gf_true);
|
|
|
887953 |
}
|
|
|
887953 |
} else {
|
|
|
887953 |
glusterd_set_brick_status (brickinfo, GF_BRICK_STOPPED);
|
|
|
887953 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
887953 |
index 7179a68..ec7e27a 100644
|
|
|
887953 |
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
887953 |
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
887953 |
@@ -1088,6 +1088,7 @@ glusterd_brickinfo_new (glusterd_brickinfo_t **brickinfo)
|
|
|
887953 |
goto out;
|
|
|
887953 |
|
|
|
887953 |
CDS_INIT_LIST_HEAD (&new_brickinfo->brick_list);
|
|
|
887953 |
+ CDS_INIT_LIST_HEAD (&new_brickinfo->mux_bricks);
|
|
|
887953 |
pthread_mutex_init (&new_brickinfo->restart_mutex, NULL);
|
|
|
887953 |
*brickinfo = new_brickinfo;
|
|
|
887953 |
|
|
|
887953 |
@@ -1978,6 +1979,7 @@ glusterd_volume_start_glusterfs (glusterd_volinfo_t *volinfo,
|
|
|
887953 |
struct rpc_clnt *rpc = NULL;
|
|
|
887953 |
rpc_clnt_connection_t *conn = NULL;
|
|
|
887953 |
int pid = -1;
|
|
|
887953 |
+ glusterd_brick_proc_t *brick_proc = NULL;
|
|
|
887953 |
|
|
|
887953 |
GF_ASSERT (volinfo);
|
|
|
887953 |
GF_ASSERT (brickinfo);
|
|
|
887953 |
@@ -2188,15 +2190,20 @@ retry:
|
|
|
887953 |
goto out;
|
|
|
887953 |
}
|
|
|
887953 |
|
|
|
887953 |
- ret = glusterd_brick_process_add_brick (brickinfo);
|
|
|
887953 |
+ ret = glusterd_brickprocess_new(&brick_proc);
|
|
|
887953 |
if (ret) {
|
|
|
887953 |
- gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
887953 |
- GD_MSG_BRICKPROC_ADD_BRICK_FAILED, "Adding brick %s:%s "
|
|
|
887953 |
- "to brick process failed.", brickinfo->hostname,
|
|
|
887953 |
- brickinfo->path);
|
|
|
887953 |
+ gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_BRICKPROC_NEW_FAILED,
|
|
|
887953 |
+ "Failed to create new brick process instance");
|
|
|
887953 |
goto out;
|
|
|
887953 |
}
|
|
|
887953 |
|
|
|
887953 |
+ brick_proc->port = brickinfo->port;
|
|
|
887953 |
+ cds_list_add_tail(&brick_proc->brick_proc_list, &priv->brick_procs);
|
|
|
887953 |
+ brickinfo->brick_proc = brick_proc;
|
|
|
887953 |
+ cds_list_add_tail(&brickinfo->mux_bricks, &brick_proc->bricks);
|
|
|
887953 |
+ brickinfo->brick_proc = brick_proc;
|
|
|
887953 |
+ brick_proc->brick_count++;
|
|
|
887953 |
+
|
|
|
887953 |
connect:
|
|
|
887953 |
ret = glusterd_brick_connect (volinfo, brickinfo, socketpath);
|
|
|
887953 |
if (ret) {
|
|
|
887953 |
@@ -2328,9 +2335,6 @@ glusterd_brick_process_remove_brick (glusterd_brickinfo_t *brickinfo)
|
|
|
887953 |
xlator_t *this = NULL;
|
|
|
887953 |
glusterd_conf_t *priv = NULL;
|
|
|
887953 |
glusterd_brick_proc_t *brick_proc = NULL;
|
|
|
887953 |
- glusterd_brickinfo_t *brickinfoiter = NULL;
|
|
|
887953 |
- glusterd_brick_proc_t *brick_proc_tmp = NULL;
|
|
|
887953 |
- glusterd_brickinfo_t *tmp = NULL;
|
|
|
887953 |
|
|
|
887953 |
this = THIS;
|
|
|
887953 |
GF_VALIDATE_OR_GOTO ("glusterd", this, out);
|
|
|
887953 |
@@ -2339,48 +2343,44 @@ glusterd_brick_process_remove_brick (glusterd_brickinfo_t *brickinfo)
|
|
|
887953 |
GF_VALIDATE_OR_GOTO (this->name, priv, out);
|
|
|
887953 |
GF_VALIDATE_OR_GOTO (this->name, brickinfo, out);
|
|
|
887953 |
|
|
|
887953 |
- cds_list_for_each_entry_safe (brick_proc, brick_proc_tmp,
|
|
|
887953 |
- &priv->brick_procs, brick_proc_list) {
|
|
|
887953 |
- if (brickinfo->port != brick_proc->port) {
|
|
|
887953 |
- continue;
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- GF_VALIDATE_OR_GOTO (this->name, (brick_proc->brick_count > 0), out);
|
|
|
887953 |
+ brick_proc = brickinfo->brick_proc;
|
|
|
887953 |
+ if (!brick_proc) {
|
|
|
887953 |
+ if (brickinfo->status != GF_BRICK_STARTED) {
|
|
|
887953 |
+ /* this function will be called from gluster_pmap_signout and
|
|
|
887953 |
+ * glusterd_volume_stop_glusterfs. So it is possible to have
|
|
|
887953 |
+ * brick_proc set as null.
|
|
|
887953 |
+ */
|
|
|
887953 |
+ ret = 0;
|
|
|
887953 |
+ }
|
|
|
887953 |
+ goto out;
|
|
|
887953 |
+ }
|
|
|
887953 |
|
|
|
887953 |
- cds_list_for_each_entry_safe (brickinfoiter, tmp,
|
|
|
887953 |
- &brick_proc->bricks, brick_list) {
|
|
|
887953 |
- if (strcmp (brickinfoiter->path, brickinfo->path) == 0) {
|
|
|
887953 |
- cds_list_del_init (&brickinfoiter->brick_list);
|
|
|
887953 |
+ GF_VALIDATE_OR_GOTO(this->name, (brick_proc->brick_count > 0), out);
|
|
|
887953 |
|
|
|
887953 |
- GF_FREE (brickinfoiter->logfile);
|
|
|
887953 |
- GF_FREE (brickinfoiter);
|
|
|
887953 |
- brick_proc->brick_count--;
|
|
|
887953 |
- break;
|
|
|
887953 |
- }
|
|
|
887953 |
- }
|
|
|
887953 |
+ cds_list_del_init(&brickinfo->mux_bricks);
|
|
|
887953 |
+ brick_proc->brick_count--;
|
|
|
887953 |
|
|
|
887953 |
- /* If all bricks have been removed, delete the brick process */
|
|
|
887953 |
- if (brick_proc->brick_count == 0) {
|
|
|
887953 |
- ret = glusterd_brickprocess_delete (brick_proc);
|
|
|
887953 |
- if (ret)
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- }
|
|
|
887953 |
- break;
|
|
|
887953 |
+ /* If all bricks have been removed, delete the brick process */
|
|
|
887953 |
+ if (brick_proc->brick_count == 0) {
|
|
|
887953 |
+ ret = glusterd_brickprocess_delete(brick_proc);
|
|
|
887953 |
+ if (ret)
|
|
|
887953 |
+ goto out;
|
|
|
887953 |
}
|
|
|
887953 |
|
|
|
887953 |
+ brickinfo->brick_proc = NULL;
|
|
|
887953 |
ret = 0;
|
|
|
887953 |
out:
|
|
|
887953 |
return ret;
|
|
|
887953 |
}
|
|
|
887953 |
|
|
|
887953 |
int
|
|
|
887953 |
-glusterd_brick_process_add_brick (glusterd_brickinfo_t *brickinfo)
|
|
|
887953 |
+glusterd_brick_process_add_brick (glusterd_brickinfo_t *brickinfo,
|
|
|
887953 |
+ glusterd_brickinfo_t *parent_brickinfo)
|
|
|
887953 |
{
|
|
|
887953 |
int ret = -1;
|
|
|
887953 |
xlator_t *this = NULL;
|
|
|
887953 |
glusterd_conf_t *priv = NULL;
|
|
|
887953 |
glusterd_brick_proc_t *brick_proc = NULL;
|
|
|
887953 |
- glusterd_brickinfo_t *brickinfo_dup = NULL;
|
|
|
887953 |
|
|
|
887953 |
this = THIS;
|
|
|
887953 |
GF_VALIDATE_OR_GOTO ("glusterd", this, out);
|
|
|
887953 |
@@ -2389,37 +2389,28 @@ glusterd_brick_process_add_brick (glusterd_brickinfo_t *brickinfo)
|
|
|
887953 |
GF_VALIDATE_OR_GOTO (this->name, priv, out);
|
|
|
887953 |
GF_VALIDATE_OR_GOTO (this->name, brickinfo, out);
|
|
|
887953 |
|
|
|
887953 |
- ret = glusterd_brickinfo_new (&brickinfo_dup);
|
|
|
887953 |
- if (ret) {
|
|
|
887953 |
- gf_msg ("glusterd", GF_LOG_ERROR, 0,
|
|
|
887953 |
- GD_MSG_BRICK_NEW_INFO_FAIL,
|
|
|
887953 |
- "Failed to create new brickinfo");
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- ret = glusterd_brickinfo_dup (brickinfo, brickinfo_dup);
|
|
|
887953 |
- if (ret) {
|
|
|
887953 |
- gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
887953 |
- GD_MSG_BRICK_SET_INFO_FAIL, "Failed to dup brickinfo");
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- ret = glusterd_brick_proc_for_port (brickinfo->port, &brick_proc);
|
|
|
887953 |
- if (ret) {
|
|
|
887953 |
- ret = glusterd_brickprocess_new (&brick_proc);
|
|
|
887953 |
+ if (!parent_brickinfo) {
|
|
|
887953 |
+ ret = glusterd_brick_proc_for_port(brickinfo->port,
|
|
|
887953 |
+ &brick_proc);
|
|
|
887953 |
if (ret) {
|
|
|
887953 |
- gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
887953 |
- GD_MSG_BRICKPROC_NEW_FAILED, "Failed to create "
|
|
|
887953 |
- "new brick process instance");
|
|
|
887953 |
- goto out;
|
|
|
887953 |
+ ret = glusterd_brickprocess_new (&brick_proc);
|
|
|
887953 |
+ if (ret) {
|
|
|
887953 |
+ gf_msg(this->name, GF_LOG_ERROR, 0,
|
|
|
887953 |
+ GD_MSG_BRICKPROC_NEW_FAILED,
|
|
|
887953 |
+ "Failed to create "
|
|
|
887953 |
+ "new brick process instance");
|
|
|
887953 |
+ goto out;
|
|
|
887953 |
+ }
|
|
|
887953 |
+ brick_proc->port = brickinfo->port;
|
|
|
887953 |
+ cds_list_add_tail(&brick_proc->brick_proc_list,
|
|
|
887953 |
+ &priv->brick_procs);
|
|
|
887953 |
}
|
|
|
887953 |
-
|
|
|
887953 |
- brick_proc->port = brickinfo->port;
|
|
|
887953 |
-
|
|
|
887953 |
- cds_list_add_tail (&brick_proc->brick_proc_list, &priv->brick_procs);
|
|
|
887953 |
+ } else {
|
|
|
887953 |
+ ret = 0;
|
|
|
887953 |
+ brick_proc = parent_brickinfo->brick_proc;
|
|
|
887953 |
}
|
|
|
887953 |
-
|
|
|
887953 |
- cds_list_add_tail (&brickinfo_dup->brick_list, &brick_proc->bricks);
|
|
|
887953 |
+ cds_list_add_tail(&brickinfo->mux_bricks, &brick_proc->bricks);
|
|
|
887953 |
+ brickinfo->brick_proc = brick_proc;
|
|
|
887953 |
brick_proc->brick_count++;
|
|
|
887953 |
out:
|
|
|
887953 |
return ret;
|
|
|
887953 |
@@ -2538,6 +2529,7 @@ glusterd_volume_stop_glusterfs (glusterd_volinfo_t *volinfo,
|
|
|
887953 |
|
|
|
887953 |
brickinfo->status = GF_BRICK_STOPPED;
|
|
|
887953 |
brickinfo->start_triggered = _gf_false;
|
|
|
887953 |
+ brickinfo->brick_proc = NULL;
|
|
|
887953 |
if (del_brick)
|
|
|
887953 |
glusterd_delete_brick (volinfo, brickinfo);
|
|
|
887953 |
out:
|
|
|
887953 |
@@ -5704,7 +5696,8 @@ attach_brick (xlator_t *this,
|
|
|
887953 |
goto out;
|
|
|
887953 |
}
|
|
|
887953 |
brickinfo->port = other_brick->port;
|
|
|
887953 |
- ret = glusterd_brick_process_add_brick (brickinfo);
|
|
|
887953 |
+ ret = glusterd_brick_process_add_brick(brickinfo
|
|
|
887953 |
+ , other_brick);
|
|
|
887953 |
if (ret) {
|
|
|
887953 |
gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
887953 |
GD_MSG_BRICKPROC_ADD_BRICK_FAILED,
|
|
|
887953 |
@@ -6259,7 +6252,8 @@ glusterd_brick_start (glusterd_volinfo_t *volinfo,
|
|
|
887953 |
(void) glusterd_brick_connect (volinfo, brickinfo,
|
|
|
887953 |
socketpath);
|
|
|
887953 |
|
|
|
887953 |
- ret = glusterd_brick_process_add_brick (brickinfo);
|
|
|
887953 |
+ ret = glusterd_brick_process_add_brick (brickinfo,
|
|
|
887953 |
+ NULL);
|
|
|
887953 |
if (ret) {
|
|
|
887953 |
gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
887953 |
GD_MSG_BRICKPROC_ADD_BRICK_FAILED,
|
|
|
887953 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h
|
|
|
887953 |
index 8e5320d..69bb8c8 100644
|
|
|
887953 |
--- a/xlators/mgmt/glusterd/src/glusterd-utils.h
|
|
|
887953 |
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.h
|
|
|
887953 |
@@ -179,7 +179,8 @@ int32_t
|
|
|
887953 |
glusterd_resolve_brick (glusterd_brickinfo_t *brickinfo);
|
|
|
887953 |
|
|
|
887953 |
int
|
|
|
887953 |
-glusterd_brick_process_add_brick (glusterd_brickinfo_t *brickinfo);
|
|
|
887953 |
+glusterd_brick_process_add_brick (glusterd_brickinfo_t *brickinfo,
|
|
|
887953 |
+ glusterd_brickinfo_t *parent_brickinfo);
|
|
|
887953 |
|
|
|
887953 |
int
|
|
|
887953 |
glusterd_brick_process_remove_brick (glusterd_brickinfo_t *brickinfo);
|
|
|
887953 |
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
|
|
|
887953 |
index edd41aa..3dfbf9c 100644
|
|
|
887953 |
--- a/xlators/mgmt/glusterd/src/glusterd.h
|
|
|
887953 |
+++ b/xlators/mgmt/glusterd/src/glusterd.h
|
|
|
887953 |
@@ -211,6 +211,15 @@ typedef enum gf_brick_status {
|
|
|
887953 |
GF_BRICK_STARTING
|
|
|
887953 |
} gf_brick_status_t;
|
|
|
887953 |
|
|
|
887953 |
+struct glusterd_brick_proc {
|
|
|
887953 |
+ int port;
|
|
|
887953 |
+ uint32_t brick_count;
|
|
|
887953 |
+ struct cds_list_head brick_proc_list;
|
|
|
887953 |
+ struct cds_list_head bricks;
|
|
|
887953 |
+};
|
|
|
887953 |
+
|
|
|
887953 |
+typedef struct glusterd_brick_proc glusterd_brick_proc_t;
|
|
|
887953 |
+
|
|
|
887953 |
struct glusterd_brickinfo {
|
|
|
887953 |
char hostname[1024];
|
|
|
887953 |
char path[PATH_MAX];
|
|
|
887953 |
@@ -249,19 +258,13 @@ struct glusterd_brickinfo {
|
|
|
887953 |
gf_boolean_t port_registered;
|
|
|
887953 |
gf_boolean_t start_triggered;
|
|
|
887953 |
pthread_mutex_t restart_mutex;
|
|
|
887953 |
+ glusterd_brick_proc_t *brick_proc; /* Information regarding mux bricks */
|
|
|
887953 |
+ struct cds_list_head mux_bricks;
|
|
|
887953 |
+ /* List to store the bricks in brick_proc*/
|
|
|
887953 |
};
|
|
|
887953 |
|
|
|
887953 |
typedef struct glusterd_brickinfo glusterd_brickinfo_t;
|
|
|
887953 |
|
|
|
887953 |
-struct glusterd_brick_proc {
|
|
|
887953 |
- int port;
|
|
|
887953 |
- uint32_t brick_count;
|
|
|
887953 |
- struct cds_list_head brick_proc_list;
|
|
|
887953 |
- struct cds_list_head bricks;
|
|
|
887953 |
-};
|
|
|
887953 |
-
|
|
|
887953 |
-typedef struct glusterd_brick_proc glusterd_brick_proc_t;
|
|
|
887953 |
-
|
|
|
887953 |
struct gf_defrag_brickinfo_ {
|
|
|
887953 |
char *name;
|
|
|
887953 |
int files;
|
|
|
887953 |
--
|
|
|
887953 |
1.8.3.1
|
|
|
887953 |
|