diff options
-rw-r--r-- | xlators/cluster/dht/src/dht-layout.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c index 08b4a2746f8..1ec2e6c2edc 100644 --- a/xlators/cluster/dht/src/dht-layout.c +++ b/xlators/cluster/dht/src/dht-layout.c @@ -425,6 +425,7 @@ int dht_layout_normalize (xlator_t *this, loc_t *loc, dht_layout_t *layout) { int ret = 0; + int i = 0; uint32_t holes = 0; uint32_t overlaps = 0; uint32_t missing = 0; @@ -462,6 +463,19 @@ dht_layout_normalize (xlator_t *this, loc_t *loc, dht_layout_t *layout) ret = 1; } + for (i = 0; i < layout->cnt; i++) { + /* TODO During DHT selfheal rewrite (almost) find a better place to + * detect this - probably in dht_layout_anomalies() + */ + if (layout->list[i].err == ENOENT) { + gf_log (this->name, GF_LOG_WARNING, + "path=%s ENOENT - directory entry" + " should be created in selfheal", loc->path); + ret = 1; + break; + } + } + out: return ret; } |