Bug 1533736 - posix_statfs returns incorrect f_bfree values if brick is full.
Summary: posix_statfs returns incorrect f_bfree values if brick is full.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: posix
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nithya Balachandran
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-12 05:18 UTC by Nithya Balachandran
Modified: 2018-03-15 11:25 UTC (History)
1 user (show)

Fixed In Version: glusterfs-4.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-15 11:25:40 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

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/


Note You need to log in before you can comment on or make changes to this bug.