diff options
| author | Susant Palai <spalai@redhat.com> | 2017-07-26 17:12:03 +0530 |
|---|---|---|
| committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-08-02 15:05:06 +0000 |
| commit | 87edff6e20ff3ff7bc1dc5a1b0186127effee364 (patch) | |
| tree | 0f33e49a7953d5d777640774e36e2b8ae43a7239 /xlators/nfs/server/src | |
| parent | 64391ea321d269671814afd13cbdfe099b893e4d (diff) | |
cluster/dht: rebalance min-free-disk fix
To calculate available space on a subvolume we used to do
the following in __dht_check_free_space.
post_availspace = (dst_statfs.f_bavail * dst_statfs.f_frsize) - stbuf->ia_size
Now to subtracting the file size from available space is tricky here.
Sometime available space will be lesser than the file size and since all the
participating members in calculation are unsigned int, the result is a large
number (integer overflow).
Solution: We do not need to subtract the file size from the space available,
since fallocate would have reserved file size space already.
> Change-Id: I4f724358c44b9911933742ff3ff8d55b3dfda1cb
> BUG: 1475282
> Signed-off-by: Susant Palai <spalai@redhat.com>
> Reviewed-on: https://review.gluster.org/17876
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
> Reviewed-by: N Balachandran <nbalacha@redhat.com>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Signed-off-by: Susant Palai <spalai@redhat.com>
Change-Id: I4f724358c44b9911933742ff3ff8d55b3dfda1cb
BUG: 1477152
Signed-off-by: Susant Palai <spalai@redhat.com>
Reviewed-on: https://review.gluster.org/17942
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/nfs/server/src')
0 files changed, 0 insertions, 0 deletions
