From 74195df7a5bdc6ae9489d63a3b8157cbb2ddd8e2 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Wed, 21 Jul 2010 03:53:53 +0000 Subject: mount/fuse: disable fuse support from volfile glusterfsd: implement GETSPEC functionality to fetch volfiles from server Signed-off-by: Anand V. Avati Signed-off-by: Anand V. Avati BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971 --- libglusterfs/src/graph.c | 65 ------------------------------------------------ 1 file changed, 65 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c index a0c4c122fe7..4adb04a39c3 100644 --- a/libglusterfs/src/graph.c +++ b/libglusterfs/src/graph.c @@ -193,61 +193,6 @@ err: } -int -glusterfs_set_master (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx) -{ - xlator_t *trav = NULL; - xlator_list_t *chp = NULL, **chpp = NULL; - - for (trav = graph->first; trav; trav = trav->next) { - if (strcmp (trav->type, "mount/fuse") != 0) - continue; - - if (ctx->master) { - gf_log ("graph", GF_LOG_ERROR, - "there can be at most one fuse volume"); - - return -1; - } - - if (!trav->children || trav->children->next) { - gf_log ("graph", GF_LOG_ERROR, - "fuse volume not configured with exactly one " - "child"); - return -1; - } - - if (xlator_has_parent (trav)) { - gf_log ("graph", GF_LOG_ERROR, - "fuse volume cannot have parents"); - - return -1; - } - - ctx->master = trav; - if (trav == graph->top) - graph->top = trav->children->xlator; - for (chpp = &trav->children->xlator->parents; - *chpp; - chpp = &(*chpp)->next) { - if ((*chpp)->xlator == trav) { - chp = *chpp; - *chpp = chp->next; - GF_FREE (chp); - if (!*chpp) - break; - } - } - if (trav == graph->first) - graph->first = trav->next; - if (trav->prev) - trav->prev->next = trav->next; - } - - return 0; -} - - int glusterfs_graph_readonly (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx) { @@ -438,11 +383,6 @@ glusterfs_graph_settop (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx) for (trav = graph->first; trav; trav = trav->next) { if (strcmp (trav->name, volume_name) == 0) { - if (strcmp (trav->type, "mount/fuse") == 0) { - gf_log ("graph", GF_LOG_ERROR, - "fuse volume cannot be set as top"); - break; - } graph->top = trav; return 0; } @@ -488,11 +428,6 @@ glusterfs_graph_prepare (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx) if (ret) return -1; - /* XXX: take fuse from volfile */ - ret = glusterfs_set_master (graph, ctx); - if (ret) - return -1; - /* XXX: RO VOLUME */ ret = glusterfs_graph_readonly (graph, ctx); if (ret) -- cgit