Hello Dan Kenigsberg, Sahina Bose,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/31604

to review the following change.

Change subject: gluster: Modification of logic for volume capacity calculation.
......................................................................

gluster: Modification of logic for volume capacity calculation.

This patch modifies the logic for gluster volume capacity
computation. Earlier the volume capacity was calculated
wrt non root user. Now logic is modified to calculate
volume capacity wrt root user.

Change-Id: I044e37699d60d1eed2f95eb65189d949c5e4b594
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1129619
Signed-off-by: ndarshan <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/31451
Reviewed-by: Sahina Bose <[email protected]>
Reviewed-by: Dan Kenigsberg <[email protected]>
---
M vdsm/gluster/api.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/31604/1

diff --git a/vdsm/gluster/api.py b/vdsm/gluster/api.py
index 0e6c850..b9a08e5 100644
--- a/vdsm/gluster/api.py
+++ b/vdsm/gluster/api.py
@@ -205,8 +205,8 @@
                                                       replicaCount)
 
     def _computeVolumeStats(self, data):
-        total = (data.f_blocks - (data.f_bfree - data.f_bavail)) * data.f_bsize
-        free = data.f_bavail * data.f_bsize
+        total = data.f_blocks * data.f_bsize
+        free = data.f_bfree * data.f_bsize
         used = total - free
         return {'sizeTotal': str(total),
                 'sizeFree': str(free),


-- 
To view, visit http://gerrit.ovirt.org/31604
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I044e37699d60d1eed2f95eb65189d949c5e4b594
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Darshan N <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to