All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Bader <stefan.bader@canonical.com>
To: xen-devel@lists.xensource.com
Subject: Re: Re: Question on "xen-blkfront: handle Xen major	numbers other than XENVBD"
Date: Wed, 13 Jul 2011 15:45:18 +0200	[thread overview]
Message-ID: <4E1DA16E.6020302@canonical.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1107131409210.12963@kaball-desktop>

On 13.07.2011 15:20, Stefano Stabellini wrote:
> 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@eu.citrix.com>
>>>>> 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?
> 
Yeah, I understand the problem now that I thought of the possibility of having
both name types in the configuration. Though I could imagine that in reality
there will be no one having that done as it would have caused problems...
As you say, the only way to avoid any clashed is to have seperate namespaces.
But that again is unexpected now and people would complain.
The 4 letters offset probably still can get busted if someone decides to use hde
and sda. Detecting clashes at allocation time and then using another name for
the duplicate is likely to result in a random of the two to be the secondary.
My feeling would be that trying to map two namespaces into one will always be
confusing and/or failing to some degree. The reason to go back would only be
that this was broken before, so it can probably be expected that people have
avoided that mix.So it would be as it has been before. But I bet there are other
people that thought of it as a bug... Not an easy decision at all.

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

  reply	other threads:[~2011-07-13 13:45 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 [this message]
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
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=4E1DA16E.6020302@canonical.com \
    --to=stefan.bader@canonical.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.