All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>, xen-devel@lists.xenproject.org
Cc: Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH] libxl: locally attach disks with hotplug scripts for bootloader execution
Date: Thu, 25 Jun 2015 17:30:30 +0100	[thread overview]
Message-ID: <558C2CA6.9030609@eu.citrix.com> (raw)
In-Reply-To: <1435241865-82765-1-git-send-email-roger.pau@citrix.com>

On 06/25/2015 03:17 PM, Roger Pau Monne wrote:
> Or else bootloader execution fails. Tested using an iSCSI disk.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Reported-by: Hildebrand, Nils <Nils.Hildebrand@bva.bund.de>

Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
Tested-by: George Dunlap <george.dunlap@eu.citrix.com>

> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> ---
>  tools/libxl/libxl.c | 17 ++++++++++++-----
>  1 file changed, 12 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index 9117b01..6430836 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -3063,9 +3063,16 @@ void libxl__device_disk_local_initiate_attach(libxl__egc *egc,
>  
>      switch (disk->backend) {
>          case LIBXL_DISK_BACKEND_PHY:
> -            LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "locally attaching PHY disk %s",
> -                       disk->pdev_path);
> -            dev = disk->pdev_path;
> +            if (disk->script == NULL && disk->backend_domname == NULL) {
> +                LOG(DEBUG, "locally attaching PHY disk %s", disk->pdev_path);
> +                dev = disk->pdev_path;
> +            } else {
> +                libxl__prepare_ao_device(ao, &dls->aodev);
> +                dls->aodev.callback = local_device_attach_cb;
> +                device_disk_add(egc, LIBXL_TOOLSTACK_DOMID, disk, &dls->aodev,
> +                                libxl__alloc_vdev, (void *) blkdev_start);
> +                return;
> +            }
>              break;
>          case LIBXL_DISK_BACKEND_TAP:
>              switch (disk->format) {
> @@ -3142,7 +3149,7 @@ static void local_device_attach_cb(libxl__egc *egc, libxl__ao_device *aodev)
>      }
>  
>      dev = GCSPRINTF("/dev/%s", disk->vdev);
> -    LOG(DEBUG, "locally attaching qdisk %s", dev);
> +    LOG(DEBUG, "locally attaching disk %s", dev);
>  
>      rc = libxl__device_from_disk(gc, LIBXL_TOOLSTACK_DOMID, disk, &device);
>      if (rc < 0)
> @@ -3183,6 +3190,7 @@ void libxl__device_disk_local_initiate_detach(libxl__egc *egc,
>  
>      switch (disk->backend) {
>          case LIBXL_DISK_BACKEND_QDISK:
> +        case LIBXL_DISK_BACKEND_PHY:
>              if (disk->vdev != NULL) {
>                  GCNEW(device);
>                  rc = libxl__device_from_disk(gc, LIBXL_TOOLSTACK_DOMID,
> @@ -3199,7 +3207,6 @@ void libxl__device_disk_local_initiate_detach(libxl__egc *egc,
>              /* disk->vdev == NULL; fall through */
>          default:
>              /*
> -             * Nothing to do for PHYSTYPE_PHY.
>               * For other device types assume that the blktap2 process is
>               * needed by the soon to be started domain and do nothing.
>               */
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2015-06-25 16:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 14:17 [PATCH] libxl: locally attach disks with hotplug scripts for bootloader execution Roger Pau Monne
2015-06-25 16:30 ` George Dunlap [this message]
2015-06-25 17:22 ` George Dunlap
2015-06-29  8:35   ` Roger Pau Monné
2015-06-30 12:35   ` Ian Campbell
2015-06-30 14:15     ` George Dunlap
2015-06-30 12:31 ` Ian Campbell
2015-06-30 13:55   ` Roger Pau Monné

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=558C2CA6.9030609@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=roger.pau@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.