dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Christophe Varoqui <christophe.varoqui@gmail.com>
To: Benjamin Marzinski <bmarzins@redhat.com>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH] multipath: Set the default max_fds to the system max
Date: Sat, 12 Nov 2011 11:17:57 +0100	[thread overview]
Message-ID: <1321093077.14506.7.camel@lapoo.opensvc.com> (raw)
In-Reply-To: <20111112051021.GE24133@ether.msp.redhat.com>

On ven., 2011-11-11 at 23:10 -0600, Benjamin Marzinski wrote:
> Since many people don't realize that they need to set max_fds until they run
> out of file descriptors, default to the system max.
> 
Applied

> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
>  libmultipath/config.c |    2 +-
>  libmultipath/dict.c   |    2 +-
>  libmultipath/dict.h   |    1 +
>  3 files changed, 3 insertions(+), 2 deletions(-)
> 
> Index: multipath-tools-111111/libmultipath/config.c
> ===================================================================
> --- multipath-tools-111111.orig/libmultipath/config.c
> +++ multipath-tools-111111/libmultipath/config.c
> @@ -493,7 +493,7 @@ load_config (char * file)
>  	conf->dev_type = DEV_NONE;
>  	conf->minio = DEFAULT_MINIO;
>  	conf->minio_rq = DEFAULT_MINIO_RQ;
> -	conf->max_fds = 0;
> +	get_sys_max_fds(&conf->max_fds);
>  	conf->bindings_file = set_default(DEFAULT_BINDINGS_FILE);
>  	conf->bindings_read_only = 0;
>  	conf->multipath_dir = set_default(DEFAULT_MULTIPATHDIR);
> Index: multipath-tools-111111/libmultipath/dict.c
> ===================================================================
> --- multipath-tools-111111.orig/libmultipath/dict.c
> +++ multipath-tools-111111/libmultipath/dict.c
> @@ -255,7 +255,7 @@ def_minio_rq_handler(vector strvec)
>  	return 0;
>  }
>  
> -static int
> +int
>  get_sys_max_fds(int *max_fds)
>  {
>  	FILE *file;
> Index: multipath-tools-111111/libmultipath/dict.h
> ===================================================================
> --- multipath-tools-111111.orig/libmultipath/dict.h
> +++ multipath-tools-111111/libmultipath/dict.h
> @@ -6,5 +6,6 @@
>  #endif
>  
>  void init_keywords(void);
> +int get_sys_max_fds(int *);
>  
>  #endif /* _DICT_H */

      reply	other threads:[~2011-11-12 10:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-12  5:10 [PATCH] multipath: Set the default max_fds to the system max Benjamin Marzinski
2011-11-12 10:17 ` Christophe Varoqui [this message]

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=1321093077.14506.7.camel@lapoo.opensvc.com \
    --to=christophe.varoqui@gmail.com \
    --cc=bmarzins@redhat.com \
    --cc=christophe.varoqui@opensvc.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).