From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Ian Jackson <Ian.Jackson@citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Stefano Stabellini <Stefano.Stabellini@citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v2 2/5] libxl: vcpuset: Return error values.
Date: Wed, 18 Mar 2015 10:15:11 -0400 [thread overview]
Message-ID: <20150318141510.GG13965@x230.dumpdata.com> (raw)
In-Reply-To: <1426687747.2560.27.camel@citrix.com>
On Wed, Mar 18, 2015 at 02:09:09PM +0000, Dario Faggioli wrote:
> On Wed, 2015-03-18 at 13:08 +0000, Ian Campbell wrote:
> > On Wed, 2015-03-18 at 13:06 +0000, Ian Campbell wrote:
> > > On Fri, 2015-03-13 at 16:26 -0400, Konrad Rzeszutek Wilk wrote:
> > > > The function does not return any values at all. Convert the
> > > > internal libxl ones (ERROR_FAIL, ..., etc) to positive values
> > > > and for the other cases just return standard libxl values.
> > >
> > > It's not clear why you want to do this, in particular returning
> > > -ERROR_INVAL and inverting libxl error codes seems like a very strange
> > > thing to be doing.
> >
> > BTW I know the xl error handling is horribly confused, and there are
> > even a small number of instances of -ERROR_* already, but I think those
> > are wrong and we shouldn't introduce more.
> >
> Indeed. I did some xl error code refactoring for a series of mine a few
> days back, and as far as I could see, the most common pattern in xl is
> returning 0 or 1.
Gah, I seem to have looked at the wrong examples and thought that was
the proper way!
>
> FWIW, I think we should not diverge any further from that and, at some
> point, convert 0/1 to EXIT_SUCCESS/EXIT_FAILURE.
>
> > > I think you should either use ERROR_INVAL (not inverted) and propagate
> > > libxl rc's directly or convert them into something which suits xl, i.e.
> > > 0 and 1.
> > >
> Again, +1 for 0 or 1.
>
> Regards,
> Dario
next prev parent reply other threads:[~2015-03-18 14:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 20:26 [PATCH v2] Fix xl vcpu-set to decrease amount of vCPUS without warnining Konrad Rzeszutek Wilk
2015-03-13 20:26 ` [PATCH v2 1/5] libxl: Add ERROR_NOTFOUND for libxl_domain_info when it cannot find the domain Konrad Rzeszutek Wilk
2015-03-18 13:03 ` Ian Campbell
2015-03-13 20:26 ` [PATCH v2 2/5] libxl: vcpuset: Return error values Konrad Rzeszutek Wilk
2015-03-18 13:06 ` Ian Campbell
2015-03-18 13:08 ` Ian Campbell
2015-03-18 14:09 ` Dario Faggioli
2015-03-18 14:15 ` Konrad Rzeszutek Wilk [this message]
2015-03-18 13:37 ` Konrad Rzeszutek Wilk
2015-03-13 20:26 ` [PATCH v2 3/5] libxl: vcpuset: Check max_vcpus argument against the maximum number of vCPUs the guest has set Konrad Rzeszutek Wilk
2015-03-18 13:11 ` Ian Campbell
2015-03-13 20:26 ` [PATCH v2 4/5] libxl: vcpuset: Remove useless limit on max_vcpus Konrad Rzeszutek Wilk
2015-03-18 13:13 ` Ian Campbell
2015-03-13 20:26 ` [PATCH v2 5/5] libxl: vcpu-set - allow to decrease vcpu count on overcommitted guests (v3) Konrad Rzeszutek Wilk
2015-03-18 13:15 ` Ian Campbell
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=20150318141510.GG13965@x230.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@citrix.com \
--cc=Stefano.Stabellini@citrix.com \
--cc=dario.faggioli@citrix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.