From 4cde70a0e5be0a5e49e42c48365f3c0b205f9741 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Mon, 17 Jun 2013 06:19:47 -0700 Subject: glusterfsd: consider xlator type too in topology check When cluster.nufa option is enabled, we only change the translator type, but leave the translator name as-is. This results in the topology change check to conclude that a graph switch is not needed. Change-Id: I4f4d0cec2bd4796c95274f0328584a4e7b8b5cd3 BUG: 975599 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.org/5244 Reviewed-by: Krishnan Parthasarathi Tested-by: Gluster Build System Reviewed-by: Raghavendra Bhat --- glusterfsd/src/glusterfsd-mgmt.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 873844f554b..d2a95a64bb3 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -1366,6 +1366,15 @@ xlator_equal_rec (xlator_t *xl1, xlator_t *xl2) ret = -1; goto out; } + + /* type could have changed even if xlator names match, + e.g cluster/distrubte and cluster/nufa share the same + xlator name + */ + if (strcmp (xl1->type, xl2->type)) { + ret = -1; + goto out; + } out : return ret; } -- cgit