[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEND] Fix KB allocation in XendStorageRepository



# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Node ID 73cd81de36eaecb01e67e13ea17b27da2aa2b3f6
# Parent  7ae6323db2f8d35d9d8e99b6494da6e9ca47279b
[XEND] Fix KB allocation in XendStorageRepository

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendStorageRepository.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 7ae6323db2f8 -r 73cd81de36ea 
tools/python/xen/xend/XendStorageRepository.py
--- a/tools/python/xen/xend/XendStorageRepository.py    Thu Oct 19 17:48:54 
2006 +0100
+++ b/tools/python/xen/xend/XendStorageRepository.py    Fri Oct 20 13:33:55 
2006 +0100
@@ -32,7 +32,7 @@ XEND_STORAGE_QCOW_FILENAME = "%s.qcow"
 XEND_STORAGE_QCOW_FILENAME = "%s.qcow"
 XEND_STORAGE_IMG_FILENAME = "%s.img"
 XEND_STORAGE_VDICFG_FILENAME = "%s.vdi.xml"
-DF_COMMAND = "df -lP"
+DF_COMMAND = "df -lPk"
 QCOW_CREATE_COMMAND = "/usr/sbin/qcow-create %d %s %s"
 
 KB = 1024
@@ -167,8 +167,8 @@ class XendStorageRepository:
             words = line.split()
             mount_point = words[-1]
             dev_no = os.stat(mount_point).st_dev
-            free_blks = int(words[3])
-            devnum_free[dev_no] = free_blks
+            free_kb = int(words[3])
+            devnum_free[dev_no] = free_kb * KB
         return devnum_free
 
     def _get_free_space(self):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.