From d4ff4103e09ba076653aa6f0774269c47cc931f2 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Wed, 22 Feb 2012 19:38:14 +0530 Subject: glusterd: Modified server graph to have index xl above pump Index xlator needs a resolved inode in the incoming xattrop request to perform its indexing. In the case of replace-brick pump xlator doesn't resolve the inode in the (fop) requests it sends 'downwards', leading to null gfid sent to index xlator. Change-Id: I6b6e7af4354670616bf342292df1a25c219dd9e9 BUG: 796171 Signed-off-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.com/2801 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri --- xlators/mgmt/glusterd/src/glusterd-volgen.c | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index bc856bebf..f15f57edc 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1614,24 +1614,6 @@ server_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo, if (ret) return -1; - if (glusterd_is_volume_replicate (volinfo)) { - xl = volgen_graph_add (graph, "features/index", volname); - if (!xl) - return -1; - - snprintf (index_basepath, sizeof (index_basepath), "%s/%s", - path, ".glusterfs/indices"); - ret = xlator_set_option (xl, "index-base", index_basepath); - if (ret) - return -1; - - ret = check_and_add_debug_xl (graph, set_dict, volname, - "index"); - if (ret) - return -1; - - } - ret = dict_get_int32 (volinfo->dict, "enable-pump", &pump); if (ret == -ENOENT) ret = pump = 0; @@ -1682,6 +1664,24 @@ server_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo, return -1; } + if (glusterd_is_volume_replicate (volinfo)) { + xl = volgen_graph_add (graph, "features/index", volname); + if (!xl) + return -1; + + snprintf (index_basepath, sizeof (index_basepath), "%s/%s", + path, ".glusterfs/indices"); + ret = xlator_set_option (xl, "index-base", index_basepath); + if (ret) + return -1; + + ret = check_and_add_debug_xl (graph, set_dict, volname, + "index"); + if (ret) + return -1; + + } + xl = volgen_graph_add (graph, "features/marker", volname); if (!xl) return -1; -- cgit