From 86ad032949cb80b6ba3df9dc8268243529d4eb84 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Tue, 9 May 2017 21:05:50 +0530 Subject: glusterfsd: send PARENT_UP on brick attach With brick multiplexing being enabled, if a brick is instance attached to a process then a PARENT_UP event is needed so that it reaches right till posix layer and then from posix CHILD_UP event is sent back to all the children. Change-Id: Ic341086adb3bbbde0342af518e1b273dd2f669b9 BUG: 1447389 Signed-off-by: Atin Mukherjee Reviewed-on: https://review.gluster.org/17225 NetBSD-regression: NetBSD Build System Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- libglusterfs/src/glusterfs.h | 4 +++- libglusterfs/src/graph.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index 2e709b9d703..7eaeb0c7dbd 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -583,7 +583,9 @@ int glusterfs_graph_init (glusterfs_graph_t *graph); glusterfs_graph_t *glusterfs_graph_new (void); int glusterfs_graph_reconfigure (glusterfs_graph_t *oldgraph, glusterfs_graph_t *newgraph); -int glusterfs_graph_attach (glusterfs_graph_t *orig_graph, char *path); +int glusterfs_graph_attach (glusterfs_graph_t *orig_graph, char *path, + glusterfs_graph_t **newgraph); +int glusterfs_graph_parent_up (glusterfs_graph_t *graph); void gf_free_mig_locks (lock_migration_info_t *locks); diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c index 86d08f0e25b..11d2a0adf1e 100644 --- a/libglusterfs/src/graph.c +++ b/libglusterfs/src/graph.c @@ -1049,7 +1049,8 @@ out: int -glusterfs_graph_attach (glusterfs_graph_t *orig_graph, char *path) +glusterfs_graph_attach (glusterfs_graph_t *orig_graph, char *path, + glusterfs_graph_t **newgraph) { xlator_t *this = THIS; FILE *fp; @@ -1086,7 +1087,7 @@ glusterfs_graph_attach (glusterfs_graph_t *orig_graph, char *path) xl = FIRST_CHILD(xl); } graph->first = xl; - + *newgraph = graph; volfile_id = strstr (path, "/snaps/"); if (!volfile_id) { -- cgit