hairbrained idea

Brian Dessent brian@dessent.net
Fri Nov 11 23:52:00 GMT 2005


There exist open source read/write IFS drivers for ext2 under windows,
e.g. <http://sourceforge.net/projects/ext2fsd>.

What if you took one of these drivers and modified it to expose an
separate additional API that would essentially provide 'raw' access to
the ext2 data.  It would take posix-like paths, and provide means for
accessing stuff like inode/owner/group/permissions/symlinks without any
attempt to translate to or from something that windows understands.  And
then what if you modified Cygwin to detect either through a mount table
flag, or through some automatic means, that when accessing a path on
such a filesystem to short circuit all off the translation/emulation
code in Cygwin, and just directly call this "ext2 native" API.  This API
wouldn't have to be bound by the restrictions of the win32 filesystem
APIs, it could be something completely invented for the purpose since it
would be meant only for communication between the driver and Cygwin.

And since the driver is also still providing a windows-view to the
filesystem, if you have to invoke a non-Cygwin program you can still
just use the regular win32 path and let the driver do its thing.

The desired end result would be that a) you'd improve performance
because you could directly map a posix API to a posix filesystem and b)
you would get things like case-sensitivity and "real" symlinks without
having to emulate them with managed mounts and shortcuts.

Of course it's a lot easier said than done, and obviously this would
require a giant heaping truckload of SHTI, so this is really just a
pie-in-the-sky type of idea.  But I'm just wondering: I can't have been
the first to think of this, has anyone ever given it thought?  I know
that people have asked before about modifying cygwin to allow loadable
filesystem drivers, but the key difference here is that this method
allows both cygwin and non-cygwin programs to access the drive, whereas
if you put the FS code in cygwin you couldn't access the mount through
non-cygwin programs, which would make it much less useful.

And is there some hidden hippo in the corner that I'm neglecting to
consider that would make this fail?

Brian



More information about the Cygwin-developers mailing list