lkml.org 
[lkml]   [2009]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] fdtable: export alloc_fd()
Hello, Al.

Al Viro wrote:
> On Thu, Jun 18, 2009 at 06:24:30PM +0900, Tejun Heo wrote:
>> Export alloc_fd(). Will be used by FUSE.
>
> Where and how?

This currently is used via get_unused_fd_flags() in
fuse_mmap_commit_prep(). A shmem_file is created in the requesting
client's context (for accounting and easier flow of control) and then
passed to the server's context where an fd is allocated and assigned
to the file so that the fd can be passed to the userland server.

The shmem_file based implementation serves certain device mmap file
emulation well but as Miklos pointed out it may not be sufficiently
flexible for other purposes and passing file back and forth and
wrapping shmem_file is quite ugly, so I think there's pretty good
chance it will get reimplemented in some different way which likely
won't need alloc_fd() exported. If there's any vfs related changes,
I'll cc you.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2009-06-30 05:11    [W:0.036 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site