Re: VFS integration with kernel mounts



On Thu, 2007-05-03 at 15:45 -0400, David Zeuthen wrote:
> On Thu, 2007-05-03 at 16:59 +0200, Alexander Larsson wrote:
> > The selection of whether to do local or remote i/o is done when
> > instantiating the GFile. We instantiate a GLocalFile or a GDaemonFile
> > depending on the uri and the default GVfs instance loaded. However, the
> > mapping from URI to what should be done with the file must be done by
> > purely in-process non-blocking simple code. Anything complicated (and
> > asking hal over dbus for a list of uuids and their paths is very
> > complicated) will make the GFile API totally unsuitable for what
> > applications normally do with it. (They will block all over the place in
> > unexpected places and generally be very slow.)
> 
> But instantiating a GFile itself surely can block? I mean, the
> application just don't know in advance what the URI is and if it's an
> URI to something that needs to be mounted it will block _anyway_
> possibly asking the user for credentials. 

Oh, no. Instantiating a GFile is equivalent to parsing the URI. There is
no i/o done in that. The value of GFile is that it abstracts the kind of
stuff you do on pathnames and uris, so there is no need for the typical
bug-ridden uri / pathname mangling wrt escaping, finding slashes etc.

Blocking is only done when you dereference the GFile, such as when
opening a file.

> If the media is available, we have the local mount point
> (e.g. /media/usbdisk) and use this for all the file operations.
> 
> The aliasing problem aside, is there anything wrong with this approach?

If using a uuid to address the files are so important, why can we not
use the uuid as the mountpoint for the drive. Then we avoid aliasing and
all applications gets the persistant-identifiers feature.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an uncontrollable guitar-strumming stage actor for the 21st century. 
She's a manipulative Buddhist bodyguard from a family of eight older brothers. 
They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]