linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Adamson <androsadamson@gmail.com>
To: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
Cc: "Adamson, Andy" <William.Adamson@netapp.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH 3/3] NFSv4.1 do not clear NFS_DELEAGED_STATE until stateid is tested
Date: Tue, 6 Mar 2012 09:55:52 -0500	[thread overview]
Message-ID: <CAHVgHyW=vs126WHjSWQYRG=-h76e4ruoYCBROP70QyM55PJrYg@mail.gmail.com> (raw)
In-Reply-To: <1331045602.3260.7.camel@lade.trondhjem.org>

On Tue, Mar 6, 2012 at 9:53 AM, Myklebust, Trond
<Trond.Myklebust@netapp.com> wrote:
> On Tue, 2012-03-06 at 09:46 -0500, andros@netapp.com wrote:
>> From: Andy Adamson <andros@netapp.com>
>>
>> nfs41_open_expired() will test the delegation stateid based on
>> NFS_DELEGATED_STATE being set. If the stateid is bad, nfs4_open_recover
>> will clear the NFS_DELEGATED_STATE bit recovering the delegation.
>>
>> Signed-off-by: Andy Adamson <andros@netapp.com>
>> Cc: stable@vger.kernel.org
>> ---
>>  fs/nfs/nfs4state.c |    5 ++++-
>>  1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
>> index 7bd9822..44fcd60 100644
>> --- a/fs/nfs/nfs4state.c
>> +++ b/fs/nfs/nfs4state.c
>> @@ -696,7 +696,10 @@ static void __nfs4_close(struct nfs4_state *state,
>>                       call_close |= test_bit(NFS_O_RDWR_STATE, &state->flags);
>>               }
>>               if (newstate == 0)
>> +{
>> +printk("%s CLEAR NFS_DELEGATED_STATE state %p\n", __func__, state);
>>                       clear_bit(NFS_DELEGATED_STATE, &state->flags);
>> +}\
>
> Ewww.....


yep, still had stupid development messages -- resent immediately!

-->Andy
>
>>       }
>>       nfs4_state_set_mode_locked(state, newstate);
>>       spin_unlock(&owner->so_lock);
>> @@ -1097,7 +1100,7 @@ void nfs4_schedule_stateid_recovery(const struct nfs_server *server, struct nfs4
>>  {
>>       struct nfs_client *clp = server->nfs_client;
>>
>> -     if (test_and_clear_bit(NFS_DELEGATED_STATE, &state->flags))
>> +     if (test_bit(NFS_DELEGATED_STATE, &state->flags))
>>               nfs_async_inode_return_delegation(state->inode, &state->stateid);
>>       nfs4_state_mark_reclaim_nograce(clp, state);
>>       nfs4_schedule_state_manager(clp);
>
> Actually, the latest incarnation of the patch 2/3 removes the
> async_inode_return_delegation from nfs4_schedule_stateid_recovery. We
> don't need to return the delegation if all the stateids have been marked
> for return, and we've thrown out the delegation itself.
>
> Let's not hurry this into the stable tree yet...
>
> --
> Trond Myklebust
> Linux NFS client maintainer
>
> NetApp
> Trond.Myklebust@netapp.com
> www.netapp.com
>

  reply	other threads:[~2012-03-06 14:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06 14:46 [PATCH 0/3] NFS recover from delegation stateid error andros
2012-03-06 14:46 ` [PATCH 1/3] NFSv4.1: Fix the checking of the stateid when returning a delegation andros
2012-03-06 14:57   ` Myklebust, Trond
2012-03-06 15:13     ` Adamson, Andy
2012-03-06 18:20       ` J. Bruce Fields
2012-03-06 14:46 ` [PATCH 2/3] NFS: Properly handle the case where the delegation is revoked andros
2012-03-06 14:46 ` [PATCH 3/3] NFSv4.1 do not clear NFS_DELEAGED_STATE until stateid is tested andros
2012-03-06 14:53   ` Myklebust, Trond
2012-03-06 14:55     ` Andy Adamson [this message]
2012-03-06 15:12     ` Andy Adamson
2012-03-06 15:17       ` Myklebust, Trond
  -- strict thread matches above, loose matches on Subject: below --
2012-03-06 14:54 andros

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='CAHVgHyW=vs126WHjSWQYRG=-h76e4ruoYCBROP70QyM55PJrYg@mail.gmail.com' \
    --to=androsadamson@gmail.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=William.Adamson@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=stable@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).