Re: [PATCH] libmultipath: safe limit max_fds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> wrote:
From: PengLiang <peng.liang5@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 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


--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux