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: [PATCH 000 of 4] knfsd: Introduction
Date: Fri, 28 Jul 2006 17:10:00 -0400 [thread overview]
Message-ID: <20060728211000.GA19563@fieldses.org> (raw)
In-Reply-To: <20060728150606.29533.patches@notabene>
On Fri, Jul 28, 2006 at 03:09:40PM +1000, NeilBrown wrote:
> Following are 4 patches for knfsd in 2.6-mm-latest. They address some
> issues found by Bruce Fields greatly appreciated patch review. Thanks Bruce.
> They (like the patches they build on) are *not* 2.6.18 material.
By the way, the one thing that looked to me like a real bug was the
failure to do a lockd_down() when the user deletes a socket (comments
resent below), which these patches don't seem to deal with. Of course,
it's entirely possible I just didn't understand something....
--b.
On Tue, Jul 25, 2006 at 11:55:08AM +1000, NeilBrown wrote:
> + err = nfsd_create_serv();
> + if (!err) {
> + int proto = 0;
> + err = svc_addsock(nfsd_serv, fd, buf, &proto);
> + /* Decrease the count, but don't shutdown the
> + * the service
> + */
> + if (err >= 0)
> + lockd_up(proto);
> + nfsd_serv->sv_nrthreads--;
....
> @@ -211,8 +211,6 @@ static inline int nfsd_create_serv(void)
> nfsd_last_thread);
> if (nfsd_serv == NULL)
> err = -ENOMEM;
> - else
> - nfsd_serv->sv_nrthreads++;
I don't understand these sv_nrthreads changes.
> @@ -449,18 +450,23 @@ int one_sock_name(char *buf, struct svc_
> }
>
> int
> -svc_sock_names(char *buf, struct svc_serv *serv)
> +svc_sock_names(char *buf, struct svc_serv *serv, char *toclose)
> {
> - struct svc_sock *svsk;
> + struct svc_sock *svsk, *closesk = NULL;
> int len = 0;
>
> if (!serv) return 0;
> spin_lock(&serv->sv_lock);
> list_for_each_entry(svsk, &serv->sv_permsocks, sk_list) {
> int onelen = one_sock_name(buf+len, svsk);
> - len += onelen;
> + if (toclose && strcmp(toclose, buf+len) == 0)
> + closesk = svsk;
> + else
> + len += onelen;
> }
> spin_unlock(&serv->sv_lock);
> + if (closesk)
> + svc_delete_socket(closesk);
Am I missing something, or do we end up missing a lockd_down() in this
case? (Because nfsd_last_thread() isn't going to be calling
lockd_down() for this thread now that we've removed it from
sv_permsocks).
--b.
next prev parent reply other threads:[~2006-07-28 21:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-28 5:09 [PATCH 000 of 4] knfsd: Introduction NeilBrown
2006-07-28 5:09 ` NeilBrown
2006-07-28 5:09 ` [PATCH 001 of 4] knfsd: Drop 'serv' option to svc_recv and svc_process NeilBrown
2006-07-28 5:09 ` NeilBrown
2006-07-28 5:09 ` [PATCH 002 of 4] knfsd: Check return value of lockd_up in write_ports NeilBrown
2006-07-28 5:09 ` NeilBrown
2006-07-28 5:09 ` [PATCH 003 of 4] knfsd: Move makesock failed warning into make_socks NeilBrown
2006-07-28 5:09 ` NeilBrown
2006-07-28 5:10 ` [PATCH 004 of 4] knfsd: Correctly handle error condition from lockd_up NeilBrown
2006-07-28 5:10 ` NeilBrown
2006-07-28 21:10 ` J. Bruce Fields [this message]
2006-08-03 1:22 ` [PATCH 000 of 4] knfsd: Introduction Neil Brown
2006-08-03 1:22 ` [NFS] " Neil Brown
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=20060728211000.GA19563@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.