tech-kern archive

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

Re: struct file reference at VFS level



manu%netbsd.org@localhost (Emmanuel Dreyfus) writes:

> 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.

I am not following this.   My basic issue is that while I see your point
about open files in FUSE being different, I don't see how that's
different from multiple open files in any other filesystem.

What specific flags are you talking about, and can you explain why a
FUSE vfs implementation would need to know but say UFS would not?

(Conveying more information across puffs sounds ok; it's the notion that
more has to cross the VFS interface specially for FUSE that I don't follow.)

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index