Re: Plans for gnome-vfs replacement
- From: Alexander Larsson <alexl redhat com>
- To: Federico Mena Quintero <federico ximian com>
- Cc: "gnome-vfs-list gnome org" <gnome-vfs-list gnome org>, "gtk-devel-list gnome org" <gtk-devel-list gnome org>
- Subject: Re: Plans for gnome-vfs replacement
- Date: Thu, 21 Sep 2006 10:01:35 +0200
On Wed, 2006-09-20 at 10:41 -0500, Federico Mena Quintero wrote:
> 2. "Will a stat() or open() be slow on this file?". This works
> reasonably well. The only problem is that file-method.c implements it
> as a blacklist of known-to-be-remote file systems, *not* as a whitelist
> of known-to-be-local ones. So occasionally we get bug reports like "I
> have a foofs mount which is slow", where foofs is an obscure network
> file system like Novell's novfs.
No, the problem is that is causes a slow blocking system call, which is
not expected by callers of this function, causing slowdowns.
> A bigger problem is that is_local() blocks very badly if you run it on a
> file which is on a stale NFS mount, because it stat()s the file directly
> to get at its st_dev and such. I *think* this could be better
> implemented by stat()ing each component from the root down to the actual
> file, and stopping whenever we get to a directory which is a nonlocal
> mount. [Of course, stat()ing recursively sucks, but what can you do.]
That isn't good enough. It would think
"/mnt/nfs/symlink_to_non_nfs/file.txt" is on an NFS share. Its also
gonna make this functions even slower.
Sure, its a useful feature, if it was called
complicated_slow_estimate_of_filesystem_performance(). The problem is
really that the name causes people to not be understand what it really
does. (i.e. they expect it to do a prefix match)
> This problem about blocking on stale mounts shows up in the file
> chooser. We do is_local() on each bookmark to see whether to show it or
> not, depending on whether the file chooser is configured to show
> local-only files. If you have an NFS bookmark and the mount is stale,
> it hangs.
Is this right behaviour though? Do you expect locally mounted nfs shares
(possibly your homedir) to go away if you want to show only "local
files". I'd assume that would mean only other gnome-vfs shares.
> Also, the calling code could be smarter about not running is_local() for
> every single file... maybe we can assume that if a directory is local,
> then every file under it is also local (but not subdirectories, which
> may be mounts).
Nautilus already does this, fortunately, or things would be really slow.
nautilus_file_is_local() chains to the NautilusDirectory the file is in
and looks at that (cached) value.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a fast talking voodoo romance novelist looking for 'the Big One.' She's a
time-travelling French-Canadian politician with an evil twin sister. They
fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]