lkml.org 
[lkml]   [2004]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: removable media revalidation - udev vs. devfs or static /dev
Date
From
In ens.mailing-lists.linux-kernel, you wrote:
> Exactly. It works today, because:
>
> - the device nodes are there.
>
> Ergo: udev should create the device nodes
>
> - the kernel autopartitions the device on any open (both main device and
> the subpartitions) when it notices a changed media. No polling
> required.
>
> Ergo: the kernel should continue to do this.

Maybe I don't understand the issues, maybe I am going to say something
stupid, but couldn't the problem be solved by adding an extra option to
mount, which would say: if device is a main device and no filesystem on
it, then try to open all subpartitions in turn till a filesystem is
found.

This way, I could just put in fstab
/dev/sda /mnt/media auto mymagicoption 0 0

mount first access sda, forcing a partition read. /dev/sda1 is created
by udev and mount finds it during its scan.

Complexity is in userspace. No polling, no extra device nodes. Policy is
in userspace (what should mount do when it finds two partitions ?
Creates subdirectories ? Fails ? Mount the first one ? The largest one ?
Just add as many mount options as you wish !). Plus it solves an extra
problem: I have zip disks with no partition tables (everything in
/dev/sda), and zip disks with filesystem sometimes in sda1, sometimes in
sda4. Right now, writing a fstab is difficult.

What did I miss ?

Éric Brunet
-
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    [W:0.075 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site