devfs
[Top] [All Lists]

RE: module loading

To: "'Russell Coker'" <russell@xxxxxxxxxxxx>, devfs@xxxxxxxxxxx
Subject: RE: module loading
From: Borzenkov Andrey <Andrey.Borzenkov@xxxxxxxxxxx>
Date: Thu, 27 Mar 2003 09:07:33 +0300
Importance: Normal
In-reply-to: <200303270252.54104.russell@xxxxxxxxxxxx>
Sender: devfs-bounce@xxxxxxxxxxx
> 
> Would it be possible to have the kernel execute modprobe when a non-
> existant
> device node is accessed?
> 
> IE If an application attempts to access /dev/ppp could the kernel run
> "modprobe /dev/ppp" directly (not through devfsd)?
> 

Theoretically, yes. Doing this means that either every file system must
support it in its ->lookup method or you need special file system type for
/dev. The latter exists and is called devfs :) The former may be problematic
because at the time ->lookup is called we do not have full pathname - just
inode pointing to directory and single component inside this directory. So
implementation may need to unwalk directory name (like sys_getcwd does,
actually just call it) - and this for _every_ lookup. And almost for every
file system type.

-andrey


<Prev in Thread] Current Thread [Next in Thread>