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

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



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

Attachment: signature.asc
Description: OpenPGP digital signature


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