tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

struct file reference at VFS level



Hello

I have hit an implementation problem with FUSE on NetBSD which seems
difficult to implement with current VFS and PUFFS interfaces.

FUSE methods on open files use a pointer on a file handle. The
filesystem uses it to track attribute about the open file. For instance,
if process 1 opens a file with a given flag and process 2 opens it
without it, the filesystem may need to act differently when it gets an
I/O for the file. This means it must be able to tell the difference
between the struct file that caused an operation on a given vnode. 

As I understand, current implementation of NetBSD VFS does not offer a
reference to the calling struct file when we do VFS operations. It seems
this could be optionally added using kauth_cred_setdata() /
kauth_cred_getdata() if we have a mount option for the filesystem.

Then it seems I would need to create upgraded  messages in PUFFS
interface and API to pass that new information  to the filesystem.

Does all of this makes sense?

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index