summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/graph.c
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-07-08 05:44:05 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-08 05:24:50 -0700
commitf605883c4fe99428c560a18a1051693f7aadf84e (patch)
tree21ee55116f9ec7426fc9084c4f566e56e5cea230 /libglusterfs/src/graph.c
parent2233d7d3c54bf2fc7dc291ae19d8516b44f6e6af (diff)
fix up option handling
After 79241696, the following anomalies came up: - --mac-compat and --read-only was rejected originally on server side, 79241696 cancelled this check - direct I/O option handling was interfered by 79241696 - --mac-compat had no effect on Linux and does not compile on Mac Restore original behaviors. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'libglusterfs/src/graph.c')
-rw-r--r--libglusterfs/src/graph.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c
index a59b427bf..2609b7625 100644
--- a/libglusterfs/src/graph.c
+++ b/libglusterfs/src/graph.c
@@ -131,6 +131,14 @@ glusterfs_graph_insert (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx,
xlator_list_t *xlchild = NULL;
xlator_list_t *xlparent = NULL;
+ if (!ctx->master) {
+ gf_log ("glusterfs", GF_LOG_ERROR,
+ "volume \"%s\" can be added from command line only "
+ "on client side", type);
+
+ return -1;
+ }
+
ixl = GF_CALLOC (1, sizeof (*ixl), gf_common_mt_xlator_t);
if (!ixl)
return -1;
@@ -210,13 +218,11 @@ glusterfs_graph_mac_compat (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx)
cmd_args = &ctx->cmd_args;
-#ifdef GF_DARWIN_HOST_OS
- if (!cmd_args->mac_compat)
+ if (cmd_args->mac_compat == GF_OPTION_DISABLE)
return 0;
- ret = glusterfs_graph_insert (graph, ctx, ZR_XLATOR_MAC_COMPAT,
+ ret = glusterfs_graph_insert (graph, ctx, "features/mac-compat",
"mac-compat-autoload");
-#endif
return ret;
}