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

Xavier Bestel
2004-01-08T08:01:33Z

Le jeu 08/01/2004 à 04:43, Linus Torvalds a écrit :
> On Thu, 8 Jan 2004, Andries Brouwer wrote:
> >
> > I am even happy in a somewhat more general situation that you are.
> > If the kernel autopartitions (and make recognition of new partitions
> > hotplug events so that udev can create the device nodes), all is well.
>
> Yes. We _could_ do that, by just making a "we noticed the disk change" be
> a hotplug event. However, I'm loath to do that, because some devices
> literally don't even have an easily read disk change signal, so what they
> do is
>
> - assume the disk _always_ changed on open
> - do a quick IO to verify it
>
> and I'd be nervous about that kind of thing resulting in hotplug being
> called constantly if somebody rude just has an endless loop of
> "open()/close()".

Theses devices are kind of broken anyway, aren't they ? I see no safe
way of handling disk changes on them, except having a "I changed disk in
this drive" button on the desktop and rely on the user's good behavior.
Currently the kernel will may have a wrong idea of what's in the drive
if it doesn't poll, and that may wreak havoc.

Xav