xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xenproject.org,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	wei.liu2@citrix.com
Subject: Re: [PATCH 2/4] libxl: vcpuset: Check max_vcpus argument against the maximum number of vCPUs the guest has set.
Date: Wed, 11 Mar 2015 10:56:36 +0000	[thread overview]
Message-ID: <1426071396.21353.173.camel@citrix.com> (raw)
In-Reply-To: <20150203154547.GG9371@l.oracle.com>

On Tue, 2015-02-03 at 10:45 -0500, Konrad Rzeszutek Wilk wrote:
> On Tue, Feb 03, 2015 at 03:11:11PM +0000, Ian Jackson wrote:
> > Konrad Rzeszutek Wilk writes ("[PATCH 2/4] libxl: vcpuset: Check max_vcpus argument against the maximum number of vCPUs the guest has set."):
> > > The maximum number of VCPUs the guest can have is determined during
> > > domain creation and is set by 'maxvcpus' parameter (in the guest
> > > config). Trying to set the amount of vCPUs above said value
> > > in vcpuset will result in an error - and we can catch it here
> > > (instead of later in the function) and print a nice warning to the user.
> > ...
> > > +    rc = libxl_domain_info(ctx, &dominfo, domid);
> > > +    if (rc == ERROR_INVAL) {
> > > +        fprintf(stderr, "Error: Domain %u does not exist.\n", domid);
> > > +        return -rc;
> > 
> > Do we really return ERROR_INVAL for this ?  ...   Looks like we do.
> > 
> > OK then, although we are definitely going to have to change that at
> > some point.  How tiresome.
> 
> I could add a new type - ERROR_NOTFOUND (of course as a seperate patch)
> and change all of the libxl_domain_info users to take advantage of that
> if you would like?

Sounds good (subject to anyone who wants to bikeshed the name). In
general we would like to move away from the catchall errors like
ERROR_INVAL (or, worse, ERROR_FAIL) towards more specific errors.

Ian.

  reply	other threads:[~2015-03-11 10:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 13:33 [PATCH v1] Misc fixes to libxl (v1) Konrad Rzeszutek Wilk
2014-06-04 13:33 ` [PATCH v1 1/2] libxl: give pciback a chance to do its teardown before we reset the device Konrad Rzeszutek Wilk
2014-06-05 10:58   ` Ian Campbell
2014-06-05 17:41     ` Konrad Rzeszutek Wilk
2014-06-05 17:56       ` Ian Jackson
2014-06-06  9:07         ` Ian Campbell
2014-06-04 13:33 ` [PATCH v1 2/2] libxl: vcpu-set - allow to decrease vcpu count on overcommitted guests (v2) Konrad Rzeszutek Wilk
2014-06-05 11:02   ` Ian Campbell
2014-06-05 17:44     ` Konrad Rzeszutek Wilk
2014-06-06  9:07       ` Ian Campbell
2015-02-02 20:47         ` Konrad Rzeszutek Wilk
2015-02-02 20:47           ` [PATCH 1/4] libxl: vcpuset: Return error values Konrad Rzeszutek Wilk
2015-02-03 11:29             ` Ian Jackson
2015-02-02 20:47           ` [PATCH 2/4] libxl: vcpuset: Check max_vcpus argument against the maximum number of vCPUs the guest has set Konrad Rzeszutek Wilk
2015-02-03 15:11             ` Ian Jackson
2015-02-03 15:45               ` Konrad Rzeszutek Wilk
2015-03-11 10:56                 ` Ian Campbell [this message]
2015-02-02 20:47           ` [PATCH 3/4] libxl: vcpuset: Remove useless limit on max_vcpus Konrad Rzeszutek Wilk
2015-02-02 20:47           ` [PATCH 4/4] libxl: vcpu-set - allow to decrease vcpu count on overcommitted guests (v3) Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426071396.21353.173.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).