Re: [Libvir] [PATCH] Add the message when a little memory is set with setmaxmem.

2007-03-22 Thread Daniel Veillard
On Thu, Mar 22, 2007 at 01:56:25PM +0900, Masayuki Sunou wrote: Hi The message which a cause of an error is hard to detect is displayed when virsh setmaxmem sets the maximum memory of an active domain less than Used Memory.

Re: [Libvir] [PATCH] virsh vcpupin guards CPU not existing.

2007-03-22 Thread Daniel Veillard
On Thu, Mar 22, 2007 at 03:14:29PM +0900, Masayuki Sunou wrote: Hi When CPU not existing is set to virsh vcpupin, CPU affinity is set to all CPU. Oh, right, not reporting and not exiting from the function at that point is clearly a bug ! Applied and commited to CVS, thanks a lot !

Re: [Libvir] Fix buffer overflow in dumping XML

2007-03-22 Thread Richard W.M. Jones
Daniel P. Berrange wrote: The new bufferContentAndFree() method used for the QEMU daemon rellocs the buffer size down to release memory held by the buffer which was never used for any data. Unfortunately it reallocs it 1 byte too small, so later uses of strlen()/strcpy() either magically work,

Re: [Libvir] [patch 1/5] iptables: fix invalid free

2007-03-22 Thread David Edmondson
On Wed, Mar 21, 2007 at 04:38:00PM +0100, Jim Meyering wrote: I interpret wrappers, above, to mean more than just a calloc-like wrapper. A malloc (not calloc, of course) wrapper that always initializes can mask what would have otherwise been a used-uninitialised error, and what would still

Re: [Libvir] [patch 1/5] iptables: fix invalid free

2007-03-22 Thread Jim Meyering
David Edmondson [EMAIL PROTECTED] wrote: On Wed, Mar 21, 2007 at 04:38:00PM +0100, Jim Meyering wrote: I interpret wrappers, above, to mean more than just a calloc-like wrapper. A malloc (not calloc, of course) wrapper that always initializes can mask what would have otherwise been a

Re: parted/LVM for ET [Re: [Libvir] Storage manager initial requirements and thoughts

2007-03-22 Thread Richard W.M. Jones
Richard W.M. Jones wrote: Richard W.M. Jones wrote: lvcreate -L 3G -n newroot raidvg lvcreate -L 1G -n newswap raidvg I should add, in a libvirt context it's probably going to be useful to also: * list available volume groups (vgscan) * list space available in each VG (vgdisplay

Re: [Libvir] [patch 1/5] iptables: fix invalid free

2007-03-22 Thread Mark McLoughlin
On Thu, 2007-03-22 at 12:22 +0100, Jim Meyering wrote: David Edmondson [EMAIL PROTECTED] wrote: On Wed, Mar 21, 2007 at 04:38:00PM +0100, Jim Meyering wrote: I interpret wrappers, above, to mean more than just a calloc-like wrapper. A malloc (not calloc, of course) wrapper that

Re: parted/LVM for ET [Re: [Libvir] Storage manager initial requirements and thoughts

2007-03-22 Thread David Edmondson
On Thu, Mar 22, 2007 at 11:22:21AM +, Richard W.M. Jones wrote: Secondly there is an API of sorts for lvm2. I think Alasdair called it libcmd, but maybe I got that wrong because Google doesn't seem to turn up anything. In any case, all it is is a wrapper around the command line tools,

Re: [Libvir] [patch 1/5] iptables: fix invalid free

2007-03-22 Thread Richard W.M. Jones
Daniel Veillard wrote: On Wed, Mar 21, 2007 at 01:55:35PM +, Mark McLoughlin wrote: - I think the use case is a little different - generally in libvirt, we're only allocating very small chunks where the CPU hit for initialisation would be negligible and would never show up on a

Re: [Libvir] [patch 1/5] iptables: fix invalid free

2007-03-22 Thread Daniel Veillard
On Thu, Mar 22, 2007 at 12:03:10PM +, Richard W.M. Jones wrote: pedant Note that neither calloc nor memset really work on unusual architectures where null pointers aren't represented by all-bits-zero. So code like: struct { void *ptr; } *s; s = malloc (sizeof (*s)); memset (s, 0,

Re: [Libvir] [patch 1/5] iptables: fix invalid free

2007-03-22 Thread Daniel Veillard
On Thu, Mar 22, 2007 at 12:22:13PM +0100, Jim Meyering wrote: David Edmondson [EMAIL PROTECTED] wrote: On Wed, Mar 21, 2007 at 04:38:00PM +0100, Jim Meyering wrote: I interpret wrappers, above, to mean more than just a calloc-like wrapper. A malloc (not calloc, of course) wrapper

Re: parted/LVM for ET [Re: [Libvir] Storage manager initial requirements and thoughts

2007-03-22 Thread Jim Meyering
Richard W.M. Jones [EMAIL PROTECTED] wrote: Secondly there is an API of sorts for lvm2. I think Alasdair called it libcmd, but maybe I got that wrong because Google doesn't seem to turn up anything. In any case, all it is is a wrapper around the command line tools, so it seems doubtful that

[Libvir] [PATCH] Xen capabilities does not detect PAE properly

2007-03-22 Thread Richard W.M. Jones
-- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/ 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421 [Negative numbers] darken the very whole doctrines of the equations and make dark of the things which are in their nature excessively obvious and simple (Francis

Re: [Libvir] [patch 1/5] iptables: fix invalid free

2007-03-22 Thread Daniel Veillard
On Wed, Mar 21, 2007 at 10:31:41AM -0400, Daniel Veillard wrote: On Wed, Mar 21, 2007 at 01:55:35PM +, Mark McLoughlin wrote: - I think the use case is a little different - generally in libvirt, we're only allocating very small chunks where the CPU hit for initialisation

Re: [Libvir] [patch 1/5] iptables: fix invalid free

2007-03-22 Thread Mark McLoughlin
On Thu, 2007-03-22 at 13:01 -0400, Daniel Veillard wrote: Index: qemud/iptables.c Hmm, this stuff is already in one of the patches I sent. -if (!(argv = (char **)malloc(sizeof(char *) * (n+1 +if (!(argv = (char **)calloc(1, sizeof(char *) * (n + 1 I'd do:

Re: [Libvir] [patch 1/5] iptables: fix invalid free

2007-03-22 Thread Daniel Veillard
On Thu, Mar 22, 2007 at 05:13:35PM +, Mark McLoughlin wrote: On Thu, 2007-03-22 at 13:01 -0400, Daniel Veillard wrote: Index: qemud/iptables.c Hmm, this stuff is already in one of the patches I sent. -if (!(argv = (char **)malloc(sizeof(char *) * (n+1 +if

Re: [Libvir] RFC [1/3]: Re-factor QEMU daemon protocol to use XDR

2007-03-22 Thread Daniel P. Berrange
First off we have the XDR definition file. This is basically a translation of the original qemud/protocol.h into the XDR format. The important changes are that - Instead of a single enum of message types there are now two enums - enum qemud_packet_client_data_type lists valid packets

Re: [Libvir] RFC [2/3]: Re-factor QEMU daemon protocol to use XDR

2007-03-22 Thread Daniel P. Berrange
This patch updates the client end to use XDR for making requests to the QEMU daemon. The bulk of the patch is basically a simple string replacement to deal with slightly different struct/union nesting names. The interesting bit of the code is that which actually converts from the