From df9bfff8ea08176a3874fb0cdec8fd4b988d3ffa Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 31 Jul 2013 23:58:04 +0530 Subject: core: changes to support gfid-access Change-Id: I38d2fdc47e4b805deafca6805e54807976ffdb7e Signed-off-by: Amar Tumballi BUG: 952029 Reviewed-on: http://review.gluster.org/5496 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/graph.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'libglusterfs/src/graph.c') diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c index 8a84d4cbc16..1dba63fc052 100644 --- a/libglusterfs/src/graph.c +++ b/libglusterfs/src/graph.c @@ -213,6 +213,21 @@ glusterfs_graph_mac_compat (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx) return ret; } +int +glusterfs_graph_gfid_access (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx) +{ + int ret = 0; + cmd_args_t *cmd_args = NULL; + + cmd_args = &ctx->cmd_args; + + if (!cmd_args->aux_gfid_mount) + return 0; + + ret = glusterfs_graph_insert (graph, ctx, "features/gfid-access", + "gfid-access-autoload", 1); + return ret; +} static void gf_add_cmdline_options (glusterfs_graph_t *graph, cmd_args_t *cmd_args) @@ -441,6 +456,14 @@ glusterfs_graph_prepare (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx) return -1; } + /* XXX: gfid-access */ + ret = glusterfs_graph_gfid_access (graph, ctx); + if (ret) { + gf_log ("graph", GF_LOG_ERROR, + "glusterfs graph 'gfid-access' failed"); + return -1; + } + /* XXX: this->ctx setting */ for (trav = graph->first; trav; trav = trav->next) { trav->ctx = ctx; -- cgit