[PATCH] Removed unused 'oplock contention limit' config parameter

Christof Schmitt cs at samba.org
Wed Oct 18 19:19:10 UTC 2017


On Wed, Oct 18, 2017 at 09:04:33AM -0700, Jeremy Allison wrote:
> On Tue, Oct 17, 2017 at 02:58:57PM -0700, Christof Schmitt via samba-technical wrote:
> > It looks like this parameter has not been used for a long time.
> 
> You missed a couple of places. Here's an updated patch that
> shouldn't fail my autobuilds :-).
> 
> Can you review ? Thanks,

Sorry, i should have looked closer. The patch looks good:
Reviewed-by: Christof Schmitt <cs at samba.org>

> 
> Jeremy.

> From 7425ed9c71527a3f779156a4da26ff5acb59e266 Mon Sep 17 00:00:00 2001
> From: Christof Schmitt <cs at samba.org>
> Date: Tue, 17 Oct 2017 14:49:17 -0700
> Subject: [PATCH] Removed unused 'oplock contention limit' config parameter
> 
> Signed-off-by: Christof Schmitt <cs at samba.org>
> Reviewed-by: Jeremy Allison <jra at samba.org>
> ---
>  WHATSNEW.txt                                       |  1 +
>  .../smbdotconf/locking/oplockcontentionlimit.xml   | 26 ----------------------
>  examples/scripts/shares/python/smbparm.py          |  1 -
>  lib/param/loadparm.c                               |  2 --
>  source3/param/loadparm.c                           |  1 -
>  5 files changed, 1 insertion(+), 30 deletions(-)
>  delete mode 100644 docs-xml/smbdotconf/locking/oplockcontentionlimit.xml
> 
> diff --git a/WHATSNEW.txt b/WHATSNEW.txt
> index 2f2f2f61c98..cc03f2016c8 100644
> --- a/WHATSNEW.txt
> +++ b/WHATSNEW.txt
> @@ -40,6 +40,7 @@ smb.conf changes
>  
>    Parameter Name                     Description             Default
>    --------------                     -----------             -------
> +  oplock contention limit            Removed
>  
>  NT4-style replication based net commands removed
>  ================================================
> diff --git a/docs-xml/smbdotconf/locking/oplockcontentionlimit.xml b/docs-xml/smbdotconf/locking/oplockcontentionlimit.xml
> deleted file mode 100644
> index edaa7d7560a..00000000000
> --- a/docs-xml/smbdotconf/locking/oplockcontentionlimit.xml
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -<samba:parameter name="oplock contention limit"
> -                 context="S"
> -                 type="integer"
> -                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
> -<description>
> -	<para>
> -	This is a <emphasis>very</emphasis> advanced <citerefentry><refentrytitle>smbd</refentrytitle>
> -	<manvolnum>8</manvolnum></citerefentry> tuning option to improve the efficiency of the 
> -	granting of oplocks under multiple client contention for the same file.
> -	</para>
> -		
> -	<para>
> -	In brief it specifies a number, which causes <citerefentry><refentrytitle>smbd</refentrytitle>
> -	<manvolnum>8</manvolnum></citerefentry>not to grant an oplock even when requested if the 
> -	approximate number of clients contending for an oplock on the same file goes over this 
> -	limit. This causes <command moreinfo="none">smbd</command> to behave in a similar 
> -	way to Windows NT.
> -	</para>
> -
> -	<warning><para>
> -	DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ AND UNDERSTOOD THE SAMBA OPLOCK CODE.
> -	</para></warning>
> -
> -</description>
> -<value type="default">2</value>
> -</samba:parameter>
> diff --git a/examples/scripts/shares/python/smbparm.py b/examples/scripts/shares/python/smbparm.py
> index f182f57b4b3..e0786a4fd5b 100644
> --- a/examples/scripts/shares/python/smbparm.py
> +++ b/examples/scripts/shares/python/smbparm.py
> @@ -173,7 +173,6 @@ parm_table = {
>  	"PASSWDCHATDEBUG"        : ("passwd chat debug", SambaParmBool, P_GLOBAL, "No"),
>  	"SMBPASSWDFILE"          : ("smb passwd file", SambaParmString, P_GLOBAL, "/etc/samba/private/smbpasswd"),
>  	"GETQUOTACOMMAND"        : ("get quota command", SambaParmString, P_GLOBAL, ""),
> -	"OPLOCKCONTENTIONLIMIT"  : ("oplock contention limit", SambaParmString, P_LOCAL, "2"),
>  	"DOMAINMASTER"           : ("domain master", SambaParmString, P_GLOBAL, "Auto"),
>  	"DELETESHARECOMMAND"     : ("delete share command", SambaParmString, P_GLOBAL, ""),
>  	"INVALIDUSERS"           : ("invalid users", SambaParmString, P_LOCAL, ""),
> diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
> index b91f9657f1c..a74a8734271 100644
> --- a/lib/param/loadparm.c
> +++ b/lib/param/loadparm.c
> @@ -2935,8 +2935,6 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
>  
>  	lpcfg_do_global_parameter(lp_ctx, "blocking locks", "yes");
>  
> -	lpcfg_do_global_parameter(lp_ctx, "oplock contention limit", "2");
> -
>  	lpcfg_do_global_parameter(lp_ctx, "load printers", "yes");
>  
>  	lpcfg_do_global_parameter(lp_ctx, "idmap cache time", "604800");
> diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
> index 42e579efcfd..02c3eb661aa 100644
> --- a/source3/param/loadparm.c
> +++ b/source3/param/loadparm.c
> @@ -168,7 +168,6 @@ static struct loadparm_service sDefault =
>  	.max_connections = 0,
>  	.default_case = CASE_LOWER,
>  	.printing = DEFAULT_PRINTING,
> -	.oplock_contention_limit = 2,
>  	.csc_policy = 0,
>  	.block_size = 1024,
>  	.dfree_cache_time = 0,
> -- 
> 2.15.0.rc1.287.g2b38de12cc-goog
> 




More information about the samba-technical mailing list