linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFS: Fix a few issues with cached state owners
Date: Wed, 04 Jan 2012 17:03:32 -0500	[thread overview]
Message-ID: <1325714612.25276.1.camel@lade.trondhjem.org> (raw)
In-Reply-To: <A9614C89-6666-420F-B945-B5C879034086@oracle.com>

On Wed, 2012-01-04 at 16:58 -0500, Chuck Lever wrote: 
> On Jan 4, 2012, at 4:56 PM, Chuck Lever wrote:
> 
> > 
> > On Jan 4, 2012, at 4:52 PM, Trond Myklebust wrote:
> > 
> >> The garbage collector needs to remove the entry from the lru list
> >> _and_ the red-black tree atomically in order avoid races in
> >> nfs4_get_state_owner.
> >> 
> >> Fix a case in nfs4_get_state_owner in which the garbage-collector
> >> list was being manipulated while not holding the appropriate spin
> >> lock.
> >> 
> >> nfs4_drop_state_owner doesn't need to look at sp->so_lru: the caller
> >> must have a reference to the state owner, so it can't be on the
> >> garbage-collection list.
> >> 
> >> Run the garbage collector _after_ we've looked up the state owner
> >> for efficiency reasons.
> >> 
> >> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
> > 
> > Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
> 
> You might consider squashing this with my patch.  The list_del_init() outside the cl_lock is enough to warrant it.

Sure, as long as you're fine with that.

-- 
Trond Myklebust
Linux NFS client maintainer

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


  reply	other threads:[~2012-01-04 22:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06 21:13 [PATCH 0/2] Cache state owners [take 2] Chuck Lever
2011-12-06 21:13 ` [PATCH 1/2] NFS: Clean up nfs4_find_state_owners_locked() Chuck Lever
2011-12-06 21:13 ` [PATCH 2/2] NFS: Cache state owners after files are closed Chuck Lever
2012-01-04 15:53   ` Trond Myklebust
2012-01-04 15:59     ` Trond Myklebust
2012-01-04 16:08       ` Chuck Lever
2012-01-04 16:14         ` Trond Myklebust
2012-01-04 17:07           ` Chuck Lever
2012-01-04 17:14             ` Trond Myklebust
2012-01-04 21:52               ` [PATCH] NFS: Fix a few issues with cached state owners Trond Myklebust
2012-01-04 21:56                 ` Chuck Lever
2012-01-04 21:58                   ` Chuck Lever
2012-01-04 22:03                     ` Trond Myklebust [this message]
2012-01-04 22:07                       ` Chuck Lever
2012-01-04 22:27                         ` [PATCH] NFS: Cache state owners after files are closed Trond Myklebust
2012-01-04 22:29                           ` Trond Myklebust
2012-01-04 22:39                             ` Chuck Lever
2012-01-04 23:10                           ` Chuck Lever

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=1325714612.25276.1.camel@lade.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).