Re: [PATCH 1/8] Add new API virDomain{Set, Get}BlockIoTune

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

 



On 11/09/2011 01:32 PM, Lei Li wrote:
This patch add new pulic API virDomainSetBlockIoTune and
virDomainGetBlockIoTune.


Signed-off-by: Zhi Yong Wu<wuzhy@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Lei Li<lilei@xxxxxxxxxxxxxxxxxx>
---
  include/libvirt/libvirt.h.in |   26 +++++++++
  src/driver.h                 |   19 +++++++
  src/libvirt.c                |  115 ++++++++++++++++++++++++++++++++++++++++++
  src/libvirt_public.syms      |    2 +
  4 files changed, 162 insertions(+), 0 deletions(-)

diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index aa320b6..a79c35e 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -1640,6 +1640,32 @@ int    virDomainBlockJobSetSpeed(virDomainPtr dom, const char *path,
  int           virDomainBlockPull(virDomainPtr dom, const char *path,
                                   unsigned long bandwidth, unsigned int flags);

+/*
+ * Block I/O throttling support
+ */
+
+typedef struct _virDomainBlockIoTuneInfo virDomainBlockIoTuneInfo;
+struct _virDomainBlockIoTuneInfo {
+    unsigned long long total_bytes_sec;
+    unsigned long long read_bytes_sec;
+    unsigned long long write_bytes_sec;
+    unsigned long long total_iops_sec;
+    unsigned long long read_iops_sec;
+    unsigned long long write_iops_sec;
+};
+typedef virDomainBlockIoTuneInfo *virDomainBlockIoTuneInfoPtr;

This is not extensible. We've already learned the hard way that this MUST use virTypedParameter to make future additions painless, rather than hard-coding a particular structure.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]