From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= Subject: Re: [PATCH] libxl: stat the path for all non-qdisk backends (including unknown) Date: Fri, 26 Apr 2013 16:29:52 +0200 Message-ID: <517A8F60.9010107@citrix.com> References: <1366985563-10926-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1366985563-10926-1-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: George Dunlap , Ian Jackson , Dave Scott , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org 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 probin= g 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 lowe= st > impact fix appears to be to make that explicit. This should probably be > revisited to rationalize the probing. > = > Signed-off-by: Ian Campbell Acked-by: Roger Pau Monn=E9 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, lib= xl_device_disk *disk) { > return ERROR_INVAL; > } > memset(&a.stab, 0, sizeof(a.stab)); > - } else if (disk->backend =3D=3D LIBXL_DISK_BACKEND_PHY && > + } else if (disk->backend !=3D LIBXL_DISK_BACKEND_QDISK && > disk->backend_domid =3D=3D LIBXL_TOOLSTACK_DOMID && > !disk->script) { > if (stat(disk->pdev_path, &a.stab)) { > =