diff options
author | shishir gowda <shishirng@gluster.com> | 2012-03-01 12:20:08 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-02-29 23:25:50 -0800 |
commit | 8747925fb0847364be98afc2c2d59b42b2f8514c (patch) | |
tree | 9f8813259b3ab4a5f3c07ac6e2a3be07db2ef53a | |
parent | 6c4b8d02db7b47d67a306a71a72bcc016fbdf183 (diff) |
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 <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/2847
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index ecf664bb7c4..64249d0e06a 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, |