diff options
author | Amar Tumballi <amar@gluster.com> | 2010-09-28 05:37:02 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-28 09:04:51 -0700 |
commit | 387f4d385e1d2c29af54c4f87eef7a07acfcfdf9 (patch) | |
tree | 22a63e2bac709e11329e76b445b1bd8739a12581 /libglusterfs/src/xlator.c | |
parent | 5ea64d983b31c6882d4582af71a339b6a4fcccf2 (diff) |
more proper error returns in case of graph topology validation
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@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/xlator.c')
-rw-r--r-- | libglusterfs/src/xlator.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index ef0808d5d87..a09dd2e1eb0 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -916,7 +916,7 @@ xlator_fini_rec (xlator_t *xl) } } -static void +static int xlator_reconfigure_rec (xlator_t *old_xl, xlator_t *new_xl) { xlator_list_t *trav1 = NULL; @@ -924,7 +924,7 @@ xlator_reconfigure_rec (xlator_t *old_xl, xlator_t *new_xl) if (old_xl == NULL || new_xl == NULL) { gf_log ("xlator", GF_LOG_DEBUG, "invalid argument"); - return; + return -1; } trav1 = old_xl->children; @@ -944,6 +944,7 @@ xlator_reconfigure_rec (xlator_t *old_xl, xlator_t *new_xl) else gf_log (old_xl->name, GF_LOG_DEBUG, "No reconfigure() found"); + return 0; } int @@ -1023,9 +1024,7 @@ xlator_tree_reconfigure (xlator_t *old_xl, xlator_t *new_xl) old_top = old_xl; new_top = new_xl; - xlator_reconfigure_rec (old_top, new_top); - - return 0; + return xlator_reconfigure_rec (old_top, new_top); } |