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

Re: [libvirt] [PATCH 8/8] latency: Update cmdBlkStats to use new API



On 09/02/2011 05:34 AM, Daniel Veillard wrote:
On Fri, Sep 02, 2011 at 07:23:38PM +0800, Osier Yang wrote:
于 2011年09月02日 18:21, Daniel Veillard 写道:
On Wed, Aug 31, 2011 at 04:26:13PM +0800, Osier Yang wrote:
The modified function fallbacks to use virDomainBlockStats if
virDomainBlockStatsFlags is not supported by the hypervisor driver.
If the new API is supported, it will be invoked instead of the
old API.
   Again I would use a new command and keep the existing code
as is,

Daniel


What does "again" here mean? as I couldn't find another place which
introduce new code. :-)

   Well I would not modify cmdDomblkstat and instead create a new command
and a new function for the new API

And per the new API has some same fields with old API, and seems
all of virsh commands try to fallback to old API if new API is introduced.

  yes but the new API will provide informations in a different order
and is potentially more expensive, so I'm not sure I really want to use
the new API for the old command
  Maybe something like "domblkfullstat"...

  But if someone else disagrees with me I'm fine being in the minority :-)

Personally, I'd like to keep a single virsh command for both APIs, just like 'virsh migrate' handles both virDomainMigrate and virDomainMigrate2. I don't know if it's better to default to the old or the new API, but it is easy enough to provide a flag that swaps the default to call the alternate API.

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


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