This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[samba.git] / docs / docbook / smbdotconf / locking / level2oplocks.xml
1 <samba:parameter name="level2 oplocks"
2                  context="S"
3                  xmlns:samba="http://samba.org/common">
4 <listitem>
5         <para>This parameter controls whether Samba supports
6         level2 (read-only) oplocks on a share.</para>
7                 
8         <para>Level2, or read-only oplocks allow Windows NT clients 
9         that have an oplock on a file to downgrade from a read-write oplock 
10         to a read-only oplock once a second client opens the file (instead 
11         of releasing all oplocks on a second open, as in traditional, 
12         exclusive oplocks). This allows all openers of the file that 
13         support level2 oplocks to cache the file for read-ahead only (ie. 
14         they may not cache writes or lock requests) and increases performance 
15         for many accesses of files that are not commonly written (such as 
16         application .EXE files).</para>
17
18         <para>Once one of the clients which have a read-only oplock 
19         writes to the file all clients are notified (no reply is needed 
20         or waited for) and told to break their oplocks to &quot;none&quot; and 
21         delete any read-ahead caches.</para>
22
23         <para>It is recommended that this parameter be turned on to
24         speed access to shared executables.</para>
25
26         <para>For more discussions on level2 oplocks see the CIFS spec.</para>
27
28         <para>Currently, if <link linkend="KERNELOPLOCKS"><parameter moreinfo="none">kernel 
29         oplocks</parameter></link> are supported then level2 oplocks are 
30         not granted (even if this parameter is set to <constant>yes</constant>). 
31         Note also, the <link linkend="OPLOCKS"><parameter moreinfo="none">oplocks</parameter>
32         </link> parameter must be set to <constant>yes</constant> on this share in order for 
33         this parameter to have any effect.</para>
34
35         <para>See also the <link linkend="OPLOCKS"><parameter moreinfo="none">oplocks</parameter>
36         </link> and <link linkend="OPLOCKS"><parameter moreinfo="none">kernel oplocks</parameter>
37         </link> parameters.</para>
38                 
39         <para>Default: <command moreinfo="none">level2 oplocks = yes</command></para>
40 </listitem>
41 </samba:parameter>