From: "J. Bruce Fields" <bfields@fieldses.org>
To: NeilBrown <neilb@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
nfs@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [NFS] [PATCH 005 of 9] knfsd: Be more selective in which sockets lockd listens on.
Date: Wed, 26 Jul 2006 15:17:14 -0400 [thread overview]
Message-ID: <20060726191714.GE31172@fieldses.org> (raw)
In-Reply-To: <1060725015447.21957@suse.de>
On Tue, Jul 25, 2006 at 11:54:47AM +1000, NeilBrown wrote:
> @@ -112,6 +114,7 @@ lockd(struct svc_rqst *rqstp)
> * Let our maker know we're running.
> */
> nlmsvc_pid = current->pid;
> + nlmsvc_serv = serv;
Nitpick: any reason not to just get rid of the local variable "serv"
after that?
> @@ -224,8 +259,10 @@ lockd_up(void)
> /*
> * Check whether we're already up and running.
> */
> - if (nlmsvc_pid)
> + if (nlmsvc_pid) {
> + error = make_socks(nlmsvc_serv, proto);
> goto out;
...
> + if ((error = make_socks(serv, proto)) < 0) {
> if (warned++ == 0)
> printk(KERN_WARNING
> "lockd_up: makesock failed, error=%d\n", error);
The warning is printk'ed a little inconsistently. (If we care, maybe it
should just go inside make_socks?)
By the way, why don't most callers use the error returned from
lockd_up()?
> diff .prev/fs/nfsd/nfssvc.c ./fs/nfsd/nfssvc.c
> --- .prev/fs/nfsd/nfssvc.c 2006-07-24 15:14:31.000000000 +1000
> +++ ./fs/nfsd/nfssvc.c 2006-07-24 15:15:04.000000000 +1000
> @@ -134,6 +134,9 @@ static int killsig = 0; /* signal that w
> static void nfsd_last_thread(struct svc_serv *serv)
> {
> /* When last nfsd thread exits we need to do some clean-up */
> + struct svc_sock *svsk;
> + list_for_each_entry(svsk, &serv->sv_permsocks, sk_list)
> + lockd_down();
So I guess it's a minor point, but: we take the trouble to only open tcp
or udp sockets as necessary, but then won't close them down till all the
mounts and nfsd's go away at which point we close them all down.
Would it be that bad just to always listen on both?
--b.
next prev parent reply other threads:[~2006-07-26 19:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-25 1:54 [PATCH 000 of 9] knfsd: Introduction NeilBrown
2006-07-25 1:54 ` [PATCH 001 of 9] knfsd: knfsd: Add some missing newlines in printks NeilBrown
2006-07-25 1:54 ` [PATCH 002 of 9] knfsd: knfsd: Remove an unused variable from e_show() NeilBrown
2006-07-25 4:10 ` Josef Sipek
2006-07-25 4:20 ` Neil Brown
2006-07-25 4:24 ` [NFS] " Greg Banks
2006-07-25 4:32 ` Greg Banks
2006-07-25 4:36 ` Neil Brown
2006-07-25 5:53 ` Greg Banks
2006-07-25 1:54 ` [PATCH 003 of 9] knfsd: knfsd: Remove an unused variable from auth_unix_lookup() NeilBrown
2006-07-25 1:54 ` [PATCH 004 of 9] knfsd: Add a callback for when last rpc thread finishes NeilBrown
2006-07-25 1:54 ` [PATCH 005 of 9] knfsd: Be more selective in which sockets lockd listens on NeilBrown
2006-07-26 19:17 ` J. Bruce Fields [this message]
2006-07-28 2:32 ` [NFS] " Neil Brown
2006-07-25 1:54 ` [PATCH 006 of 9] knfsd: Remove nfsd_versbits as intermediate storage for desired versions NeilBrown
2006-07-26 19:34 ` [NFS] " J. Bruce Fields
2006-07-25 1:54 ` [PATCH 007 of 9] knfsd: Separate out some parts of nfsd_svc, which start nfs servers NeilBrown
2006-07-26 6:42 ` Andrew Morton
2006-07-25 1:55 ` [PATCH 008 of 9] knfsd: Define new nfsdfs file: portlist - contains list of ports NeilBrown
2006-07-25 1:55 ` [PATCH 009 of 9] knfsd: Allow sockets to be passed to nfsd via 'portlist' NeilBrown
2006-07-26 6:53 ` Andrew Morton
2006-07-26 20:41 ` [NFS] " J. Bruce Fields
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=20060726191714.GE31172@fieldses.org \
--to=bfields@fieldses.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=nfs@lists.sourceforge.net \
/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