21ab4e
From 244f183f1a62c030dfc80eaa414c67835041ddac Mon Sep 17 00:00:00 2001
21ab4e
From: Susant Palai <spalai@redhat.com>
21ab4e
Date: Mon, 24 Apr 2017 16:27:23 +0530
21ab4e
Subject: [PATCH 463/473] cluster/dht: correct space check for rebalance
21ab4e
21ab4e
With rebalance doing fallocate on destination, we don't need to
21ab4e
add file size to the "destination available space" to decide whether
21ab4e
to migrate the file or not.
21ab4e
21ab4e
Notes: Fallocate would have already occupied the file size space on
21ab4e
destination
21ab4e
21ab4e
> Change-Id: If7f6a6654e6257726680cf20d618482a6e9095a6
21ab4e
> BUG: 1441508
21ab4e
> Signed-off-by: Susant Palai <spalai@redhat.com>
21ab4e
> Reviewed-on: https://review.gluster.org/17104
21ab4e
> Smoke: Gluster Build System <jenkins@build.gluster.org>
21ab4e
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
21ab4e
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
21ab4e
> Reviewed-by: Amar Tumballi <amarts@redhat.com>
21ab4e
> Reviewed-by: N Balachandran <nbalacha@redhat.com>
21ab4e
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
21ab4e
> Signed-off-by: Susant Palai <spalai@redhat.com>
21ab4e
21ab4e
Change-Id: If7f6a6654e6257726680cf20d618482a6e9095a6
21ab4e
BUG: 1452528
21ab4e
Signed-off-by: Susant Palai <spalai@redhat.com>
21ab4e
Reviewed-on: https://code.engineering.redhat.com/gerrit/106660
21ab4e
Reviewed-by: Nithya Balachandran <nbalacha@redhat.com>
21ab4e
---
21ab4e
 xlators/cluster/dht/src/dht-rebalance.c | 2 +-
21ab4e
 1 file changed, 1 insertion(+), 1 deletion(-)
21ab4e
21ab4e
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
21ab4e
index 507ca81..0bbe952 100644
21ab4e
--- a/xlators/cluster/dht/src/dht-rebalance.c
21ab4e
+++ b/xlators/cluster/dht/src/dht-rebalance.c
21ab4e
@@ -890,7 +890,7 @@ __dht_check_free_space (xlator_t *this, xlator_t *to, xlator_t *from, loc_t *loc
21ab4e
                 src_statfs_blocks = ((src_statfs.f_bavail *
21ab4e
                                       src_statfs.f_bsize) /
21ab4e
                                      GF_DISK_SECTOR_SIZE);
21ab4e
-                if ((dst_statfs_blocks - stbuf->ia_blocks) <
21ab4e
+                if ((dst_statfs_blocks) <
21ab4e
                     (src_statfs_blocks + stbuf->ia_blocks)) {
21ab4e
 
21ab4e
                         gf_msg (this->name, GF_LOG_WARNING, 0,
21ab4e
-- 
21ab4e
1.8.3.1
21ab4e