summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/glusterfs/glusterfs.h
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-03-25 19:07:16 +0200
committerAmar Tumballi <amarts@redhat.com>2019-04-15 02:25:26 +0000
commita67929e18a39d5c79a4a7e2b78015523626a367e (patch)
treecee5cbfb669df65699d932b2f8944ff28f0a7e7c /libglusterfs/src/glusterfs/glusterfs.h
parentc56f102da21c5b69e656a055aaf736281596284d (diff)
graph.c: remove extra gettimeofday() - reuse the graph dob.
It was written just before fill_void() call. Note that there was a possible overflow if the hostname was too long (unrelated to this patch), but it is now also fixed, as we use a smaller buffer for the hostname. This, in turn, forces us to check if gethostname() failed and add explicitly the terminating null to it. Change-Id: I45fbc0a8e105f1247f3cbf61befac06fabbaea06 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'libglusterfs/src/glusterfs/glusterfs.h')
-rw-r--r--libglusterfs/src/glusterfs/glusterfs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/glusterfs/glusterfs.h b/libglusterfs/src/glusterfs/glusterfs.h
index 209bb41307d..cdb6d97eec1 100644
--- a/libglusterfs/src/glusterfs/glusterfs.h
+++ b/libglusterfs/src/glusterfs/glusterfs.h
@@ -586,20 +586,20 @@ typedef struct _cmd_args cmd_args_t;
struct _glusterfs_graph {
struct list_head list;
- char graph_uuid[128];
struct timeval dob;
void *first;
void *top; /* selected by -n */
- uint32_t leaf_count;
int xl_count;
int id; /* Used in logging */
int used; /* Should be set when fuse gets
first CHILD_UP */
uint32_t volfile_checksum;
+ uint32_t leaf_count;
void *last_xl; /* Stores the last xl of the graph, as of now only populated
in client multiplexed code path */
pthread_mutex_t mutex;
pthread_cond_t child_down_cond; /* for broadcasting CHILD_DOWN */
+ char graph_uuid[128];
};
typedef struct _glusterfs_graph glusterfs_graph_t;