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

From: Linus Torvalds
Date: Thu Jan 08 2004 - 20:22:15 EST




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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/