From 8747925fb0847364be98afc2c2d59b42b2f8514c Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Thu, 1 Mar 2012 12:20:08 +0530 Subject: cluster/rebalance: Fix expression in check_free_space Migration should fail if available space in dst < src The expression was evaluating otherwise Change-Id: Ief64ad8797e405d0cdc787eef49bfbf4051dffac BUG: 798864 Signed-off-by: shishir gowda Reviewed-on: http://review.gluster.com/2847 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Vijay Bellur --- xlators/cluster/dht/src/dht-rebalance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src') diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index ecf664bb7..64249d0e0 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -345,7 +345,7 @@ __dht_check_free_space (xlator_t *to, xlator_t *from, loc_t *loc, goto out; } if (((dst_statfs.f_bavail * - dst_statfs.f_bsize) / GF_DISK_SECTOR_SIZE) > + dst_statfs.f_bsize) / GF_DISK_SECTOR_SIZE) < (((src_statfs.f_bavail * src_statfs.f_bsize) / GF_DISK_SECTOR_SIZE) - stbuf->ia_blocks)) { gf_log (this->name, GF_LOG_WARNING, -- cgit