summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2009-04-28 15:10:16 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-28 15:10:16 +0530
commit702affac485649f9509b1d6912e1a7737dbb23ca (patch)
tree6a9c304172881653a1c2895fce7d4cf15814993c /xlators/cluster/dht/src
parenta76ce13ce29249f4622fcfef39bcd087c1cd050a (diff)
dht logging cleanup
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r--xlators/cluster/dht/src/dht-common.c2
-rw-r--r--xlators/cluster/dht/src/dht-layout.c20
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c2
3 files changed, 14 insertions, 10 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 8f8d6d2a8a5..7c0c8f0581a 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -156,8 +156,6 @@ unlock:
local->layout = NULL;
if (ret != 0) {
- layout->gen = conf->gen;
-
gf_log (this->name, GF_LOG_DEBUG,
"fixing assignment on %s",
local->loc.path);
diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c
index 3f78ad31ae3..f2e3de14b6e 100644
--- a/xlators/cluster/dht/src/dht-layout.c
+++ b/xlators/cluster/dht/src/dht-layout.c
@@ -39,8 +39,11 @@ dht_layout_t *
dht_layout_new (xlator_t *this, int cnt)
{
dht_layout_t *layout = NULL;
+ dht_conf_t *conf = NULL;
+ conf = this->private;
+
layout = CALLOC (1, layout_size (cnt));
if (!layout) {
gf_log (this->name, GF_LOG_ERROR,
@@ -49,7 +52,8 @@ dht_layout_new (xlator_t *this, int cnt)
}
layout->cnt = cnt;
-
+ if (conf)
+ layout->gen = conf->gen;
out:
return layout;
}
@@ -257,7 +261,7 @@ dht_layout_merge (xlator_t *this, dht_layout_t *layout, xlator_t *subvol,
if (ret != 0) {
layout->list[i].err = -1;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"missing disk layout on %s. err = %d",
subvol->name, err);
ret = 0;
@@ -495,12 +499,14 @@ dht_layout_normalize (xlator_t *this, loc_t *loc, dht_layout_t *layout)
/* TODO During DHT selfheal rewrite (almost) find a better place to
* detect this - probably in dht_layout_anomalies()
*/
- if (layout->list[i].err == ENOENT) {
+ if (layout->list[i].err > 0) {
gf_log (this->name, GF_LOG_DEBUG,
- "path=%s ENOENT - directory entry"
- " should be created in selfheal", loc->path);
- ret = 1;
- break;
+ "path=%s err=%s on subvol=%s",
+ loc->path, strerror (layout->list[i].err),
+ (layout->list[i].xlator ?
+ layout->list[i].xlator->name : "<>"));
+ if (layout->list[i].err == ENOENT)
+ ret = 1;
}
}
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index 57b956ac390..df8b2047b2b 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -169,7 +169,7 @@ dht_selfheal_dir_xattr (call_frame_t *frame, loc_t *loc, dht_layout_t *layout)
missing_xattr++;
}
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"%d subvolumes missing xattr for %s",
missing_xattr, loc->path);