From: Roger Pau Monne <roger.pau@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2 07/15] libxl: convert libxl_domain_destroy to an async op
Date: Wed, 23 May 2012 10:47:17 +0100 [thread overview]
Message-ID: <4FBCB225.3020507@citrix.com> (raw)
In-Reply-To: <20411.50812.100404.117424@mariner.uk.xensource.com>
Ian Jackson wrote:
>> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
>> index d2c013c..68d076c 100644
>> --- a/tools/libxl/libxl_internal.h
>> +++ b/tools/libxl/libxl_internal.h
> ...
>> +_hidden int libxl__ao_device_check_last(libxl__gc *gc, libxl__ao_device *device,
>> + libxl__ao_device *list, int num,
>> + int *last);
>> +
>
> This is a good helper but it could do with a doc comment explaining
> what it does.
>
> Just a suggestion: rather than this business with *last it might be
> easier to assign a magic error code, or use +1, for "not all done
> yet". (+1 would work since all actual libxl error codes are -ve).
> By my reading of the current interface the return value is not
> meaningful if *last==0 on output, which is the opposite of the usual
> way round.
This function currently returns two different things, the return value
returns the rc code of any operation that has failed, and the parameter
last marks if all device events are finished. Without the last
parameter, we won't be able to return the failed error code if all
devices had finished, since we had to return 0, so the error code would
be lost.
Since I think this is not really clear, I will split this function into
two different ones, one that checks if all devices are finished, and
another one that checks if some devices have reported errors.
next prev parent reply other threads:[~2012-05-23 9:47 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 14:02 [PATCH v2 0/15] execute hotplug scripts from libxl Roger Pau Monne
2012-05-22 14:02 ` [PATCH v2 01/15] libxl: pass env vars to libxl__exec Roger Pau Monne
2012-05-22 14:02 ` [PATCH v2 02/15] libxl: fix libxl__xs_directory usage of transaction Roger Pau Monne
2012-05-22 14:02 ` [PATCH v2 03/15] libxl: add libxl__xs_path_cleanup Roger Pau Monne
2012-05-22 14:19 ` Ian Jackson
2012-05-22 14:02 ` [PATCH v2 04/15] libxl: reoder libxl_device unplug functions Roger Pau Monne
2012-05-22 14:21 ` Ian Jackson
2012-05-22 14:02 ` [PATCH v2 05/15] libxl: change libxl__ao_device_remove to libxl__ao_device Roger Pau Monne
2012-05-22 15:10 ` Ian Jackson
2012-05-22 15:27 ` Ian Campbell
2012-05-22 16:23 ` Ian Jackson
2012-05-22 15:34 ` Roger Pau Monne
2012-05-22 15:55 ` Roger Pau Monne
2012-05-22 16:32 ` Ian Jackson
2012-05-22 14:02 ` [PATCH v2 06/15] libxl: move device model creation prototypes Roger Pau Monne
2012-05-22 15:10 ` Ian Jackson
2012-05-22 14:02 ` [PATCH v2 07/15] libxl: convert libxl_domain_destroy to an async op Roger Pau Monne
2012-05-22 14:11 ` Roger Pau Monne
2012-05-22 17:01 ` Ian Jackson
2012-05-22 17:30 ` Roger Pau Monne
2012-05-22 17:48 ` Ian Jackson
2012-05-23 9:47 ` Roger Pau Monne [this message]
2012-05-23 10:45 ` Ian Jackson
2012-05-22 14:02 ` [PATCH v2 08/15] libxl: convert libxl_device_disk_add to an asyn op Roger Pau Monne
2012-05-22 17:04 ` Ian Jackson
2012-05-22 14:02 ` [PATCH v2 09/15] libxl: convert libxl_device_nic_add to an async operation Roger Pau Monne
2012-05-22 17:06 ` Ian Jackson
2012-05-23 10:24 ` Roger Pau Monne
2012-05-22 14:02 ` [PATCH v2 10/15] libxl: add option to choose who executes hotplug scripts Roger Pau Monne
2012-05-22 17:13 ` Ian Jackson
2012-05-22 14:02 ` [PATCH v2 11/15] libxl: set nic type to VIF by default Roger Pau Monne
2012-05-22 14:02 ` [PATCH v2 12/15] libxl: call hotplug scripts for disk devices from libxl Roger Pau Monne
2012-05-22 17:40 ` Ian Jackson
2012-05-22 14:02 ` [PATCH v2 13/15] libxl: call hotplug scripts for nic " Roger Pau Monne
2012-05-22 17:45 ` Ian Jackson
2012-05-23 15:14 ` Roger Pau Monne
2012-05-22 14:02 ` [PATCH v2 14/15] libxl: use libxl__xs_path_cleanup on device_destroy Roger Pau Monne
2012-05-22 17:46 ` Ian Jackson
2012-05-22 14:02 ` [PATCH v2 15/15] libxl: add dummy netbsd functions Roger Pau Monne
2012-05-22 17:47 ` Ian Jackson
2012-05-22 17:47 ` Ian Jackson
2012-05-23 15:05 ` Roger Pau Monne
2012-05-23 10:07 ` [PATCH v2 0/15] execute hotplug scripts from libxl 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=4FBCB225.3020507@citrix.com \
--to=roger.pau@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.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).