Implemented OPLOCK for FreeBsd
jlemon at flugsvamp.com
Fri Sep 7 14:28:04 GMT 2001
On Fri, Sep 07, 2001 at 02:10:23PM -0700, Ephi Dror wrote:
> My goal was to implement only what is needed to fulfill the SAMBA API for
> oplock and not to develop a generic leasing management on files.
> Jonathan, do you have it implemented already? I don't mind to use and test
> it for now.
No - I only saw this thread an hour or so ago, so I haven't done any
coding at all. However, it really shouldn't be difficult to do.
> For us, at Panasas, we chose fcntl and signal approach because later on we
> are going to move the logic of oplock in the kernel from VNODE to other
> place that better fit our system architecture.
I'm not sure why you felt this way. From what I understand, an oplock
is broken when the file is opened or truncated. This means that the
oplock lease calls can be placed above the VFS layer, and not have any
knowledge of the underlying internals. The data structure that the knote
(internal kq data structure) attaches to is determined by the kernel
implementation, and is not visible to the outside world.
Regardless, if you send me the code you have (primarily the stuff
dealing with timeouts and the placement of hooks in the sys/kern/*
layer), I can take a quick go at making a conversion.
More information about the samba-technical