tech-kern archive

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

Re: struct file reference at VFS level



On Wed, Apr 20, 2016 at 07:09:12AM -0400, Greg Troxel wrote:
> 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?

I talked to the glusterFS developer that hit the problem about the 
requirement. This is to iplement mandatory locks, a feature not available 
in UFS.

Quooted below is the scenario chere the problem arise:

> (...) proposed mandatory lock feature checks for locks during
> every data modifying fops. And hence we make use of fd flags too. Let
> me explain the scenario from my test case:
>
> Process 1 opens file 'foo' with O_RDWR and acquires a shared byte range
> lock. Process 2 opens the same file 'foo' with O_RDWR|O_NONBLOCK so as
> to fail the next write in case a conflicting lock is found. Both
> processes are acting on the same mount point and hence we have the
> issue of reusing the previous open which does not contain O_NONBLOCK
> flag. As a result instead of failing the write fop it will continue to
> wait until the conflicting byte range lock is released.



-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index