Linus smoking crack
Posted Jan 9, 2004 8:45 UTC (Fri) by
iabervon (subscriber, #722)
In reply to:
Linus smoking crack by Ross
Parent article:
The future of device numbers
Linus is actually talking about randomization of the devices that the
kernel can't necessarily keep stable. So it's only really hotpluggable
devices, disks that can show up in surprising places, and that sort of
thing. I doubt /dev/zero will be change around between boots (which would
potentially cause problems with memory allocation in udev necessary to
create a device node with the right number...), and IDE disks and
floppies will probably stay the same. TTYs, PTYs, and so forth might as
well stay the same, since they're mostly kernel constructs anyway.
What'll be different is things like SCSI disks (which includes USB
storage), which will probably get random numbers instead of getting
numbered sequentially by when they're detected; if you're depending on
those being static, you could be in for an unpleasant surprise if you
boot a SCSI machine with a USB camera plugged in (even today, maybe).
The point is that the kernel can't necessarily identify the same device
is you unplug it and replug it, or if you reboot with different hardware
attached than you did last time. There are some cases where it is
reliable, and some cases where hardware doesn't matter, but there are
other cases where it can't do it reliably; in this case, it's far better
to fail the first time than wait to fail until it really matters.
(
Log in to post comments)