lkml.org 
[lkml]   [2004]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: removable media revalidation - udev vs. devfs or static /dev
Date
On Saturday 03 January 2004 08:58, Greg KH wrote:
> On Thu, Jan 01, 2004 at 11:33:04PM +0300, Andrey Borzenkov wrote:
> > udev names are created when kernel detects corr. device. Unfortunately
> > for removable media kernel rescans for partitions only when I try to
> > access device. Meaning - because kernel does not know partition table it
> > did not send hotplug event so udev did not create device nodes. But
> > without device nodes I have no way to access device in Unix :(
> >
> > specifically I have now my Jaz and I have no (reasonable) way to access
> > partition 4 assuming device nodes are managed by udev.
> >
> > devfs solved this problem by
> >
> > - always exporting at least handle to the whole disk (sda as example)
>
> Doesn't the kernel always create the main block device for this device?

yes

> If so, udev will catch that.

yes. So what - how does it help? User needs /dev/sda4. User has /dev/sda only.
Any attempt to refer to /dev/sda4 simply returns "No such file or directory"

> If not, there's no way udev will work for
> this kind of device, sorry.

this worked seamlessly using static /dev. This worked seamlessly using devfs.
If it won't work with udev - it means regression. And believe me - it is
serious regression for end-users (I still remember similar problems we had
when transitioning to devfs and users' reaction to this).

> You could make a script that just creates
> the device node in /tmp, runs dd on it, and then cleans it all up to
> force partition scanning.
>

You miss the point. When should this script be run? There is no event when you
just insert Jaz disk; nor is there any way to trigger revalidation on access
to non-existing device like is the case without udev.

what I aim at - udev needs to provide some extension mechanism to allow
arbitrarily scripts to be run. Such script could then create all block nodes
(hmm ... how can script know the number of possible nodes and their names?)

in hope somebody gets an idea ...

regards

-andrey

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

\
 
 \ /
  Last update: 2005-03-22 13:59    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site