level2 kernel oplocks?
jra at samba.org
Fri Apr 3 19:30:43 GMT 2009
On Fri, Apr 03, 2009 at 12:15:54PM -0700, Steven Danneman wrote:
> > Hi!
> > Attached find some initial work for supporting level2 kernel oplocks.
> > One thing I'm stuck with now is the following:
> > * smbd (process A) holds an exclusive lease
> > * someone else (process B) tries to open the file
> > * smbd (process A) gets a signal
> > How does smbd find out if process B opened the file for r/w, so that
> > process A has to drop the lease completely, or if process B opened for
> > r/o, so that a downgrade would be sufficient??
> > Volker
> Hey Volker,
> A Level II oplock is only contended by a write or byte-range lock
> request. In the case you described, where an open operation contended
> an existing client's Exclusive oplock, process A would downgrade its
> client to a Level II oplock. The access mask of the open request is
> ignored when deciding how to break oplocks.
Indeed - even internally we always go down to level2 from
exclusive no matter what the requestor is asking for.
More information about the samba-technical