diff options
Diffstat (limited to 'api/src/glfs-master.c')
| -rw-r--r-- | api/src/glfs-master.c | 11 | 
1 files changed, 11 insertions, 0 deletions
diff --git a/api/src/glfs-master.c b/api/src/glfs-master.c index 89017bab84d..edf9aae37e9 100644 --- a/api/src/glfs-master.c +++ b/api/src/glfs-master.c @@ -99,10 +99,21 @@ notify (xlator_t *this, int event, void *data, ...)  			graph->id);  		break;  	case GF_EVENT_CHILD_UP: +                pthread_mutex_lock (&fs->mutex); +                { +                        graph->used = 1; +                } +                pthread_mutex_unlock (&fs->mutex);  		graph_setup (fs, graph);  		glfs_init_done (fs, 0);  		break;  	case GF_EVENT_CHILD_DOWN: +                pthread_mutex_lock (&fs->mutex); +                { +                        graph->used = 0; +                        pthread_cond_broadcast (&fs->child_down_cond); +                } +                pthread_mutex_unlock (&fs->mutex);  		graph_setup (fs, graph);  		glfs_init_done (fs, 1);  		break;  | 
