From: Neil Brown <neilb@suse.de>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: linux-nfs@vger.kernel.org
Subject: Re: Strange lockup during unmount in 2.6.22 - maybe rpciod deadlock?
Date: Fri, 22 Feb 2008 11:31:57 +1100 [thread overview]
Message-ID: <18366.6141.122127.181304@notabene.brown> (raw)
In-Reply-To: message from Trond Myklebust on Thursday February 21
On Thursday February 21, trond.myklebust@fys.uio.no wrote:
>
> On Thu, 2008-02-21 at 15:58 +1100, Neil Brown wrote:
>
> > My question is: *why* cannot rpc_shutdown_client complete until all
> > active rpc_tasks complete? The use of reference counting ensure that
> > once they do all complete, the client will be finally released and any
> > relevant modules will also be released.
> >
> > Is there really any need to wait for completion?
>
> Looking at the code, I suspect that you can probably get rid of the
> rpc_shutdown_client() without creating too much trouble (since we now
> hold a reference to the vfsmount in most of the asynchronous
> operations).
>
> However the asynchronous sillyrenames are still a problem: if you don't
> wait for the sillyrename RPC call to complete, then you end up with the
> famous "Self-destruct in 5 seconds" message on umount (because we have
> to hold a reference to the directory inode for the duration of the RPC
> call if we want to avoid lookup races and cache consistency issues
> during normal operation).
Could the sillyrename call hold a reference to the vfsmount???
I guess that would mean that an unmount could fail with EBUSY when you
don't expect it...
Presumably the sillyrename delete happens on close... could the close
wait for the sillyrename delete to finish? That would hold everything
busy in a sensible way.
But I suspect there are good answers, you've doubtless thought about
it more than me :-)
> Hence, I think the extra workqueue is justified by the fact that rpciod
> cannot ever wait for the sillyrename calls to complete.
>
Sounds like we've arrived at a good solution - thanks!
Now I just have to decide which bits, if any, to bother back-porting
to OpenSUSE before I close the bug that started all of this :-)
NeilBrown
next prev parent reply other threads:[~2008-02-22 0:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-10 21:51 Strange lockup during unmount in 2.6.22 - maybe rpciod deadlock? Neil Brown
[not found] ` <18310.37731.29874.582772-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-01-10 22:41 ` Trond Myklebust
2008-01-11 1:07 ` Neil Brown
[not found] ` <18310.49514.808155.132856-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-01-11 1:26 ` Trond Myklebust
[not found] ` <1200004896.13775.27.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-01-14 19:01 ` Benjamin Coddington
2008-01-14 19:31 ` Trond Myklebust
[not found] ` <1200339108.7470.45.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-01-14 20:28 ` Benjamin Coddington
2008-01-14 20:36 ` Trond Myklebust
[not found] ` <1200343018.7470.56.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-01-14 21:09 ` J. Bruce Fields
2008-02-19 5:34 ` Neil Brown
[not found] ` <18362.27251.619125.502340-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-02-19 19:26 ` Trond Myklebust
[not found] ` <1203449166.8156.85.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-02-19 23:18 ` Trond Myklebust
2008-02-21 5:16 ` Neil Brown
[not found] ` <18365.2329.495660.107605-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-02-21 13:34 ` Trond Myklebust
2008-02-21 4:58 ` Neil Brown
[not found] ` <18365.1274.387629.944796-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-02-21 12:16 ` Jeff Layton
2008-02-21 15:27 ` Trond Myklebust
2008-02-22 0:31 ` Neil Brown [this message]
[not found] ` <18366.6141.122127.181304-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-02-22 0:41 ` Trond Myklebust
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=18366.6141.122127.181304@notabene.brown \
--to=neilb@suse.de \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@fys.uio.no \
/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