[libvirt] [PATCH 5/4] nodeinfo: support kernels that lack socket information

Viktor Mihajlovski mihajlov at linux.vnet.ibm.com
Fri Nov 16 16:42:56 UTC 2012


On 11/15/2012 04:38 PM, Eric Blake wrote:
> On RHEL 5, I was getting a segfault trying to start libvirtd,
> because we were failing virNodeParseSocket but not checking
> for errors, and then calling CPU_SET(-1, &sock_map) as a result.
> But if you don't have a topology/physical_package_id file,
> then you can just assume that the cpu belongs to socket 0.
>
> * src/nodeinfo.c (virNodeGetCpuValue): Change bool into
> default_value.
> (virNodeParseSocket): Allow for default value when file is missing,
> different from fatal error on reading file.
> (virNodeParseNode): Update call sites to fail on error.
> ---
>   src/nodeinfo.c | 29 ++++++++++++++++-------------
>   1 file changed, 16 insertions(+), 13 deletions(-)
>

Keeps the original good path behavior and provides a sound fallback.
Looks good to me, +1.

-- 

Mit freundlichen Grüßen/Kind Regards
    Viktor Mihajlovski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294




More information about the libvir-list mailing list