summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-09-22 03:32:15 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-22 04:14:19 -0700
commita4c948aca6058049523e31acf33ce5770f8693ad (patch)
tree104b328cce54710c9b6dd96da02042804ee61b41 /xlators
parent151c120908fbd8e18072a6e64a641911c307a51c (diff)
distribute: Return ESTALE when dir selfheal finds no fix
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1641 (Distribute must return error when dir selfheal has no fix) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1641
Diffstat (limited to 'xlators')
-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;
}