tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: (Semi-random) thoughts on device tree structure and devfs



Quentin Garnier wrote:
On Tue, Mar 09, 2010 at 08:51:48PM +0100, Johnny Billquist wrote:
"More or less", because I don't have all the details. If you were to
post the dmesg from your booting, I could give you the exact thing.

Are you sure your USB disk shows up as sd? Looking at the config
file, I would have thought it would match wd.

If it is wd, then the config should have something along these lines:

wd0 at umass0
umass0 at uhub0 port 0 configuration 0 interface 0
uhub0 at usb0
usb0 at uhci0
uhci0 at pci1 dev 1 function 0
pci1 at ppb0 bus 0
ppb0 at pci0 dev 0 function 0
pci0 at mainbus 0 bus 0


Obviously I've thrown in a bunch of "0" here, where there probably
should be something else, as well as a "1", since you have two pci
buses involved already at this point.
That's the "more or less" part. Now, if you don't understand the
concept based on this, then I don't think putting correct numbers in
here is going to help much more either. The basic idea though, is
that this will always cause the same disk to be wd0, and no other
disk will ever become that. No matter what hardware you add, or
where.

What you really don't seem to understand is that this answers only
half of the contract.  Put the drive in another USB port and it
doesn't show up as wd0.

The idea was that only that disk would show up as wd0, and would
always show up as wd0.  (Incidentally, wd@umass is very rare.  I think
it was only some old Archos.)

But you miss my other half point. In Masao's original idea, he complained about device enumeration being random, and wanted it moved out into the filename namespace. But if you move the device to another port, it will move just as much within the file system, so he didn't solve anything. If you want to be able to refer to a disk in the scenario where you actually move it around, you need some other solution.

My answer only intended to show that the device enumeration isn't random, depending on if you add/remove other devices, which is what Masao was claiming.

His original claim, and reason for his proposed solution, is basically wrong.

The problem you are highlighting is another one, and one which I agree it would be nice to have a solution to. But the only solution I can come up with is to be able to refer to disks by their name in the disk label, or something similar, which is unique per disk, and have no relationship at all with which how they are attached to the system.

Something like:

wd0 at umass? label="foobar"

But, as I said, this is another problem, which Masao hasn't at all addressed. His solution to his random device enumeration problem is simply a solution to a non-problem.

I hope I made myself clear, since I sometimes seem to not be able to express clear enough what I mean.

        Johnny


Home | Main Index | Thread Index | Old Index