Re: removable media revalidation - udev vs. devfs or static /dev

Gerd Knorr
2004-01-09T10:11:14Z

Joel Becker <Joel.Becker@oracle.com> writes:

> On Wed, Jan 07, 2004 at 10:57:00AM -0800, Greg KH wrote:
> > Hm, that would work, but what about a user program that just polls on
> > the device, as the rest of this thread discusses? As removable devices
> > are not the "norm" it would seem a bit of overkill to create 16
> > partitions for every block device, if they need them or not.
>
> Um, adding all 16 partitions for a block device that has 5
> defined is opposite of the intention of udev, no?

It shouldn't be _that_ bad.

removable media devices usually tell you that they are removable media
devices (scsi: inquiry data has a bit for that IIRC). If you pass
this up to hotplug it can use that to figure whenever it has a hard
disk (=> just create the existing partitions) or a removable device
(=> create a few more nodes to catch the usual removable media
layouts).

I also think you don't need *all* minors for removable media. I
havn't seen removable media with extended partitions so far. IIRC zip
floppys are using /dev/sda4 and most other ones either /dev/sda1 or
/dev/sda directly, so we likely can catch 99% with just three device
nodes.

Gerd

--
You have a new virus in /var/mail/kraxel