summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-09-30 11:41:07 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-30 11:19:28 -0700
commitda74288339563759f568aa5052fdce4c45ebcd22 (patch)
tree49c2f9eaa7131c45b864b7c073fb2d20615a9881 /libglusterfs/src/xlator.c
parentaf18c636c44b1ea56296850e55afe0e4b2ce845c (diff)
glusterfsd: perform init new graph if re-configure fails
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1235 (Bug for all pump/migrate commits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r--libglusterfs/src/xlator.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index a09dd2e1eb0..105ee497b17 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -921,6 +921,7 @@ xlator_reconfigure_rec (xlator_t *old_xl, xlator_t *new_xl)
{
xlator_list_t *trav1 = NULL;
xlator_list_t *trav2 = NULL;
+ int32_t ret = 0;
if (old_xl == NULL || new_xl == NULL) {
gf_log ("xlator", GF_LOG_DEBUG, "invalid argument");
@@ -931,7 +932,10 @@ xlator_reconfigure_rec (xlator_t *old_xl, xlator_t *new_xl)
trav2 = new_xl->children;
while (trav1 && trav2) {
- xlator_reconfigure_rec (trav1->xlator, trav2->xlator);
+ ret = xlator_reconfigure_rec (trav1->xlator, trav2->xlator);
+
+ if (ret)
+ goto out;
gf_log (trav1->xlator->name, GF_LOG_DEBUG, "reconfigured");
@@ -939,12 +943,16 @@ xlator_reconfigure_rec (xlator_t *old_xl, xlator_t *new_xl)
trav2 = trav2->next;
}
- if (old_xl->reconfigure)
- old_xl->reconfigure (old_xl, new_xl->options);
+ if (old_xl->reconfigure) {
+ ret = old_xl->reconfigure (old_xl, new_xl->options);
+ if (ret)
+ goto out;
+ }
else
gf_log (old_xl->name, GF_LOG_DEBUG, "No reconfigure() found");
- return 0;
+out:
+ return ret;
}
int