[libvirt] [PATCH] util: Error out if the numa nodeset is out of range

Eric Blake eblake at redhat.com
Wed Apr 24 15:17:36 UTC 2013


On 04/22/2013 01:14 AM, Osier Yang wrote:
> Instead of a silent warning, it's better to error out if the
> numa nodeset is out of range. Just like for numa node larger
> than NUMA_NUM_NODES.
> ---
>  src/util/virnuma.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)

ACK.

>      while ((i = virBitmapNextSetBit(tmp_nodemask, i)) >= 0) {
> -        if (i > NUMA_NUM_NODES) {
> +        if (i > maxnode || i > NUMA_NUM_NODES) {
>              virReportError(VIR_ERR_INTERNAL_ERROR,
> -                           _("Host cannot support NUMA node %d"), i);
> +                           _("Nodeset is out of range, host cannot support "
> +                             "NUMA node bigger than %d"), i);

I don't know if INTERNAL_ERROR is the best choice, but it is
pre-existing so it doesn't hold up this patch.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130424/8e522421/attachment-0001.sig>


More information about the libvir-list mailing list