From: Stefan Bader <stefan.bader@canonical.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: John Haxby <john.haxby@oracle.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: Re: Question on "xen-blkfront: handle Xen major numbers other than XENVBD"
Date: Thu, 14 Jul 2011 17:01:44 +0200 [thread overview]
Message-ID: <4E1F04D8.6060603@canonical.com> (raw)
In-Reply-To: <1310652889.634.541.camel@zakaz.uk.xensource.com>
On 14.07.2011 16:14, Ian Campbell wrote:
> On Thu, 2011-07-14 at 14:26 +0100, Stefan Bader wrote:
>> On 13.07.2011 19:25, John Haxby wrote:
>>> On 13/07/11 17:19, Stefan Bader wrote:
>>>>
>>>> So for HVM they would be called hda in the cfg but sda in the domU.
>>>
>>> Something like this caused a lot of confusion for folks around here:
>>> they were expecting the _name_ used in the cfg to be the name in the
>>> guest, ignoring the fact that neither hdX, xvdX nor sdX ever appear in a
>>> Windows HVM. Or indeed that, IDE, SCSI and SATA disks are all called
>>> sdX nowadays.
>>>
>>> As Stefan said, the name actually only tells you what sort of emulated
>>> controller the disk is attached to: hd for IDE, sd for SCSI and xvd for
>>> PV disks (no actual controller as such). It might have been better to
>>> have things like IDE(0,0), SCSI(0,3) and XVD(0) and let the guest OS
>>> decide how to map those to names, much like it does for real hardware.
>>>
>>
>> That seems to be the sad root of the story. If it wasn't for the fact that some
>> naming convention (related to some real kernel names) gets translated into
>> (emulated) physical connections and the fact that the xvd driver did lie to the
>> domU (by using a IDE or SCSI major and name), there would be no need to meddle
>> around it. The faking major,minor,name thing probably was required in the
>> beginning when there was no other thing than hd* and sd*...
>>
>> I will post a few patches as replies to this email, one to turn off the offset
>> and two other things I believe are wrong. But please, better check whether I am
>> really right there.
>>
>> For future resolve of this issue, my feeling would be that a naming scheme of
>> xvsd*, for emulated scsi and xvhd* for emulated ide and xvd* for devices likely
>> would mean some confusion. Still it sounds like, after a bit of education, the
>> concept of how names get translated between the cfg and the guest should be
>> simpler to grasp.
>
> Have you seen docs/misc/vbd-interface.txt? It clarifies (or at least
> tries to) some of this stuff. If there are things which could be
> improved (esp. from the end-user perspective) there then patches would
> be gratefully accepted.
>
No, I must admit I had not (as my approach is is more from the kernel side). But
thanks for pointing towards that. I will have a read there.
>> In theory the minor numbers could be even dynamically allocated, but I guess
>> minors of partitions should always be an offset of the base device and minors of
>> devices in the same namespace should also be in a way sorted. So maybe a range
>> of minor numbers reserved for the ide emulated, one for the scsi emulated and
>> the rest for devices defined as virtual ones sounds like a simple approach.
>> Anyway, that is just my loud thinking. And maybe not completely thought through.
>>
>> One other way would be to stop allowing ide or scsi disk names for defining
>> disks of the virtual controller... Though that might be a bit radical after
>> allowing it for so long.
>
> Personally I think it would be great but I don't think its feasible.
> I've been trying to encourage the use of xvd* for years :-/.
>
Unfortunately its always hard to convince people if something seems to work. And
it can be hard to argue people are wrong when they complain about the latest
change of preserving xvda-d for hd* mapping in 3.0. :(
-Stefan
> Ian.
>
>>
>> -Stefan
>>
>>> jch
>>>
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@lists.xensource.com
>>> http://lists.xensource.com/xen-devel
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-07-14 15:01 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 9:50 Question on "xen-blkfront: handle Xen major numbers other than XENVBD" Stefan Bader
2011-07-13 10:47 ` Stefano Stabellini
2011-07-13 10:54 ` Ian Campbell
2011-07-13 12:14 ` Stefan Bader
2011-07-13 13:20 ` Stefano Stabellini
2011-07-13 13:45 ` Stefan Bader
2011-07-13 15:34 ` Stefano Stabellini
2011-07-13 16:19 ` Stefan Bader
2011-07-13 17:03 ` Stefano Stabellini
2011-07-13 17:25 ` John Haxby
2011-07-14 13:26 ` Stefan Bader
2011-07-14 13:30 ` [PATCH 1/3] xen-blkfront: Drop name and minor adjustments for emulated scsi devices Stefan Bader
2011-07-14 17:32 ` Stefano Stabellini
2011-07-14 13:30 ` [PATCH 2/3] xen-blkfront: Fix one off warning about name clash Stefan Bader
2011-07-14 17:33 ` Stefano Stabellini
2011-07-14 13:30 ` [PATCH 3/3] xen-blkfront: Fix minor offset calculation for emulated IDE disks Stefan Bader
2011-07-14 17:34 ` Stefano Stabellini
2011-07-15 6:23 ` Stefan Bader
2011-07-15 10:20 ` Stefano Stabellini
2011-07-15 10:41 ` Stefan Bader
2011-07-19 13:22 ` Konrad Rzeszutek Wilk
2011-07-19 16:22 ` Problem with Xen 4.1 on Ubuntu 11.10 ( Oneiric Ocelot) (HVM DomUs crash) Boris Derzhavets
2011-07-19 17:09 ` Konrad Rzeszutek Wilk
2011-07-19 17:57 ` Boris Derzhavets
2011-07-19 17:22 ` Stefano Stabellini
2011-07-19 18:01 ` Stefano Stabellini
2011-07-19 19:01 ` Boris Derzhavets
2011-07-20 8:19 ` Ian Campbell
2011-07-20 8:24 ` Boris Derzhavets
2011-07-20 10:45 ` Stefano Stabellini
2011-07-20 12:07 ` Boris Derzhavets
2011-07-20 12:11 ` Boris Derzhavets
2011-07-20 12:44 ` Stefan Bader
2011-07-20 15:03 ` Keir Fraser
2011-07-20 15:57 ` Boris Derzhavets
2011-07-20 15:59 ` Ian Campbell
2011-07-23 17:45 ` Boris Derzhavets
2011-07-28 17:58 ` Attempt to backport changeset-23088, changeset-23089 to Xen 4.1.1 Boris Derzhavets
2011-07-28 19:04 ` Keir Fraser
2011-07-28 19:41 ` Boris Derzhavets
2011-07-28 19:53 ` Keir Fraser
2011-07-28 21:50 ` Boris Derzhavets
2011-07-28 22:12 ` Keir Fraser
2011-07-28 22:02 ` Re: Attempt to backport changeset-23088, changeset-23089 to Xen 4.1.1- Notice of Ian Campbell Boris Derzhavets
2011-07-29 7:08 ` Stefan Bader
2011-07-29 9:30 ` Boris Derzhavets
2011-07-29 14:41 ` Boris Derzhavets
2011-07-21 8:01 ` problem with xentrace_format in Xen 4.0.1 Zhiyuan Shao
2011-07-19 19:44 ` Re: Problem with Xen 4.1 on Ubuntu 11.10 ( Oneiric Ocelot) (HVM DomUs crash) Boris Derzhavets
2011-07-14 14:14 ` Re: Question on "xen-blkfront: handle Xen major numbers other than XENVBD" Ian Campbell
2011-07-14 15:01 ` Stefan Bader [this message]
2011-07-14 14:48 ` Ian Jackson
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=4E1F04D8.6060603@canonical.com \
--to=stefan.bader@canonical.com \
--cc=Ian.Campbell@citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=john.haxby@oracle.com \
--cc=xen-devel@lists.xensource.com \
/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.