summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.h
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2018-11-15 13:18:36 +0530
committerAtin Mukherjee <amukherj@redhat.com>2018-11-18 06:10:31 +0000
commitb4faa9e7a25bdf0582f8b0fd69aa1381c307a61e (patch)
tree4a9d8dfb21695447764c432a731dabcf594f460b /xlators/mgmt/glusterd/src/glusterd.h
parentc2e758b54d8a3f778e3e63db0000bb8b63de9b25 (diff)
glusterd/mux: Optimize brick disconnect handler code
Removed unnecessary iteration during brick disconnect handler when multiplex is enabled. Change-Id: I62dd3337b7e7da085da5d76aaae206e0b0edff9f fixes: bz#1650115 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index 3b681ef9544..b0a7d9a448d 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -224,6 +224,17 @@ typedef enum gf_brick_status {
GF_BRICK_STARTING
} gf_brick_status_t;
+typedef struct glusterd_brickinfo glusterd_brickinfo_t;
+
+struct glusterd_brick_proc {
+ int port;
+ uint32_t brick_count;
+ struct cds_list_head brick_proc_list;
+ struct cds_list_head bricks;
+};
+
+typedef struct glusterd_brick_proc glusterd_brick_proc_t;
+
struct glusterd_brickinfo {
char hostname[NAME_MAX];
char path[VALID_GLUSTERD_PATHMAX];
@@ -262,19 +273,10 @@ struct glusterd_brickinfo {
gf_boolean_t port_registered;
gf_boolean_t start_triggered;
pthread_mutex_t restart_mutex;
+ glusterd_brick_proc_t *brick_proc; /* Information regarding mux bricks */
+ struct cds_list_head mux_bricks; /* List to store the bricks in brick_proc*/
};
-typedef struct glusterd_brickinfo glusterd_brickinfo_t;
-
-struct glusterd_brick_proc {
- int port;
- uint32_t brick_count;
- struct cds_list_head brick_proc_list;
- struct cds_list_head bricks;
-};
-
-typedef struct glusterd_brick_proc glusterd_brick_proc_t;
-
struct glusterd_gfproxyd_info {
short port;
char *logfile;