open_file_shared()

Jeremy Allison jeremy at valinux.com
Tue Apr 10 18:41:41 GMT 2001


jonathan bright wrote:
> 
> the way that the oplock/share_mode stuff is handled in open_file_shared()
> is inconvenient for a project that i am working on. i would like to
> move this processing to a centralized locking server, and have each smbd
> process make RPC calls to this server, waiting for an acknowledgement
> when the open is complete.

BTW: This is the approach that SCO's VisionFS took. It became
a central bottleneck and slowed them down a lot. Just so'as
you know :-).

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

This is what NT does. If you don't do this Windows apps won't
work. Yes it's wrong, yes it's dumb. Welcome to Windows :-).

> 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.

That is something we could do. The request/response pair was just an
easier way to code it up. We could use a send loop, followed by a
receive loop and wait until all replies come in, it might improve
efficiency some.

This is quite complex code however, and I was more concerned
with getting it *right* first :-). Also, to change it we should
need some profile evidence that this is a bottleneck.

Jeremy.

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------




More information about the samba-technical mailing list