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>
Subject: Re: [PATCH 1/1] NFSv4.1 Use MDS auth flavor for data server connection
Date: Thu, 5 Sep 2013 11:44:29 -0400 [thread overview]
Message-ID: <CAHVgHyVWAsGUK9cTnekChFeCf8JbMRocioPrvAz6_EV8V7zCNQ@mail.gmail.com> (raw)
In-Reply-To: <1378395094.5450.7.camel@leira.trondhjem.org>
On Thu, Sep 5, 2013 at 11:31 AM, Myklebust, Trond
<Trond.Myklebust@netapp.com> wrote:
> On Thu, 2013-09-05 at 11:14 -0400, andros@netapp.com wrote:
>> From: Andy Adamson <andros@netapp.com>
>>
>> Commit 4edaa308 "NFS: Use "krb5i" to establish NFSv4 state whenever possible"
>> uses the nfs_client cl_rpcclient for all state management operations, and
>> will use krb5i or auth_sys with no regard to the mount command authflavor
>> choice.
>>
>> The MDS, as any NFSv4.1 mount point, uses the nfs_server rpc client for all
>> non-state management operations with a different nfs_server for each fsid
>> encountered traversing the mount point, each with a potentially different
>> auth flavor.
>>
>> pNFS data servers are not mounted in the normal sense as there is no associated
>> nfs_server structure. Data servers can also export multiple fsids, each with
>> a potentially different auth flavor.
>>
>> Data servers need to use the same authflavor as the MDS server rpc client for
>> non-state management operations. Populate a list of rpc clients with the MDS
>> server rpc client auth flavor for the DS to use.
>>
>> Signed-off-by: Andy Adamson <andros@netapp.com>
>> ---
>> fs/nfs/internal.h | 2 ++
>> fs/nfs/nfs4client.c | 75 +++++++++++++++++++++++++++++++++++++++++++++
>> fs/nfs/nfs4filelayout.c | 35 ++++++++++++++++-----
>> include/linux/nfs_fs_sb.h | 1 +
>> include/linux/sunrpc/clnt.h | 2 ++
>> net/sunrpc/clnt.c | 1 +
>> 6 files changed, 108 insertions(+), 8 deletions(-)
>>
> <snip>
>> diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
>> index 76c0bf6..3919f2b 100644
>> --- a/include/linux/sunrpc/clnt.h
>> +++ b/include/linux/sunrpc/clnt.h
>> @@ -35,6 +35,8 @@ struct rpc_clnt {
>> atomic_t cl_count; /* Number of references */
>> struct list_head cl_clients; /* Global list of clients */
>> struct list_head cl_tasks; /* List of tasks */
>> + struct list_head cl_ds_clnts; /* list of per auth flavor
>> + data servers */
>
> This list doesn't belong in the RPC layer. Please make a separate
> structure that lives in the NFS layer, and that owns the rpc_clnt.
>
> IOW something along the lines of:
>
> struct nfs_ds_server {
> struct list_head list; /* ds_clp->cl_ds_clients */
> struct rpc_clnt *rpc_clnt;
> };
OK
-->Andy
>
>> spinlock_t cl_lock; /* spinlock */
>> struct rpc_xprt __rcu * cl_xprt; /* transport */
>> struct rpc_procinfo * cl_procinfo; /* procedure info */
>> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
>> index baf0df6..3c18394 100644
>> --- a/net/sunrpc/clnt.c
>> +++ b/net/sunrpc/clnt.c
>> @@ -356,6 +356,7 @@ static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args,
>> goto out_no_stats;
>> clnt->cl_program = program;
>> INIT_LIST_HEAD(&clnt->cl_tasks);
>> + INIT_LIST_HEAD(&clnt->cl_ds_clnts);
>> spin_lock_init(&clnt->cl_lock);
>>
>> if (!xprt_bound(xprt))
>
> --
> Trond Myklebust
> Linux NFS client maintainer
>
> NetApp
> Trond.Myklebust@netapp.com
> www.netapp.com
prev parent reply other threads:[~2013-09-05 15:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-05 15:14 [PATCH 1/1] NFSv4.1 Use MDS auth flavor for data server connection andros
2013-09-05 15:31 ` Myklebust, Trond
2013-09-05 15:44 ` Andy Adamson [this message]
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=CAHVgHyVWAsGUK9cTnekChFeCf8JbMRocioPrvAz6_EV8V7zCNQ@mail.gmail.com \
--to=androsadamson@gmail.com \
--cc=Trond.Myklebust@netapp.com \
--cc=William.Adamson@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 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).