summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-layout.c
diff options
context:
space:
mode:
authorVarun Shastry <vshastry@redhat.com>2013-12-02 15:49:58 +0530
committerVijay Bellur <vbellur@redhat.com>2014-01-22 21:39:57 -0800
commit6c9fe8fa8896c5f4fbe8c9bac6c2c7f9add92a0b (patch)
treef9e5c595e8deb1c8194e11bfadef4cc4a0c7c6f7 /xlators/cluster/dht/src/dht-layout.c
parent7bea98fa5845ced670d7bb2d9b1336c03855a798 (diff)
cluster/dht: Set quota limit key in dht_selfheal of dirs.
Also fixed check in dht_is_subvol_in_layout to check if the layouts are zero'ed out. Change-Id: I4bf8ebf66d3ef1946309b6c9aac9e79bf8a6d495 BUG: 969461 Signed-off-by: shishir gowda <sgowda@redhat.com> Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/6392 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-layout.c')
-rw-r--r--xlators/cluster/dht/src/dht-layout.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c
index f7413c8a0bd..1e38d6be15a 100644
--- a/xlators/cluster/dht/src/dht-layout.c
+++ b/xlators/cluster/dht/src/dht-layout.c
@@ -443,8 +443,13 @@ dht_is_subvol_in_layout (dht_layout_t *layout, xlator_t *xlator)
int i = 0;
for (i = 0; i < layout->cnt; i++) {
- if (!strcmp (layout->list[i].xlator->name, xlator->name))
- return _gf_true;
+ /* Check if xlator is already part of layout, and layout is
+ * non-zero. */
+ if (!strcmp (layout->list[i].xlator->name, xlator->name)) {
+ if (layout->list[i].start != layout->list[i].stop)
+ return _gf_true;
+ break;
+ }
}
return _gf_false;
}