summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2017-05-09 21:05:50 +0530
committerRaghavendra Talur <rtalur@redhat.com>2017-05-31 05:59:07 +0000
commitc49a2de9ad193c1de0b7f9db3f73d44c7555d3fb (patch)
tree81c9aed140b8056a665bceb91de08e1825ffcbc1 /libglusterfs
parent37bec170521e6bfa994648fad5ba2e3769a87628 (diff)
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. >Reviewed-on: https://review.gluster.org/17225 >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Smoke: Gluster Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> >(cherry picked from commit 86ad032949cb80b6ba3df9dc8268243529d4eb84) Change-Id: Ic341086adb3bbbde0342af518e1b273dd2f669b9 BUG: 1450728 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: https://review.gluster.org/17288 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/glusterfs.h4
-rw-r--r--libglusterfs/src/graph.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index 4f1f27b5857..bfc8eccb4ba 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -569,7 +569,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 916942c3a2d..4c67f5661ff 100644
--- a/libglusterfs/src/graph.c
+++ b/libglusterfs/src/graph.c
@@ -1032,7 +1032,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;
@@ -1069,7 +1070,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) {