summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPurna Pavan Chandra Aekkaladevi <paekkala@redhat.com>2019-09-23 15:36:16 +0530
committerAtin Mukherjee <amukherj@redhat.com>2019-10-14 04:27:19 +0000
commitd003ff64778b4d729cec417bfe8f56140806b07d (patch)
tree208ae96704b6b99ed8d16f3d4ac7ac731798bf94
parent1004f959ca3b3697f2759f929ca4c11537f6c488 (diff)
glusterd: Re-alignment of structure attributes in glusterd.
Structures defined in few files of glusterd src have been modified into memory efficient manner. Change-Id: Ie712b41cc74b04d5169bfd2402bff3b9c0d8c95b Updates: bz#1754448 Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkala@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-conn-mgmt.h4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.h2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-gfproxyd-svc.h2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-hooks.h4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-pmap.h4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapd-svc.h2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-svc-mgmt.h8
7 files changed, 13 insertions, 13 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.h b/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.h
index d1c4607..1b22562 100644
--- a/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.h
+++ b/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.h
@@ -20,11 +20,11 @@ typedef int (*glusterd_conn_notify_t)(glusterd_conn_t *conn,
struct glusterd_conn_ {
struct rpc_clnt *rpc;
- char sockpath[PATH_MAX];
- int frame_timeout;
/* Existing daemons tend to specialize their respective
* notify implementations, so ... */
glusterd_conn_notify_t notify;
+ int frame_timeout;
+ char sockpath[PATH_MAX];
};
int
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.h b/xlators/mgmt/glusterd/src/glusterd-geo-rep.h
index 5f5fe34..7d1318f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.h
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.h
@@ -30,8 +30,8 @@ typedef struct glusterd_gsync_status_temp {
} glusterd_gsync_status_temp_t;
typedef struct gsync_status_param {
- int is_active;
glusterd_volinfo_t *volinfo;
+ int is_active;
} gsync_status_param_t;
int
diff --git a/xlators/mgmt/glusterd/src/glusterd-gfproxyd-svc.h b/xlators/mgmt/glusterd/src/glusterd-gfproxyd-svc.h
index db1c8b1..d396b40 100644
--- a/xlators/mgmt/glusterd/src/glusterd-gfproxyd-svc.h
+++ b/xlators/mgmt/glusterd/src/glusterd-gfproxyd-svc.h
@@ -17,8 +17,8 @@
struct glusterd_gfproxydsvc_ {
glusterd_svc_t svc;
- int port;
gf_store_handle_t *handle;
+ int port;
};
typedef struct glusterd_gfproxydsvc_ glusterd_gfproxydsvc_t;
diff --git a/xlators/mgmt/glusterd/src/glusterd-hooks.h b/xlators/mgmt/glusterd/src/glusterd-hooks.h
index 3813c18..f8b887b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-hooks.h
+++ b/xlators/mgmt/glusterd/src/glusterd-hooks.h
@@ -34,17 +34,17 @@ typedef enum glusterd_commit_hook_type {
typedef struct hooks_private {
struct cds_list_head list;
- int waitcount; // debug purposes
pthread_mutex_t mutex;
pthread_cond_t cond;
pthread_t worker;
+ int waitcount; // debug purposes
} glusterd_hooks_private_t;
typedef struct hooks_stub {
struct cds_list_head all_hooks;
char *scriptdir;
- glusterd_op_t op;
dict_t *op_ctx;
+ glusterd_op_t op;
} glusterd_hooks_stub_t;
diff --git a/xlators/mgmt/glusterd/src/glusterd-pmap.h b/xlators/mgmt/glusterd/src/glusterd-pmap.h
index ca063ed..51d7536 100644
--- a/xlators/mgmt/glusterd/src/glusterd-pmap.h
+++ b/xlators/mgmt/glusterd/src/glusterd-pmap.h
@@ -21,16 +21,16 @@
#include "rpcsvc.h"
struct pmap_port_status {
- gf_pmap_port_type_t type;
char *brickname;
void *xprt;
+ gf_pmap_port_type_t type;
};
struct pmap_registry {
+ struct pmap_port_status ports[GF_PORT_MAX + 1];
int base_port;
int max_port;
int last_alloc;
- struct pmap_port_status ports[GF_PORT_MAX + 1];
};
int
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.h b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.h
index c95e4cc..e15dbf5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.h
+++ b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.h
@@ -17,8 +17,8 @@ typedef struct glusterd_snapdsvc_ glusterd_snapdsvc_t;
struct glusterd_snapdsvc_ {
glusterd_svc_t svc;
- int port;
gf_store_handle_t *handle;
+ int port;
};
void
diff --git a/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.h b/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.h
index 4d96b3a..5daee99 100644
--- a/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.h
+++ b/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.h
@@ -49,17 +49,17 @@ struct glusterd_svc_proc_ {
};
struct glusterd_svc_ {
- char name[NAME_MAX];
glusterd_conn_t conn;
- glusterd_proc_t proc;
glusterd_svc_manager_t manager;
glusterd_svc_start_t start;
glusterd_svc_stop_t stop;
- gf_boolean_t online;
- gf_boolean_t inited;
glusterd_svc_reconfigure_t reconfigure;
glusterd_svc_proc_t *svc_proc;
struct cds_list_head mux_svc;
+ glusterd_proc_t proc;
+ char name[NAME_MAX];
+ gf_boolean_t online;
+ gf_boolean_t inited;
};
int