diff options
author | Susant Palai <spalai@redhat.com> | 2017-04-24 16:27:23 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-08-11 17:13:16 +0000 |
commit | 967171f76dc91bf23bc7853147975ac882881039 (patch) | |
tree | 916663c81d1d920e60490ece40f58f480c03408a | |
parent | 7daeae73d9edfa181f8e86394fb6dfc68b22440f (diff) |
cluster/dht: correct space check for rebalance
With rebalance doing fallocate on destination, we don't need to
add file size to the "destination available space" to decide whether
to migrate the file or not.
Notes: Fallocate would have already occupied the file size space on
destination
> Change-Id: If7f6a6654e6257726680cf20d618482a6e9095a6
> BUG: 1441508
> Signed-off-by: Susant Palai <spalai@redhat.com>
> Reviewed-on: https://review.gluster.org/17104
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Amar Tumballi <amarts@redhat.com>
> Reviewed-by: N Balachandran <nbalacha@redhat.com>
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
> Signed-off-by: Susant Palai <spalai@redhat.com>
Change-Id: If7f6a6654e6257726680cf20d618482a6e9095a6
BUG: 1473133
Signed-off-by: Susant Palai <spalai@redhat.com>
Reviewed-on: https://review.gluster.org/17833
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.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 117146b599c..65b4d329532 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -842,7 +842,7 @@ __dht_check_free_space (xlator_t *to, xlator_t *from, loc_t *loc, src_statfs_blocks = ((src_statfs.f_bavail * src_statfs.f_bsize) / GF_DISK_SECTOR_SIZE); - if ((dst_statfs_blocks - stbuf->ia_blocks) < + if ((dst_statfs_blocks) < (src_statfs_blocks + stbuf->ia_blocks)) { gf_msg (this->name, GF_LOG_WARNING, 0, |