All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Dave Scott <Dave.Scott@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] libxl: stat the path for all non-qdisk backends (including unknown)
Date: Fri, 26 Apr 2013 16:29:52 +0200	[thread overview]
Message-ID: <517A8F60.9010107@citrix.com> (raw)
In-Reply-To: <1366985563-10926-1-git-send-email-ian.campbell@citrix.com>

On 26/04/13 16:12, Ian Campbell wrote:
> The commit a8a1f236a296 "libxl: Only call stat() when adding a disk if we
> expect a device to exist." changed things to only stat the file when the phy
> backend was explicitly requested. This broke the case where we are probing and
> would normally be able to decide on the phy option.
> 
> Since the intention of that commit was to allow for qdisk backends with no
> explicit file in dom0 (i.e. network remote backend such as ceph) the lowest
> impact fix appears to be to make that explicit. This should probably be
> revisited to rationalize the probing.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

But I think we should consider this as a band-aid. As said by Sylvain,
tap could also support backends that cannot be stated, and the backend
checks we have in libxl are rather fragile and hard to understand IMHO.

> Cc: dave.scott@citrix.com
> Cc: george.dunlap@citrix.com
> Cc: roger.pau@citrix.com
> Cc: ian.jackson@citrix.com
> ---
>  tools/libxl/libxl_device.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
> index eb60fd5..b01d109 100644
> --- a/tools/libxl/libxl_device.c
> +++ b/tools/libxl/libxl_device.c
> @@ -236,7 +236,7 @@ int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
>              return ERROR_INVAL;
>          }
>          memset(&a.stab, 0, sizeof(a.stab));
> -    } else if (disk->backend == LIBXL_DISK_BACKEND_PHY &&
> +    } else if (disk->backend != LIBXL_DISK_BACKEND_QDISK &&
>                 disk->backend_domid == LIBXL_TOOLSTACK_DOMID &&
>                 !disk->script) {
>          if (stat(disk->pdev_path, &a.stab)) {
> 

  parent reply	other threads:[~2013-04-26 14:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26 14:12 [PATCH] libxl: stat the path for all non-qdisk backends (including unknown) Ian Campbell
2013-04-26 14:17 ` Sylvain Munaut
2013-04-26 14:29   ` Ian Campbell
2013-04-26 14:39     ` Roger Pau Monné
2013-04-26 14:42       ` George Dunlap
2013-04-26 14:47         ` Ian Campbell
2013-04-26 15:33         ` Ian Campbell
2013-04-26 15:48           ` David Scott
2013-05-10 13:46     ` George Dunlap
2013-05-10 13:49       ` Ian Campbell
2013-05-10 13:55         ` George Dunlap
2013-05-10 14:09           ` Ian Campbell
2013-05-10 14:21             ` David Scott
2013-05-10 14:09       ` David Scott
2013-05-10 14:19         ` George Dunlap
2013-05-10 14:31           ` David Scott
2013-05-10 14:42             ` George Dunlap
2013-05-10 15:03               ` David Scott
2013-05-10 15:07                 ` George Dunlap
2013-05-10 15:09                 ` Ian Campbell
2013-04-26 14:29 ` Roger Pau Monné [this message]
2013-04-26 14:34   ` 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=517A8F60.9010107@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=Dave.Scott@eu.citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=ian.campbell@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 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.