diff options
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/afr/src/afr-transaction.c | 2 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 2 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-selfheal.c | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index 4c85a4b0d03..92f68b91113 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -1401,7 +1401,7 @@ afr_lock_rec (call_frame_t *frame, xlator_t *this) case AFR_ENTRY_TRANSACTION: int_lock->lk_basename = local->transaction.basename; - if (&local->transaction.parent_loc) + if (local->transaction.parent_loc.path) int_lock->lk_loc = &local->transaction.parent_loc; else GF_ASSERT (local->fd); diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 22855b9425c..d9b52e28bb9 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -441,7 +441,7 @@ struct dht_conf { int *last_event; dht_layout_t **file_layouts; dht_layout_t **dir_layouts; - gf_boolean_t search_unhashed; + unsigned int search_unhashed; gf_boolean_t lookup_optimize; int gen; dht_du_t *du_stats; diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index d7ee74224c6..1eef4bdb59e 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -442,7 +442,9 @@ dht_distribution_type (xlator_t *this, dht_layout_t *layout) } range = layout->list[i].stop - layout->list[i].start; - diff = abs (range - start_range); + diff = (range >= start_range) + ? range - start_range + : start_range - range; if ((range != 0) && (diff > layout->cnt)) { type = GF_DHT_WEIGHTED_DISTRIBUTION; |