summaryrefslogtreecommitdiffstats
path: root/docs-xml/smbdotconf/locking
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs-xml/smbdotconf/locking/blockinglocks.xml25
-rw-r--r--docs-xml/smbdotconf/locking/cscpolicy.xml23
-rw-r--r--docs-xml/smbdotconf/locking/fakeoplocks.xml30
-rw-r--r--docs-xml/smbdotconf/locking/force_process_locks.xml19
-rw-r--r--docs-xml/smbdotconf/locking/kerneloplocks.xml29
-rw-r--r--docs-xml/smbdotconf/locking/kernelsharemodes.xml32
-rw-r--r--docs-xml/smbdotconf/locking/level2oplocks.xml40
-rw-r--r--docs-xml/smbdotconf/locking/locking.xml29
-rw-r--r--docs-xml/smbdotconf/locking/lockspintime.xml15
-rw-r--r--docs-xml/smbdotconf/locking/oplockbreakwaittime.xml18
-rw-r--r--docs-xml/smbdotconf/locking/oplocks.xml30
-rw-r--r--docs-xml/smbdotconf/locking/posixlocking.xml17
-rw-r--r--docs-xml/smbdotconf/locking/smb2leases.xml24
-rw-r--r--docs-xml/smbdotconf/locking/strictlocking.xml31
14 files changed, 362 insertions, 0 deletions
diff --git a/docs-xml/smbdotconf/locking/blockinglocks.xml b/docs-xml/smbdotconf/locking/blockinglocks.xml
new file mode 100644
index 0000000..3c13995
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/blockinglocks.xml
@@ -0,0 +1,25 @@
+<samba:parameter name="blocking locks"
+ context="S"
+ type="boolean"
+ deprecated="1"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>This parameter controls the behavior
+ of <citerefentry><refentrytitle>smbd</refentrytitle>
+ <manvolnum>8</manvolnum></citerefentry> when given a request by a client
+ to obtain a byte range lock on a region of an open file, and the
+ request has a time limit associated with it.</para>
+
+ <para>If this parameter is set and the lock range requested
+ cannot be immediately satisfied, samba will internally
+ queue the lock request, and periodically attempt to obtain
+ the lock until the timeout period expires.</para>
+
+ <para>If this parameter is set to <constant>no</constant>, then
+ samba will behave as previous versions of Samba would and
+ will fail the lock request immediately if the lock range
+ cannot be obtained.</para>
+
+</description>
+<value type="default">yes</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/cscpolicy.xml b/docs-xml/smbdotconf/locking/cscpolicy.xml
new file mode 100644
index 0000000..511639e
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/cscpolicy.xml
@@ -0,0 +1,23 @@
+<samba:parameter name="csc policy"
+ context="S"
+ type="enum"
+ enumlist="enum_csc_policy"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>
+ This stands for <emphasis>client-side caching policy</emphasis>, and specifies how clients capable of offline
+ caching will cache the files in the share. The valid values are: manual, documents, programs, disable.
+ </para>
+
+ <para>
+ These values correspond to those used on Windows servers.
+ </para>
+
+ <para>
+ For example, shares containing roaming profiles can have offline caching disabled using
+ <smbconfoption name="csc policy">disable</smbconfoption>.
+ </para>
+</description>
+<value type="default">manual</value>
+<value type="example">programs</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/fakeoplocks.xml b/docs-xml/smbdotconf/locking/fakeoplocks.xml
new file mode 100644
index 0000000..c5622ae
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/fakeoplocks.xml
@@ -0,0 +1,30 @@
+<samba:parameter name="fake oplocks"
+ type="boolean"
+ context="S"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>Oplocks are the way that SMB clients get permission
+ from a server to locally cache file operations. If a server grants
+ an oplock (opportunistic lock) then the client is free to assume
+ that it is the only one accessing the file and it will aggressively
+ cache file data. With some oplock types the client may even cache
+ file open/close operations. This can give enormous performance benefits.
+ </para>
+
+ <para>When you set <command moreinfo="none">fake oplocks = yes</command>, <citerefentry>
+ <refentrytitle>smbd</refentrytitle><manvolnum>8</manvolnum></citerefentry> will
+ always grant oplock requests no matter how many clients are using the file.</para>
+
+ <para>It is generally much better to use the real <smbconfoption name="oplocks"/> support rather
+ than this parameter.</para>
+
+ <para>If you enable this option on all read-only shares or
+ shares that you know will only be accessed from one client at a
+ time such as physically read-only media like CDROMs, you will see
+ a big performance improvement on many operations. If you enable
+ this option on shares where multiple clients may be accessing the
+ files read-write at the same time you can get data corruption. Use
+ this option carefully!</para>
+</description>
+<value type="default">no</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/force_process_locks.xml b/docs-xml/smbdotconf/locking/force_process_locks.xml
new file mode 100644
index 0000000..f701c0a
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/force_process_locks.xml
@@ -0,0 +1,19 @@
+<samba:parameter name="smbd force process locks"
+ context="S"
+ type="boolean"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>
+ This boolean option tells <command moreinfo="none">smbd</command> whether
+ to forcefully disable the use of Open File Description locks on Linux.
+ </para>
+ <para>
+ This option should not be changed from the default unless you know what
+ you're doing.
+ </para>
+
+</description>
+
+<related>locking</related>
+<value type="default">no</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/kerneloplocks.xml b/docs-xml/smbdotconf/locking/kerneloplocks.xml
new file mode 100644
index 0000000..ff237ec
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/kerneloplocks.xml
@@ -0,0 +1,29 @@
+<samba:parameter name="kernel oplocks"
+ type="boolean"
+ context="S"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>For UNIXes that support kernel based <smbconfoption name="oplocks"/>
+ (currently only Linux), this parameter allows the use of them to be
+ turned on or off. However, this disables Level II oplocks for clients as
+ the Linux kernel does not support them properly.</para>
+
+ <para>Kernel oplocks support allows Samba <parameter moreinfo="none">oplocks
+ </parameter> to be broken whenever a local UNIX process or NFS operation
+ accesses a file that <citerefentry><refentrytitle>smbd</refentrytitle>
+ <manvolnum>8</manvolnum></citerefentry> has oplocked. This allows complete
+ data consistency between SMB/CIFS, NFS and local file access (and is
+ a <emphasis>very</emphasis> cool feature :-).</para>
+ <para>If you do not need this interaction, you should disable the
+ parameter on Linux to get Level II oplocks and the associated
+ performance benefit.</para>
+
+ <para>This parameter defaults to <constant>no</constant> and is translated
+ to a no-op on systems that do not have the necessary kernel support.</para>
+</description>
+
+<related>oplocks</related>
+<related>level2 oplocks</related>
+<related>smb2 leases</related>
+<value type="default">no</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/kernelsharemodes.xml b/docs-xml/smbdotconf/locking/kernelsharemodes.xml
new file mode 100644
index 0000000..d06f792
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/kernelsharemodes.xml
@@ -0,0 +1,32 @@
+<samba:parameter name="kernel share modes"
+ type="boolean"
+ context="S"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>
+ This parameter controls whether SMB share modes are
+ translated into file system specific sharemode calls.
+ </para>
+
+ <para>
+ Kernel share modes provide a minimal level of interoperability
+ with local UNIX processes and NFS operations by preventing
+ access corresponding to the SMB share modes. This requires
+ a file system specific VFS module with proper support.
+ </para>
+
+ <para>
+ Note that in order to use SMB2 durable file handles on a share,
+ you have to turn kernel share modes off.
+ </para>
+
+ <para>
+ This parameter defaults to <constant>no</constant>. Setting
+ it to <constant>yes</constant> requires a file system module
+ that supports file system sharemodes, otherwise attempts to
+ access files will fail with a sharing violation.
+ </para>
+</description>
+
+<value type="default">no</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/level2oplocks.xml b/docs-xml/smbdotconf/locking/level2oplocks.xml
new file mode 100644
index 0000000..f411449
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/level2oplocks.xml
@@ -0,0 +1,40 @@
+<samba:parameter name="level2 oplocks"
+ context="S"
+ type="boolean"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>This parameter controls whether Samba supports
+ level2 (read-only) oplocks on a share.</para>
+
+ <para>Level2, or read-only oplocks allow Windows NT clients
+ that have an oplock on a file to downgrade from a read-write oplock
+ to a read-only oplock once a second client opens the file (instead
+ of releasing all oplocks on a second open, as in traditional,
+ exclusive oplocks). This allows all openers of the file that
+ support level2 oplocks to cache the file for read-ahead only (ie.
+ they may not cache writes or lock requests) and increases performance
+ for many accesses of files that are not commonly written (such as
+ application .EXE files).</para>
+
+ <para>Once one of the clients which have a read-only oplock
+ writes to the file all clients are notified (no reply is needed
+ or waited for) and told to break their oplocks to &quot;none&quot; and
+ delete any read-ahead caches.</para>
+
+ <para>It is recommended that this parameter be turned on to
+ speed access to shared executables.</para>
+
+ <para>For more discussions on level2 oplocks see the CIFS spec.</para>
+
+ <para>
+ Currently, if <smbconfoption name="kernel oplocks"/> are supported then
+ level2 oplocks are not granted (even if this parameter is set to
+ <constant>yes</constant>). Note also, the <smbconfoption name="oplocks"/>
+ parameter must be set to <constant>yes</constant> on this share in order for
+ this parameter to have any effect.</para>
+</description>
+
+<related>oplocks</related>
+<related>kernel oplocks</related>
+<value type="default">yes</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/locking.xml b/docs-xml/smbdotconf/locking/locking.xml
new file mode 100644
index 0000000..15bc98d
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/locking.xml
@@ -0,0 +1,29 @@
+<samba:parameter name="locking"
+ type="boolean"
+ context="S"
+ parm="1"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>This controls whether or not locking will be
+ performed by the server in response to lock requests from the
+ client.</para>
+
+ <para>If <command moreinfo="none">locking = no</command>, all lock and unlock
+ requests will appear to succeed and all lock queries will report
+ that the file in question is available for locking.</para>
+
+ <para>If <command moreinfo="none">locking = yes</command>, real locking will be performed
+ by the server.</para>
+
+ <para>This option <emphasis>may</emphasis> be useful for read-only
+ filesystems which <emphasis>may</emphasis> not need locking (such as
+ CDROM drives), although setting this parameter of <constant>no</constant>
+ is not really recommended even in this case.</para>
+
+ <para>Be careful about disabling locking either globally or in a
+ specific service, as lack of locking may result in data corruption.
+ You should never need to set this parameter.</para>
+</description>
+
+<value type="default">yes</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/lockspintime.xml b/docs-xml/smbdotconf/locking/lockspintime.xml
new file mode 100644
index 0000000..692b4de
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/lockspintime.xml
@@ -0,0 +1,15 @@
+<samba:parameter name="lock spin time"
+ type="integer"
+ context="G"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>The time in milliseconds that smbd should
+ keep waiting to see if a failed lock request can
+ be granted. This parameter has changed in default
+ value from Samba 3.0.23 from 10 to 200. The associated
+ <command moreinfo="none">lock spin count</command> parameter is
+ no longer used in Samba 3.0.24. You should not need
+ to change the value of this parameter.</para>
+</description>
+<value type="default">200</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/oplockbreakwaittime.xml b/docs-xml/smbdotconf/locking/oplockbreakwaittime.xml
new file mode 100644
index 0000000..f07b6c9
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/oplockbreakwaittime.xml
@@ -0,0 +1,18 @@
+<samba:parameter name="oplock break wait time"
+ context="G"
+ type="integer"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+ <description>
+ <para>
+ This is a tuning parameter added due to bugs in both Windows 9x and WinNT. If Samba responds to a client too
+ quickly when that client issues an SMB that can cause an oplock break request, then the network client can
+ fail and not respond to the break request. This tuning parameter (which is set in milliseconds) is the amount
+ of time Samba will wait before sending an oplock break request to such (broken) clients.
+ </para>
+
+ <warning><para>
+ DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ AND UNDERSTOOD THE SAMBA OPLOCK CODE.
+ </para></warning>
+</description>
+<value type="default">0</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/oplocks.xml b/docs-xml/smbdotconf/locking/oplocks.xml
new file mode 100644
index 0000000..1d72649
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/oplocks.xml
@@ -0,0 +1,30 @@
+<samba:parameter name="oplocks"
+ context="S"
+ type="boolean"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>
+ This boolean option tells <command moreinfo="none">smbd</command> whether to
+ issue oplocks (opportunistic locks) to file open requests on this
+ share. The oplock code can dramatically (approx. 30% or more) improve
+ the speed of access to files on Samba servers. It allows the clients
+ to aggressively cache files locally and you may want to disable this
+ option for unreliable network environments (it is turned on by
+ default in Windows NT Servers).
+ </para>
+
+ <para>
+ Oplocks may be selectively turned off on certain files with a share. See
+ the <smbconfoption name="veto oplock files"/> parameter. On some systems
+ oplocks are recognized by the underlying operating system. This
+ allows data synchronization between all access to oplocked files,
+ whether it be via Samba or NFS or a local UNIX process. See the
+ <smbconfoption name="kernel oplocks"/> parameter for details.
+ </para>
+</description>
+
+<related>kernel oplocks</related>
+<related>level2 oplocks</related>
+<related>smb2 leases</related>
+<value type="default">yes</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/posixlocking.xml b/docs-xml/smbdotconf/locking/posixlocking.xml
new file mode 100644
index 0000000..f38b2bd
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/posixlocking.xml
@@ -0,0 +1,17 @@
+<samba:parameter name="posix locking"
+ type="boolean"
+ context="S"
+ parm="1"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>
+ The <citerefentry><refentrytitle>smbd</refentrytitle> <manvolnum>8</manvolnum></citerefentry>
+ daemon maintains an database of file locks obtained by SMB clients. The default behavior is
+ to map this internal database to POSIX locks. This means that file locks obtained by SMB clients are
+ consistent with those seen by POSIX compliant applications accessing the files via a non-SMB
+ method (e.g. NFS or local file access). It is very unlikely that you need to set this parameter
+ to "no", unless you are sharing from an NFS mount, which is not a good idea in the first place.
+ </para>
+</description>
+<value type="default">yes</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/smb2leases.xml b/docs-xml/smbdotconf/locking/smb2leases.xml
new file mode 100644
index 0000000..89ff307
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/smb2leases.xml
@@ -0,0 +1,24 @@
+<samba:parameter name="smb2 leases"
+ context="G"
+ type="boolean"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>
+ This boolean option tells <command moreinfo="none">smbd</command> whether to
+ globally negotiate SMB2 leases on file open requests. Leasing is an SMB2-only
+ feature which allows clients to aggressively cache files locally above and
+ beyond the caching allowed by SMB1 oplocks.
+ </para>
+
+ <para>
+ This is only available with <smbconfoption name="oplocks">yes</smbconfoption>
+ and <smbconfoption name="kernel oplocks">no</smbconfoption>.
+ </para>
+
+</description>
+
+<related>oplocks</related>
+<related>kernel oplocks</related>
+<related>level2 oplocks</related>
+<value type="default">yes</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/locking/strictlocking.xml b/docs-xml/smbdotconf/locking/strictlocking.xml
new file mode 100644
index 0000000..89a1bf7
--- /dev/null
+++ b/docs-xml/smbdotconf/locking/strictlocking.xml
@@ -0,0 +1,31 @@
+<samba:parameter name="strict locking"
+ context="S"
+ type="enum"
+ enumlist="enum_bool_auto"
+ parm="1"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>
+ This is an enumerated type that controls the handling of file locking in the server. When this is set to <constant>yes</constant>,
+ the server will check every read and write access for file locks, and deny access if locks exist. This can be slow on
+ some systems.
+ </para>
+
+ <para>
+ When strict locking is set to Auto (the default), the server performs file lock checks only on non-oplocked files.
+ As most Windows redirectors perform file locking checks locally on oplocked files this is a good trade off for
+ improved performance.
+ </para>
+
+ <para>
+ When strict locking is disabled, the server performs file lock checks only when the client explicitly asks for them.
+ </para>
+
+ <para>
+ Well-behaved clients always ask for lock checks when it is important. So in the vast majority of cases,
+ <command moreinfo="none">strict locking = Auto</command> or
+ <command moreinfo="none">strict locking = no</command> is acceptable.
+ </para>
+</description>
+<value type="default">Auto</value>
+</samba:parameter>