WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Fix KB allocation in XendStorageRepository
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 02 Nov 2006 22:09:13 +0000
Delivery-date: Thu, 02 Nov 2006 21:42:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEND] Fix KB allocation in XendStorageRepository, Xen patchbot-unstable <=