From: Andi Kleen <ak@suse.de>
To: Rainer Krienke <krienke@uni-koblenz.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4.17:Increase number of anonymous filesystems beyond 256?
Date: 17 Jan 2002 18:49:53 +0100 [thread overview]
Message-ID: <p737kqgx3y6.fsf@oldwotan.suse.de> (raw)
In-Reply-To: <200201171351.g0HDpdK05456@bliss.uni-koblenz.de.suse.lists.linux.kernel>
In-Reply-To: Rainer Krienke's message of "17 Jan 2002 14:57:44 +0100"
Rainer Krienke <krienke@uni-koblenz.de> writes:
> Hello,
>
> I have to increase the number of anonymous filesystems the kernel can handle
> and found the array unnamed_dev_in_use fs/super.c and changed the array size
> from the default of 256 to 1024. Testing this patch by mounting more and more
> NFS-filesystems I found that still no more than 800 NFS mounts are possible.
> One more mount results in the kernel saying:
>
> Jan 17 14:03:11 gl kernel: RPC: Can't bind to reserved port (98).
Some NFS servers only accept connections from 'secure ports' < 1024.
You need one local port per connections. Some Ports <1024 are already
used by other services. This a natural limit with secure ports.
If you can configure your NFS server to not insist on secure ports
(it's usually an export option, unfortunately defaulting to on with
many OS) you can just use any ports. With the appended patch it should
work
[should be probably a sysctl instead of an #ifdef, but I'm too lazy
for that right now]
Another way if you wanted to avoid source patching would be to make
sure that different connections go via different source IP addresses;
e.g. by defining multiple IP aliases on the server and the client and
defining different routes for the server aliases with different local
ip addresses as prefered from address (=from option in iproute2).
This way the ports would be unique again because they're for multiple local
IP addresses; you would have 800 ports per local IP. Using the patch is
probably cleaner though.
Hope this helps,
-Andi
--- linux-work/net/sunrpc/xprt.c-o Mon Oct 8 21:36:07 2001
+++ linux-work/net/sunrpc/xprt.c Thu Jan 17 18:44:05 2002
@@ -1507,6 +1507,13 @@
memset(&myaddr, 0, sizeof(myaddr));
myaddr.sin_family = AF_INET;
+#define SUNRPC_NONSECURE_PORT 1
+#ifdef SUNRPC_NONSECURE_PORT
+ err = sock->ops->bind(sock, (struct sockaddr *) &myaddr,
+ sizeof(myaddr));
+ if (err < 0)
+ printk("RPC: cannot bind to a port\n");
+#else
port = 800;
do {
myaddr.sin_port = htons(port);
@@ -1516,6 +1523,9 @@
if (err < 0)
printk("RPC: Can't bind to reserved port (%d).\n", -err);
+
+#endif
+
return err;
}
-Andi
next parent reply other threads:[~2002-01-17 17:50 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200201171351.g0HDpdK05456@bliss.uni-koblenz.de.suse.lists.linux.kernel>
2002-01-17 17:49 ` Andi Kleen [this message]
[not found] ` <mailman.1011289920.22682.linux-kernel2news@redhat.com>
2002-01-22 17:32 ` Fwd: " Pete Zaitcev
2002-01-22 22:17 ` Andi Kleen
2002-01-22 22:34 ` Andi Kleen
[not found] <mailman.1011275640.16596.linux-kernel2news@redhat.com>
2002-01-17 18:55 ` Pete Zaitcev
2002-01-18 12:12 ` Rainer Krienke
2002-01-18 19:40 ` H. Peter Anvin
2002-01-20 10:33 ` Rainer krienke
2002-01-20 10:37 ` H. Peter Anvin
2002-01-18 20:33 ` Horst von Brand
2002-01-19 22:07 ` H. Peter Anvin
2002-01-21 22:54 ` Pete Zaitcev
2002-01-18 12:26 ` Trond Myklebust
2002-01-21 12:40 ` Rainer Krienke
2002-01-22 10:25 ` Rainer Krienke
2002-01-22 10:40 ` Trond Myklebust
2002-01-22 13:08 ` Rainer Krienke
2002-01-22 13:28 ` Trond Myklebust
2002-01-22 15:23 ` Rainer Krienke
2002-01-22 17:45 ` Pete Zaitcev
2002-01-24 8:58 ` Rainer Krienke
2002-01-24 17:16 ` Pete Zaitcev
2002-01-25 7:28 ` Rainer Krienke
2002-01-25 17:41 ` Pete Zaitcev
2002-01-25 18:34 ` Richard Gooch
2002-01-25 18:42 ` Pete Zaitcev
2002-01-24 17:29 ` Richard Gooch
2002-01-22 15:40 ` Trond Myklebust
2002-01-22 19:45 ` Pete Zaitcev
2002-01-17 13:51 Rainer Krienke
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=p737kqgx3y6.fsf@oldwotan.suse.de \
--to=ak@suse.de \
--cc=krienke@uni-koblenz.de \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®