Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Nov 2013 19:58:31 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r258184 - stable/8/sys/kern
Message-ID:  <201311151958.rAFJwVeb055690@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Fri Nov 15 19:58:31 2013
New Revision: 258184
URL: http://svnweb.freebsd.org/changeset/base/258184

Log:
  MFC 256274:
  Ignore attempts to set the nmbcluster sysctls to their current value
  rather than failing with an error.

Modified:
  stable/8/sys/kern/kern_mbuf.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/kern/   (props changed)

Modified: stable/8/sys/kern/kern_mbuf.c
==============================================================================
--- stable/8/sys/kern/kern_mbuf.c	Fri Nov 15 19:58:26 2013	(r258183)
+++ stable/8/sys/kern/kern_mbuf.c	Fri Nov 15 19:58:31 2013	(r258184)
@@ -128,7 +128,7 @@ sysctl_nmbclusters(SYSCTL_HANDLER_ARGS)
 
 	newnmbclusters = nmbclusters;
 	error = sysctl_handle_int(oidp, &newnmbclusters, 0, req); 
-	if (error == 0 && req->newptr) {
+	if (error == 0 && req->newptr && newnmbclusters != nmbclusters) {
 		if (newnmbclusters > nmbclusters) {
 			nmbclusters = newnmbclusters;
 			uma_zone_set_max(zone_clust, nmbclusters);
@@ -149,7 +149,7 @@ sysctl_nmbjumbop(SYSCTL_HANDLER_ARGS)
 
 	newnmbjumbop = nmbjumbop;
 	error = sysctl_handle_int(oidp, &newnmbjumbop, 0, req); 
-	if (error == 0 && req->newptr) {
+	if (error == 0 && req->newptr && newnmbjumbop != nmbjumbop) {
 		if (newnmbjumbop> nmbjumbop) {
 			nmbjumbop = newnmbjumbop;
 			uma_zone_set_max(zone_jumbop, nmbjumbop);
@@ -170,7 +170,7 @@ sysctl_nmbjumbo9(SYSCTL_HANDLER_ARGS)
 
 	newnmbjumbo9 = nmbjumbo9;
 	error = sysctl_handle_int(oidp, &newnmbjumbo9, 0, req); 
-	if (error == 0 && req->newptr) {
+	if (error == 0 && req->newptr && newnmbjumbo9 != nmbjumbo9) {
 		if (newnmbjumbo9> nmbjumbo9) {
 			nmbjumbo9 = newnmbjumbo9;
 			uma_zone_set_max(zone_jumbo9, nmbjumbo9);
@@ -190,7 +190,7 @@ sysctl_nmbjumbo16(SYSCTL_HANDLER_ARGS)
 
 	newnmbjumbo16 = nmbjumbo16;
 	error = sysctl_handle_int(oidp, &newnmbjumbo16, 0, req); 
-	if (error == 0 && req->newptr) {
+	if (error == 0 && req->newptr && newnmbjumbo16 != nmbjumbo16) {
 		if (newnmbjumbo16> nmbjumbo16) {
 			nmbjumbo16 = newnmbjumbo16;
 			uma_zone_set_max(zone_jumbo16, nmbjumbo16);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311151958.rAFJwVeb055690>