Re: Fwd: Re: 2.4.17:Increase number of anonymous filesystems beyond 256?

Pete Zaitcev (zaitcev@redhat.com)
Tue, 22 Jan 2002 12:32:20 -0500


> From: Andi Kleen <ak@suse.de>
> Newsgroups: linux-kernel
> Date: 17 Jan 2002 18:49:53 +0100

> --- 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, the patch above begs two questions in my mind:

1. Why to bind to 0 (INADDR_ANY) explicitly? My patch does not bind
at all and expects connect() to bind automatically. It is how
userland works and it seems to work here as well.

2. What did you do to increase the number of unnamed devices?
You said the patch "should" work, did that mean you did not test it?

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/