lkml.org 
[lkml]   [2010]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [fuse-devel] [PATCH] FUSE/CUSE: implement direct mmap support
Hello,

On 02/12/2010 09:07 AM, Tejun Heo wrote:
>> The thing is, I'm still not sure if or how this kind of mmap makes
>> sense outside of the CUSE context. Which makes designing the API
>> difficult.
>
> For this to be useful for normal FS, it has to be backed by multiple
> swap backed files and I can almost guarantee you would need to be
> passing fds around.

BTW, if you're looking this way, one way to do it would be to ask the
server to return a fd to use for the mmap backing and offset
adjustment (still needs to be SHMLBA aligned) rather than creating
anonymous file from the kernel. In this approach, the problem would
be wrapping the vma ops so that FUSE can determine when the mmap
segment is released. I did it in pretty ugly way in the previous mmap
implementation by simply overwriting the ops as anonymous files didn't
have their own ->open or ->close but to do this for any file you'll
need a way to nest or inherit vma ops in generic way. The problem is
that the assumptions regarding vma are pretty deeply buried all over
the VM layer. FWIW, I couldn't think of a way to do that in generic
manner.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2010-02-12 01:25    [W:0.167 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site