Re: gvfs and mmap()?



On Sun, 2008-06-08 at 14:33 -0700, Dan Kegel wrote:

> Can one use mmap() with filesystems mounted via gvfs?
> http://lists.laptop.org/pipermail/sugar/2008-March/004728.html
> and
> http://bugs.winehq.org/show_bug.cgi?id=13783
> imply that the answer is 'no'.
> 
> If so, this is a significant limitation, as at least one version of
> Excel seems to use memory mapping to open documents.

You can't mmap() files using the GVFS API. That's essentially what the
first link says.

However, since I assume Excel doesn't use the GVFS API, but plain POSIX
to access the local file system, I assume you're talking about the Fuse
mounts (each GVFS mount automatically gets a parallel Fuse mount under
~/.gvfs/, for "legacy" apps).

These mounts support mmap(), but not shared writable mmaps, which is
what Excel is complaining about in the second link. This is a limitation
of Fuse itself:

http://groups.google.com/group/linux.kernel/browse_thread/thread/cdf7859a9f1bc43f

However, shared, writable mmaps are being implemented:

http://kerneltrap.org/Linux/Fuse_Writable_Mmap

I'm not sure what kernel version this appeared/will appear in, but it
means your problem will go away at some point.

-- 
Hans Petter



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