Change in vdsm[ovirt-3.5]: gluster: Modification of logic for volume capacity calculation.

dnarayan at redhat.com dnarayan at redhat.com
Mon Aug 18 11:45:45 UTC 2014


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 <dnarayan at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/31451
Reviewed-by: Sahina Bose <sabose at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
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 <dnarayan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Sahina Bose <sabose at redhat.com>


More information about the vdsm-patches mailing list