summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2009-03-18 17:10:51 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-03-19 02:22:20 +0530
commit103d82700483bf744f86719e97846b065ca3394c (patch)
tree2114ee490b13183bd5b2bf6739189d9a4ba63b54 /xlators/cluster/dht
parentb9fef00edbe7272d31be0ca22f3b2794918300e0 (diff)
dht_layout_dir_cmp - if xattr is missing, it is an error only if cached layout has entry for that subvolume.
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r--xlators/cluster/dht/src/dht-layout.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c
index 1515df69748..a45625876bd 100644
--- a/xlators/cluster/dht/src/dht-layout.c
+++ b/xlators/cluster/dht/src/dht-layout.c
@@ -512,7 +512,8 @@ dht_layout_dir_mismatch (xlator_t *this, dht_layout_t *layout, xlator_t *subvol,
{
int idx = 0;
int pos = -1;
- int ret = -1;
+ int ret = 0;
+ int err = 0;
int32_t *disk_layout = NULL;
int32_t count = -1;
uint32_t start_off = -1;
@@ -533,12 +534,16 @@ dht_layout_dir_mismatch (xlator_t *this, dht_layout_t *layout, xlator_t *subvol,
ret = 1;
goto out;
}
-
- if (xattr == NULL) {
- gf_log (this->name, GF_LOG_ERROR,
- "%s - xattr dictionary is NULL",
- loc->path);
- ret = -1;
+
+ err = layout->list[pos].err;
+
+ if (!xattr) {
+ if (err == 0) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "%s - xattr dictionary is NULL",
+ loc->path);
+ ret = -1;
+ }
goto out;
}
@@ -546,9 +551,11 @@ dht_layout_dir_mismatch (xlator_t *this, dht_layout_t *layout, xlator_t *subvol,
VOID(&disk_layout));
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR,
- "%s - disk layout missing", loc->path);
- ret = -1;
+ if (err == 0) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "%s - disk layout missing", loc->path);
+ ret = -1;
+ }
goto out;
}
@@ -566,7 +573,7 @@ dht_layout_dir_mismatch (xlator_t *this, dht_layout_t *layout, xlator_t *subvol,
if ((layout->list[pos].start != start_off)
|| (layout->list[pos].stop != stop_off)) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_WARNING,
"subvol: %s; inode layout - %"PRId32" - %"PRId32"; "
"disk layout - %"PRId32" - %"PRId32,
layout->list[pos].xlator->name,