All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Scott <dave.scott@eu.citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel <xen-devel@lists.xen.org>
Subject: Re: libxl_device.c, stat() and remote disks
Date: Mon, 22 Apr 2013 17:54:30 +0100	[thread overview]
Message-ID: <51756B46.2000907@eu.citrix.com> (raw)
In-Reply-To: <1366641371.22143.68.camel@zakaz.uk.xensource.com>

On 22/04/13 15:36, Ian Campbell wrote:
> On Mon, 2013-04-22 at 15:07 +0100, David Scott wrote:
>> Is it safe to remove the stat() from libxl_device.c?
>
> I expect it only makes sense when backendtype=phy and perhaps the
> disk->script check has served as an imperfect surrogate for that until
> now?
>
> Does changing
>       } else if (!disk->script) {
> into
>       } else if (disk->backendtype == ...PHY && !disk->script) {
>
> Work for you also?

Yes, it works nicely against 4.2.1! The exact patch I applied was:

--- tools/libxl/libxl_device.c.orig     2013-04-22 14:52:54.745001092 +0000
+++ tools/libxl/libxl_device.c  2013-04-22 14:54:11.566001097 +0000
@@ -236,7 +236,7 @@
              return ERROR_INVAL;
          }
          memset(&a.stab, 0, sizeof(a.stab));
-    } else if (!disk->script) {
+    } else if (disk->backend == LIBXL_DISK_BACKEND_PHY && !disk->script) {
          if (stat(disk->pdev_path, &a.stab)) {
              LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Disk vdev=%s "
                               "failed to stat: %s",

Would you like me to retest this against -unstable? Also would you like 
me to 'git format-patch/send-email' or is it too trivial to bother?

Thanks,
Dave

  reply	other threads:[~2013-04-22 16:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 14:07 libxl_device.c, stat() and remote disks David Scott
2013-04-22 14:36 ` Ian Campbell
2013-04-22 16:54   ` David Scott [this message]
2013-04-22 17:03     ` 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=51756B46.2000907@eu.citrix.com \
    --to=dave.scott@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.