From: Jeff Layton <jlayton@redhat.com>
To: linux-nfs@vger.kernel.org, nfsv4@linux-nfs.org
Subject: why does each NFS mount have (at least) 2 rpc_clnt's ?
Date: Thu, 1 Apr 2010 08:46:20 -0400 [thread overview]
Message-ID: <20100401084620.3475d4c0@barsoom.rdu.redhat.com> (raw)
I'm working on an issue in an older kernel where we see occasional
panics when trying to refresh credentials. Here's the bug in case
anyone is interested:
https://bugzilla.redhat.com/show_bug.cgi?id=572870
...I think I understand the problem well enough now. The problem is
pretty complex, but the issue is that some operations are done using
credentials from a stateowner associated with a nfs_client, but using
the rpc_clnt in nfs_server->client. The two can have different
authtypes if there are a mix of mounts with different authtypes to the
same server. This problem seems to have been fixed in mainline with the
introduction of the auth_generic code.
It leaves me wondering though...what exactly is the reason for having
two rpc_clients per NFS mount? To clarify, I'm talking about these two,
which seem to be somewhat redundant:
nfs_server->client
nfs_server->nfs_client->cl_rpcclient
On mount, the nfs4_set_client calls nfs_get_client to search the list
of nfs_client structs until it finds one that matches the address, port,
etc of the NFS server. If one isn't found, the kernel creates one using
whatever authtype was requested for the mount.
Later, nfs_init_server_rpcclient looks at the rpc_clnt in the
nfs_client and copies it. If the auth pseudoflavor doesn't match
however, it creates a new rpc_auth for it.
What exactly is the point of having two rpc_clnt's? Why not just get
always use nfs_client->cl_rpcclient instead of nfs_server->client and
simply have nfs_get_client filter by authtype?
--
Jeff Layton <jlayton@redhat.com>
_______________________________________________
NFSv4 mailing list
NFSv4@linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
next reply other threads:[~2010-04-01 12:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-01 12:46 Jeff Layton [this message]
2010-04-01 13:17 ` why does each NFS mount have (at least) 2 rpc_clnt's ? Trond Myklebust
2010-04-01 13:26 ` Ondrej Valousek
2010-04-01 14:07 ` Trond Myklebust
2010-04-01 14:12 ` Ondrej Valousek
2010-04-01 17:26 ` Jeff Layton
2010-04-01 18:00 ` Trond Myklebust
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=20100401084620.3475d4c0@barsoom.rdu.redhat.com \
--to=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=nfsv4@linux-nfs.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