WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] vscsi and symlinks

To: James Harper <james.harper@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] vscsi and symlinks
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Mon, 7 Feb 2011 08:51:17 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 07 Feb 2011 00:52:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D01C55267@trantor>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <AEC6C66638C05B468B556EA548C1A77D01C55267@trantor>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2011-02-07 at 01:24 +0000, James Harper wrote:
> By default, vscsi expects to be passed the final device name (eg
> /dev/st3) instead of one of the various udev symlinks (eg
> /dev/tape/by-path/pci-0000:01:08.0-scsi-0:0:2:0-st). The following patch
> resolves the path to the real path if the name starts with /dev/

This needs a signed-off-by.

> James
> 
> --- a/tools/python/xen/util/vscsi_util.py  2010-12-03 23:26:46.391655087
> +1100
> +++ b/tools/python/xen/util/vscsi_util.py  2011-02-07 12:20:37.599527204
> +1100
> @@ -158,6 +158,8 @@
> 
> 
>  def vscsi_get_hctl_and_devname_by(target, scsi_devices = None):
> +    if target.startswith('/dev/'):
> +        target = os.path.realpath(target)

Any reason not to just unconditionally resolve symlinks in every target
to the underlying device?

Thanks,
Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel