open_file_shared()

Andrew Tridgell tridge at samba.org
Wed Apr 11 01:04:55 GMT 2001


> 1- how oplocks are broken before share modes are checked.
>    (yes, i read the comment)

the break often causes a file to be closed, thus removing the share
mode

> 2- how each entry is processed one by one.  seems more sensible
>    to break all of the oplocks in one pass, and then to wait for
>    acks from everyone.  i'm not sure if the distributed interactions
>    of multiple smbds in open_file_shared() would have anything to
>    do with this.

for levelI oplocks there is only ever 1. For levelII you don't want
for replies anyway.

> i can certainly emulate this logic in the code i'm working on,
> but i'd rather not.  does samba operate in this way because it
> has to otherwise applications will not work, or because of an
> abstract principal that samba should always emulate NT no matter
> what?

lots of apps will definately break if you change this.

> actually, the absolutely most useful piece of advice anyone
> could give me would be how i can make sure my code is correct when
> i'm done.

lots of testing :)

smbtorture does have some oplock testing code, but its not very
sophisticated.




More information about the samba-technical mailing list