linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question on nfs40_discover_server_trunking.
@ 2013-01-18 21:28 Ben Greear
  2013-01-18 21:33 ` Chuck Lever
  0 siblings, 1 reply; 19+ messages in thread
From: Ben Greear @ 2013-01-18 21:28 UTC (permalink / raw)
  To: Chuck Lever, linux-nfs@vger.kernel.org

Any chance the STALE_CLIENTID case needs a 'break'?

Twice I've seen kernel crashes after the nfs40_walk_client_list
failed (though code comments say it should never fail).



int nfs40_discover_server_trunking(struct nfs_client *clp,
				   struct nfs_client **result,
				   struct rpc_cred *cred)
{
	struct nfs4_setclientid_res clid = {
		.clientid = clp->cl_clientid,
		.confirm = clp->cl_confirm,
	};
	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
	unsigned short port;
	int status;

	port = nn->nfs_callback_tcpport;
	if (clp->cl_addr.ss_family == AF_INET6)
		port = nn->nfs_callback_tcpport6;

	status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred, &clid);
	if (status != 0)
		goto out;
	clp->cl_clientid = clid.clientid;
	clp->cl_confirm = clid.confirm;

	status = nfs40_walk_client_list(clp, result, cred);
	switch (status) {
	case -NFS4ERR_STALE_CLIENTID:
		set_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state);
	case 0:
		/* Sustain the lease, even if it's empty.  If the clientid4
		 * goes stale it's of no use for trunking discovery. */
		nfs4_schedule_state_renewal(*result);
		break;
	}

out:
	return status;
}

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-01-21 17:33 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-18 21:28 Question on nfs40_discover_server_trunking Ben Greear
2013-01-18 21:33 ` Chuck Lever
2013-01-18 21:36   ` Ben Greear
2013-01-18 21:59   ` Ben Greear
2013-01-18 22:29     ` Chuck Lever
2013-01-18 22:34       ` Ben Greear
2013-01-18 22:43         ` Chuck Lever
2013-01-18 22:51           ` Ben Greear
2013-01-18 23:01             ` Ben Greear
2013-01-18 22:03   ` Myklebust, Trond
     [not found]   ` <1358546604.2872.6.camel@leira.trondhjem.org>
2013-01-18 22:59     ` Myklebust, Trond
2013-01-18 23:06       ` Ben Greear
2013-01-18 23:14       ` Chuck Lever
2013-01-18 23:21         ` Ben Greear
2013-01-19  0:44         ` Myklebust, Trond
     [not found]         ` <1358556248.2835.10.camel@leira.trondhjem.org>
2013-01-19  1:01           ` Myklebust, Trond
2013-01-19  1:27             ` Chuck Lever
2013-01-19  4:11               ` Myklebust, Trond
2013-01-21 17:32                 ` Ben Greear

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).