All of lore.kernel.org
 help / color / mirror / Atom feed
From: bmarzins@sourceware.org
To: dm-cvs@sourceware.org, dm-devel@redhat.com
Subject: multipath-tools ./multipath.conf.annotated lib ...
Date: 29 Aug 2008 21:30:35 -0000	[thread overview]
Message-ID: <20080829213035.28009.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/dm
Module name:	multipath-tools
Branch: 	RHEL5_FC6
Changes by:	bmarzins@sourceware.org	2008-08-29 21:30:34

Modified files:
	.              : multipath.conf.annotated 
	libmultipath   : dict.c structs.h 
	multipathd     : main.c 

Log message:
	Fix for bz #457226. The kernel doesn't allow "ulimit -n unlimited" because
	you can't set the max number of open fds greater than NR_OPEN.  So multipath's
	max_fds config option now allows the value "max" instead of "unlimited", which
	sets the max open fds to NR_OPEN.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipath.conf.annotated.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.18.2.6&r2=1.18.2.7
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/dict.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.17.2.5&r2=1.17.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/structs.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.18.2.3&r2=1.18.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/main.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.69.2.8&r2=1.69.2.9

--- multipath-tools/multipath.conf.annotated	2008/08/25 20:59:05	1.18.2.6
+++ multipath-tools/multipath.conf.annotated	2008/08/29 21:30:34	1.18.2.7
@@ -84,7 +84,7 @@
 #	# scope   : multipathd
 #	# desc    : Sets the maximum number of open file descriptors for the
 #	#           multipathd process.
-#	# values  : unlimited|n > 0
+#	# values  : max|n > 0
 #	# default : None
 #	#
 #	max_fds		8192
--- multipath-tools/libmultipath/dict.c	2008/08/25 20:59:06	1.17.2.5
+++ multipath-tools/libmultipath/dict.c	2008/08/29 21:30:34	1.17.2.6
@@ -155,8 +155,8 @@
 		return 1;
 
 	if (strlen(buff) == 9 &&
-	    !strcmp(buff, "unlimited"))
-		conf->max_fds = MAX_FDS_UNLIMITED;
+	    !strcmp(buff, "max"))
+		conf->max_fds = MAX_FDS_MAX;
 	else
 		conf->max_fds = atoi(buff);
 	FREE(buff);
@@ -1653,8 +1653,8 @@
 	if (!conf->max_fds)
 		return 0;
 
-	if (conf->max_fds < 0)
-		return snprintf(buff, len, "unlimited");	
+	if (conf->max_fds == MAX_FDS_MAX)
+		return snprintf(buff, len, "max");	
 	return snprintf(buff, len, "%d", conf->max_fds);
 }
 
--- multipath-tools/libmultipath/structs.h	2008/08/25 20:59:06	1.18.2.3
+++ multipath-tools/libmultipath/structs.h	2008/08/29 21:30:34	1.18.2.4
@@ -20,7 +20,7 @@
 #define NO_PATH_RETRY_FAIL	-1
 #define NO_PATH_RETRY_QUEUE	-2
 
-#define MAX_FDS_UNLIMITED	-1
+#define MAX_FDS_MAX		(1024 * 1024)
 
 enum free_path_switch {
 	KEEP_PATHS,
--- multipath-tools/multipathd/main.c	2008/08/27 19:14:58	1.69.2.8
+++ multipath-tools/multipathd/main.c	2008/08/29 21:30:34	1.69.2.9
@@ -1479,14 +1479,9 @@
 
 	if (conf->max_fds) {
 		struct rlimit fd_limit;
-		if (conf->max_fds > 0) {
-			fd_limit.rlim_cur = conf->max_fds;
-			fd_limit.rlim_max = conf->max_fds;
-		}
-		else {
-			fd_limit.rlim_cur = RLIM_INFINITY;
-			fd_limit.rlim_max = RLIM_INFINITY;
-		}
+		
+		fd_limit.rlim_cur = conf->max_fds;
+		fd_limit.rlim_max = conf->max_fds;
 		if (setrlimit(RLIMIT_NOFILE, &fd_limit) < 0)
 			condlog(0, "can't set open fds limit to %d : %s\n",
 				conf->max_fds, strerror(errno));

             reply	other threads:[~2008-08-29 21:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-29 21:30 bmarzins [this message]
2009-01-16 21:30 multipath-tools ./multipath.conf.annotated lib bmarzins
2009-01-16 22:47 bmarzins
2009-04-29  4:41 bmarzins
2010-01-27 22:33 bmarzins
2010-04-08 19:31 bmarzins
2011-02-18 18:27 bmarzins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080829213035.28009.qmail@sourceware.org \
    --to=bmarzins@sourceware.org \
    --cc=dm-cvs@sourceware.org \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.