[dm-devel] [PATCH] libmultipath: safe limit max_fds
Christophe Varoqui
christophe.varoqui at opensvc.com
Thu Nov 3 13:15:48 UTC 2016
Hi PengLiang,
As no objection was raised, I'll merge this patch.
Can you resend with the necessary man page update explaining the new policy
for max_fds ?
Thanks.
On Thu, Oct 27, 2016 at 11:22 AM, <peng.liang5 at zte.com.cn> wrote:
> From: PengLiang <peng.liang5 at zte.com.cn>
>
> If user config the max_fds too small to less than actual open files of
> multipath,
> it will occur the error like "/lib/superpath/libchecktur.so: cannot open
> shared
> object file: Too many open files".
> So set a safe limit to 4096 when user config max_fds less than 4096.
>
> Signed-off-by: PengLiang <peng.liang5 at zte.com.cn>
> ---
> libmultipath/dict.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/libmultipath/dict.c b/libmultipath/dict.c
> index 7c21e72..7291e0e 100644
> --- a/libmultipath/dict.c
> +++ b/libmultipath/dict.c
> @@ -733,6 +733,9 @@ max_fds_handler(struct config *conf, vector strvec)
> if (conf->max_fds > max_fds)
> conf->max_fds = max_fds;
>
> + if (conf->max_fds < 4096)
> + conf->max_fds = 4096;
> +
> FREE(buff);
>
> return r;
> --
> 2.8.1.windows.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20161103/8a35dfe4/attachment.htm>
More information about the dm-devel
mailing list