All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Adamson, Dros" <Weston.Adamson@netapp.com>
To: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
Cc: "Adamson, Dros" <Weston.Adamson@netapp.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] NFSv4.1: clean up after using machine cred
Date: Tue, 10 Sep 2013 21:08:31 +0000	[thread overview]
Message-ID: <99A4AB2C-5C44-4F9D-8D7A-4601AC07DCB0@netapp.com> (raw)
In-Reply-To: <1378841499.21916.22.camel@leira.trondhjem.org>

Yes, I thought about this approach, but backed away since we do get/put_rpccred on the cl_machine_cred elsewhere (like nfs4_get_machine_cred_locked).

Shall I submit a new patch that gets rid of get/put_rpccred?

Do we also want to change other uses of cl_machine_cred?

Thanks,
-dros

On Sep 10, 2013, at 3:31 PM, "Myklebust, Trond" <Trond.Myklebust@netapp.com>
 wrote:

> On Tue, 2013-09-10 at 14:55 -0400, Weston Andros Adamson wrote:
>> Client calls get_rpccred when referencing the machine cred, so it must call
>> put_rpccred after passing cred to rpc layer.
>> 
>> This patch also moves nfs4_sp4_init (formerly nfs4_state_protect) to right
>> before the call to rpc_run_task (and wrappers of rpc_run_task) to minimize
>> error path cleanup code.
>> 
> 
> Do we really need this? AFAICS once the clp->cl_machine_cred is set, it
> isn't freed until the call to nfs_free_client(). In fact, we probably
> _rely_ on this being the case for SP4_MACH_CRED, since if the machine
> cred were to change, we'd no longer be able to change our session or
> lease.
> 
> IOW: instead of referencing the cred via get/put_rpccred(), maybe we can
> just feed the current value of clp->cl_machine_cred into the
> msg->rpc_cred.
> 
> -- 
> Trond Myklebust
> Linux NFS client maintainer
> 
> NetApp
> Trond.Myklebust@netapp.com
> www.netapp.com


  reply	other threads:[~2013-09-10 21:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10 18:55 [PATCH 0/2] NFSv4.1: sp4_mach_cred cleanup Weston Andros Adamson
2013-09-10 18:55 ` [PATCH 1/2] NFSv4.1: clean up after using machine cred Weston Andros Adamson
2013-09-10 19:31   ` Myklebust, Trond
2013-09-10 21:08     ` Adamson, Dros [this message]
2013-09-10 21:53       ` Myklebust, Trond
2013-09-10 18:55 ` [PATCH 2/2] NFSv4.1: sp4_mach_cred: ask for WRITE and COMMIT Weston Andros Adamson

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=99A4AB2C-5C44-4F9D-8D7A-4601AC07DCB0@netapp.com \
    --to=weston.adamson@netapp.com \
    --cc=Trond.Myklebust@netapp.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 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.