Bug 1533736

Summary: posix_statfs returns incorrect f_bfree values if brick is full.
Product: [Community] GlusterFS Reporter: Nithya Balachandran <nbalacha>
Component: posixAssignee: Nithya Balachandran <nbalacha>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-4.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-15 11:25:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nithya Balachandran 2018-01-12 05:18:22 UTC
Description of problem:


df -h output for a 1x(4+2) EC volume with all bricks full.

Filesystem             Size  Used Avail Use% Mounted on
337M  -11E     0 100% /mnt/glusterfs/0


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Nithya Balachandran 2018-01-12 05:20:49 UTC
In posix_statfs:

   ...                                                                             
        percent = priv->disk_reserve;                                           
        buf.f_bfree = (buf.f_bfree - ((buf.f_blocks * percent) / 100)); 

This becomes a negative value if buf.f_bfree is 0 (brick is full).

Comment 2 Worker Ant 2018-01-12 05:28:06 UTC
REVIEW: https://review.gluster.org/19186 (storage/posix: Set f_bfree to 0 if brick full) posted (#1) for review on master by N Balachandran

Comment 3 Worker Ant 2018-01-15 06:31:05 UTC
COMMIT: https://review.gluster.org/19186 committed in master by \"N Balachandran\" <nbalacha> with a commit message- storage/posix: Set f_bfree to 0 if brick full

Return 0 free blocks if the brick is full or
has less than the reserved limit.

Change-Id: I2c5feda0303d0f4abe5af22fac903011792b2dc8
BUG: 1533736
Signed-off-by: N Balachandran <nbalacha>

Comment 4 Shyamsundar 2018-03-15 11:25:40 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-4.0.0, please open a new bug report.

glusterfs-4.0.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/announce/2018-March/000092.html
[2] https://www.gluster.org/pipermail/gluster-users/