diff options
Diffstat (limited to 'xlators/cluster/dht/src/dht-layout.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-layout.c | 9 |
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; } |