Fw: Re: Implemented OPLOCK for FreeBsd

John Baldwin jhb at FreeBSD.org
Fri Sep 7 20:01:52 GMT 2001

On 08-Sep-01 Jeremy Allison wrote:
> On Fri, Sep 07, 2001 at 05:28:59PM -0700, Julian Elischer wrote:
>> We have a good framework for arbitrary event handling in FreeBSD.
>> we don't want to implement a half dead (signals suck) implementation
>> in adition to it.
> Are you doing POSIX or not ? If not, please let me know so I
> know where to point Samba users on *BSD's if it breaks.... :-) :-).

Are you willing to define the semantics of your oplocking abstraction rather
than tying it to a specific implementation and then assuming that the
abstraction implements the bugs^H^H^H^Hfeatures of that implementation?

I.e., having an oplock abstraction as has been noted is a good thing, it's how
you should be doing them in samba.  Your only concern is that the oplocks act
the way you define them to work, you shouldn't care how they are implemented. 
If you provide the standard for how they work and hold to that in your code,
then FreeBSD can provide a kqueue implementation that other OS's that implement
kqueue can use.  If anything, having multiple implementations will help keep
your code honest by ensuring your higher level code isn't depending on
undocumented "features" of a given implementation.

After all, as an engineer, you _do_ want to write well-designed and implemented
portable code, yes?  The same concept applies to supporting multiple
architectures in an operating system to ensure your machine independent code is
truly MI.  Well, you have an oplock abstraction, so your oplock using code
should be oplock implementation independent.


John Baldwin <jhb at FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

More information about the samba-technical mailing list