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

Linus Torvalds
2004-01-09T01:20:22Z

On Thu, 8 Jan 2004, Robert Love wrote:
>
> I like the idea of a hotplug event on media change (basically, a hotplug
> event for partitions). And, in fact, I am loath not to do it.

The thing is, you won't actually get a "media changed" event with almost
any normal hardware.

What you will get is "somebody tried to open the media, and we realized
that it has changed since the last open".

> The current direction with the kernel and udev is letting us move _away_
> from polling.

.. but this isn't actually the case for media change. You'd still not get
the media change when the change _occurs_. You'd only get it much later.

> But I hear you loud and clear about dumb devices that cannot detect
> media change. They pose a problem.

No, even the smart devices pose a problem - but at least for those the
test whether the media has changed is pretty simple.

The really _dumb_ devices just assume the media has changed every time the
device is opened.

Linus