summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index d5d9892b556..6b3e13b1afc 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -481,14 +481,16 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
if (down) {
gf_log (this->name, GF_LOG_DEBUG,
"%d subvolumes down -- not fixing", down);
- ret = 0;
+ ret = -1;
+ local->op_errno = ESTALE;
goto sorry_no_fix;
}
if (misc) {
gf_log (this->name, GF_LOG_DEBUG,
"%d subvolumes have unrecoverable errors", misc);
- ret = 0;
+ ret = -1;
+ local->op_errno = ESTALE;
goto sorry_no_fix;
}
@@ -498,6 +500,8 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
if (ret == -1) {
gf_log (this->name, GF_LOG_DEBUG,
"not able to form layout for the directory");
+ ret = -1;
+ local->op_errno = ESTALE;
goto sorry_no_fix;
}