[Libvir] [PATCH] Block device and network stats (version 2)

Daniel P. Berrange berrange at redhat.com
Tue Aug 21 13:34:57 UTC 2007


On Tue, Aug 21, 2007 at 09:06:08AM -0400, Daniel Veillard wrote:
> On Tue, Aug 21, 2007 at 01:26:14PM +0100, John Levon wrote:
> > On Tue, Aug 21, 2007 at 08:10:33AM -0400, Daniel Veillard wrote:
> > 
> > > > > The Xen impl as coded only works for disks named xvdN, because the code for
> > > > > calculating device ID assumes xvdN device numbering scheme:
> > > > > 
> > > > >     device = 202 * 256 + minor;
> > > > 
> > > > What's with device numbering at all? Must we really repeat this crazy
> > > > Linuxism from xend in libvirt :(
> > > 
> > >   Do you have an alternative ? Because this is commited in CVS and I 
> > > would like to get 0.3.2 rolled out ASAP ! So if you have a practical
> > > suggestion or a patch, please post it, I may delay the issue but
> > > just stating 'crazy Linuxism' without specifying why and how this can
> > > be fixed won't help.
> > 
> > I just checked it out, and it looks like it can be safely encapsulated
> > in this case. I was worried it would end up like xend but it seems we
> > can entirely wrap the knowledge of this to be Linux-only.
> 
>   Yeah we will need to #ifdef/#else on a per OS basis, which is not perfect
> but this is still workable, as long as the API is clean I don't have too
> much concerns.
> 
> > BTW I am a little concerned that we're re-implementing all this code
> > when libxenstat can do it. I already wrote this code once :)
> 
>   Ah :-) Well that's LGPL so we can probably reuse pieces of it. But
> I don't feel too confident relying on an installed Xen library at this
> point.

FYI, in case people didn't realize we can /use/ code from libxenstat. We 
can't link it though, because libxenstat links to libxc and thus the result
becomes GPL.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the libvir-list mailing list