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] Re: Question on "xen-blkfront: handle Xen major numbers

To: Stefan Bader <stefan.bader@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: Question on "xen-blkfront: handle Xen major numbers other than XENVBD"
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 13 Jul 2011 14:20:40 +0100
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Wed, 13 Jul 2011 06:16:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E1D8C1C.1040200@xxxxxxxxxxxxx>
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>
References: <4E1D6A48.1020801@xxxxxxxxxxxxx> <alpine.DEB.2.00.1107131143440.12963@kaball-desktop> <1310554481.634.381.camel@xxxxxxxxxxxxxxxxxxxxxx> <4E1D8C1C.1040200@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Wed, 13 Jul 2011, Stefan Bader wrote:
> On 13.07.2011 12:54, Ian Campbell wrote:
> > On Wed, 2011-07-13 at 11:47 +0100, Stefano Stabellini wrote:
> >> On Wed, 13 Jul 2011, Stefan Bader wrote:
> >>> This is /me trying to understand the background of
> >>>
> >>> commit c80a420995e721099906607b07c09a24543b31d9
> >>> Author: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> >>> Date:   Thu Dec 2 17:55:00 2010 +0000
> >>>
> >>>     xen-blkfront: handle Xen major numbers other than XENVBD
> >>>
> >>> My guess would be that it has its reason from running HVM guests. The 
> >>> issue I in
> >>> some way hear in complaints is, that running as PVM guest (at least) 
> >>> people seem
> >>> to have used for example "sda1" in the instance configuration and then 
> >>> relied on
> >>> the device being called that way within the instance. Now it is suddenly 
> >>> called
> >>> "xvde1".
> >>> This is maybe a broken assumption in the first place, and not that hard 
> >>> to cope
> >>> with (its just surprising and maybe breaks some automation). I mainly 
> >>> want to
> >>> understand the reasoning, so I can explain it where I get asked.
> >>
> >> The rationale behind this is that it wouldn't be correct for
> >> xen-blkfront to "steal" the major number of the scsi, sata or ide
> >> subsystems.
> > 
> > It should be pointed out that the out of mainline "classic" PV Xen
> > patches do exactly that (although I at least have been discouraging the
> > use of this configuration for many years now). But it's not something we
> > felt would fly with upstream.
> > 
> > Ian.
> > 
> 
> It is certainly desirable not to take the major numbers from other subsystems.
> And it seems I was confused by switching between older and newer driver
> versions. So saying "sda1" in the configuration _was_ already converted into
> "xvda1" and it was using the major of xvd. The surprising change was in that
> case that "sda1" now converts into "xvde1" (and funnily "hda1" seems to become
> "xvda", not "xvda1"). Though I think this is required to have a sane mapping
> when people mix hdx and sdx in the configuration.

Actually this is a very tricky issue.

The problem is that if we translate "sda1" into "xvda1" then what
happens if a users specifies both "sda1" and "hda1"? Of course there is
going to be a conflict and the guest won't boot.
In order to avoid the problem, xen-blkfront starts naming pv disks
corresponding to "sd" disks from xvde onwards and pv disks corresponding
to "hd" disks from xvda onwards.

Initially we thought of naming pv disks corresponding to emulated disks
(both hd and sd) in a very unique way, so that they could never clash
with normal pv disks, something like xvdHDa1. However it was very
confusing to users so we decided to remove it and go for a simple
hda->xvda conversion. However the sda conversion remained 4 letters off
to avoid clashes with hda.
I guess we could remove that offset as well and make both hda and sda
correspond to xvda. Maybe easier to guess from the user POV but also
easier to create conflicts.

What do you think?

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

<Prev in Thread] Current Thread [Next in Thread>