A common VFS and a Common conf-system [Part II]

Perry Lorier perry at coders.net
Tue Mar 8 22:39:34 EET 2005


> When FUSE equivalents are in BSD, Solaris, HP-UX, Cygwin, Irix, etc.,
> *then* it's worth taking into consideration.  Until then, FUSE is
> absolutely useless to D-VFS, unless we code some huge and massively
> different version just for Linux, which is both insane and pointless.
> 

If someone is very careful, you could implement a VFS using LD_PRELOAD, 
which is a lot more portable.  Overriding the POSIX API's to call 
through to a daemon is at least doable.  The thing to be wary of is that 
a lot of programs (eg, cp) assume a lot of structure in their filenames, 
and will quite happily cull out "//"'s and suchlike in filenames. 
Having filenames look /vfs/http/server/path/file.html seems to be the 
best solution to this problem.  If the OS has capabilities such as FUSE 
(or hurd's file system translators or...) then it can be implemented 
with kernel support.  If the OS has no such capabilities, then the 
LD_PRELOAD method can be used instead.  GUI API's can rewrite the 
"/vfs/protocol/" to and from "protocol://" when displaying it to the 
user if URL looking URLs are a design requirement.

Getting this to work well is hard.  I managed to write one a few years 
ago that worked with ftp for small values of work.  (you could vi 
/ftp/ftp.example.com/pub/example.txt and it would work mostly).



More information about the xdg mailing list