svn commit: samba r8512 - in trunk/source: include smbd

Jeremy Allison jra at samba.org
Sat Jul 16 09:30:08 GMT 2005


On Sat, Jul 16, 2005 at 09:09:20AM +0000, vlendec at samba.org wrote:
> Author: vlendec
> Date: 2005-07-16 09:09:19 +0000 (Sat, 16 Jul 2005)
> New Revision: 8512
> 
> WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8512
> 
> Log:
> Jeremy, I did not see a distinction between LEVEL_II_OPLOCK_BREAK_CMD and
> OPLOCK_BREAK_CMD anywhere in the code. This removes LEVEL_II_OPLOCK_BREAK_CMD.
> 
> I'm sure you will take a close look at this... :-)

It simplifies the logic but at a cost of merging two
different actions (level2 break and kernel break) that
happen to have the same code paths.

Yes, it's a moot point that if actions have two identical
code paths they are the same action but (IMHO) it makes
any difference between the two actions unclear (at least
to me). And there may be some future difference between
the way we process kernel oplock break messages and level2
messages I'd prefer it if you could restore the code and
at least add a debug so we can see the message type sent.

That way we know we're doing the right thing. Ok, I do agree
that :

        /*
         * Do the appropriate reply - none in the kernel or async level II
         * case.
         */
                                                                                
        if (!((break_cmd_type == OPLOCK_BREAK_CMD) ||
              (break_cmd_type == LEVEL_II_OPLOCK_BREAK_CMD))) {
                return True;
        }


is horrid and should be replaced with a :

if (kernel type || async_level_2_type) {
	return True;
}

:-).

Jeremy.


More information about the samba-technical mailing list