linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Umount and delegation release thread syncronization
@ 2011-06-20  7:45 Ian Kent
  2011-07-12  3:51 ` Ian Kent
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Kent @ 2011-06-20  7:45 UTC (permalink / raw)
  To: linux-nfs

Hi all,

I'm having difficulty working out how delegation release threads are
synchronized with umount.

For an information about the problem please see
https://bugzilla.kernel.org/show_bug.cgi?id=30882 and in particular
comment #28.

Can someone please give me a description of the sequence of events at
umount (aka. nfs4_kill_super() function calls). In particular how does
nfs_free_server() know that if nfs_super_return_all_delegations() starts
a thread that it is finished before freeing the server struct.

Any information or observations about the opps in the above bug would
also be appreciated.

Ian



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Umount and delegation release thread syncronization
  2011-06-20  7:45 Umount and delegation release thread syncronization Ian Kent
@ 2011-07-12  3:51 ` Ian Kent
  2011-07-25 19:30   ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Kent @ 2011-07-12  3:51 UTC (permalink / raw)
  To: linux-nfs; +Cc: Chuck Lever, Trond Myklebust

On Mon, 2011-06-20 at 15:45 +0800, Ian Kent wrote:
> Hi all,
> 
> I'm having difficulty working out how delegation release threads are
> synchronized with umount.
> 
> For an information about the problem please see
> https://bugzilla.kernel.org/show_bug.cgi?id=30882 and in particular
> comment #28.
> 
> Can someone please give me a description of the sequence of events at
> umount (aka. nfs4_kill_super() function calls). In particular how does
> nfs_free_server() know that if nfs_super_return_all_delegations() starts
> a thread that it is finished before freeing the server struct.

No response in almost a month. everyone must be really busy.

But does no-one know how this works?

Trond, could you have a look at the above bug and offer your input
please.

To be more specific, for the problem I'm asking about this is all we
have so far, http://obfusc.gavagai.nl/nfscrash.jpg.

As David Howells spotted the image shows that this isn't the first
backtrace from the crash so the answer may be "we can't tell" but how
about some help please.

> 
> Any information or observations about the opps in the above bug would
> also be appreciated.
> 
> Ian
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Umount and delegation release thread syncronization
  2011-07-12  3:51 ` Ian Kent
@ 2011-07-25 19:30   ` Trond Myklebust
  0 siblings, 0 replies; 3+ messages in thread
From: Trond Myklebust @ 2011-07-25 19:30 UTC (permalink / raw)
  To: Ian Kent; +Cc: linux-nfs, Chuck Lever

On Tue, 2011-07-12 at 11:51 +0800, Ian Kent wrote: 
> On Mon, 2011-06-20 at 15:45 +0800, Ian Kent wrote:
> > Hi all,
> > 
> > I'm having difficulty working out how delegation release threads are
> > synchronized with umount.
> > 
> > For an information about the problem please see
> > https://bugzilla.kernel.org/show_bug.cgi?id=30882 and in particular
> > comment #28.
> > 
> > Can someone please give me a description of the sequence of events at
> > umount (aka. nfs4_kill_super() function calls). In particular how does
> > nfs_free_server() know that if nfs_super_return_all_delegations() starts
> > a thread that it is finished before freeing the server struct.
> 
> No response in almost a month. everyone must be really busy.
> 
> But does no-one know how this works?
> 
> Trond, could you have a look at the above bug and offer your input
> please.

The only code that seems dubious there is the line

clp = NFS_SERVER(delegation->inode)->nfs_client;

Both the delegation and the nfs_client are guaranteed to still be around
whenever nfs_expire_unreferenced_delegations() is called: the RCU
protection of the clp->cl_superblock and server->delegations lists
ensures that.

However the delegation->inode is not guaranteed to still exist...

The obvious fix is to pass the struct nfs_server as a parameter to
nfs_mark_return_delegation() instead of trying to derive it from the
inode.

Cheers
  Trond

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-25 19:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-20  7:45 Umount and delegation release thread syncronization Ian Kent
2011-07-12  3:51 ` Ian Kent
2011-07-25 19:30   ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).