xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
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 v4 08/10] libxl: call hotplug scripts for disk devices from libxl
Date: Wed, 30 May 2012 12:33:34 +0100	[thread overview]
Message-ID: <4FC6058E.8080007@citrix.com> (raw)
In-Reply-To: <20420.57899.741924.469693@mariner.uk.xensource.com>

Ian Jackson wrote:
>> +    return;
>> +
>> +out:
>> +    libxl__ev_time_deregister(gc,&aodev->ev);
>> +    aodev->rc = rc;
>> +    aodev->callback(egc, aodev);
>> +    return;
>> +}
>
> Shouldn't something set aodev->state to FINISHED in this error path ?
>
> It might be better to have a helper function to call when declaring
> the aodev finished.  That helper function would also do the
> _ev_time_deregister, and assert !libxl__ev_child_inuse.

Setting the aodev to finished is always done in 
libxl__ao_device_check_last, which should be called by the user.

>
>> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
>> index 45b776c..da5b02b 100644
>> --- a/tools/libxl/libxl_internal.h
>> +++ b/tools/libxl/libxl_internal.h
> ...
>> +    /* device hotplug execution */
>> +    pid_t pid;
>> +    char *what;
>> +    libxl__ev_time ev;
>> +    libxl__ev_child child;
>
> Is the pid inside child not sufficient ?

Probably, I just wasn't sure if the user of libxl__ev_child was allowed 
to pick values inside the struct, now I saw the comment :)

  reply	other threads:[~2012-05-30 11:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 10:23 [PATCH v4 0/10] execute hotplug scripts from libxl Roger Pau Monne
2012-05-24 10:23 ` [PATCH v4 01/10] libxl: change libxl__ao_device_remove to libxl__ao_device Roger Pau Monne
2012-05-29 13:32   ` Ian Jackson
2012-05-30  8:43     ` Roger Pau Monne
2012-05-31 11:13       ` Ian Jackson
2012-05-24 10:23 ` [PATCH v4 02/10] libxl: move device model creation prototypes Roger Pau Monne
2012-05-24 10:23 ` [PATCH v4 03/10] libxl: convert libxl_domain_destroy to an async op Roger Pau Monne
2012-05-29 14:04   ` Ian Jackson
2012-05-24 10:23 ` [PATCH v4 04/10] libxl: convert libxl_device_disk_add to an asyn op Roger Pau Monne
2012-05-29 14:26   ` Ian Jackson
2012-05-29 14:40     ` Ian Campbell
2012-05-24 10:24 ` [PATCH v4 05/10] libxl: convert libxl_device_nic_add to an async operation Roger Pau Monne
2012-05-29 14:36   ` Ian Jackson
2012-05-30  9:54     ` Roger Pau Monne
2012-05-30 10:06       ` Ian Jackson
2012-05-24 10:24 ` [PATCH v4 06/10] libxl: add option to choose who executes hotplug scripts Roger Pau Monne
2012-05-29 14:38   ` Ian Jackson
2012-05-24 10:24 ` [PATCH v4 07/10] libxl: set nic type to VIF by default Roger Pau Monne
2012-05-24 10:24 ` [PATCH v4 08/10] libxl: call hotplug scripts for disk devices from libxl Roger Pau Monne
2012-05-25 15:13   ` Roger Pau Monne
2012-05-29 14:50   ` Ian Jackson
2012-05-30 11:33     ` Roger Pau Monne [this message]
2012-05-24 10:24 ` [PATCH v4 09/10] libxl: call hotplug scripts for nic " Roger Pau Monne
2012-05-29 14:57   ` Ian Jackson
2012-05-24 10:24 ` [PATCH v4 10/10] libxl: use libxl__xs_path_cleanup on device_destroy Roger Pau Monne
2012-05-29 14:58   ` Ian Jackson

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=4FC6058E.8080007@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).