[pnfs] crashes hit after mount timeout
Benny Halevy
bhalevy at panasas.com
Thu May 3 12:57:51 EDT 2007
Due to a problem on my server I hit timeouts in the mount process
(printing "Couldn't mount using minorversion 1")
looks like server->client needs to be cleaned up after a mount
error, as well as clp->cl_session shouldn't be dereferenced
in nfs4_recover_expired_lease (for the minorversion 0 case)
Benny
diff -Npu /tmp/tmp.29426.4 /var/export/home/bhalevy/dev/p4.local/pnfs-dev/fs/nfs/super.c -L a/fs/nfs/super.c -L b/fs/nfs/super.c
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1313,6 +1313,7 @@ static int nfs4_fill_super(struct super_
server->client = nfs4_create_client(server, &timeparms, data->proto, authflavour);
if (IS_ERR(server->client)) {
err = PTR_ERR(server->client);
+ server->client = NULL;
printk(KERN_EMERG "%s: cannot create RPC client. Error = %d\n",
__FUNCTION__, err);
goto out_fail;
@@ -1329,6 +1330,7 @@ static int nfs4_fill_super(struct super_
if (err) {
printk(KERN_EMERG "Couldn't mount using minorversion %d\n", i);
rpc_shutdown_client(server->client);
+ server->client = NULL;
}
else
break;
diff -Npu /tmp/tmp.31257.1 /var/export/home/bhalevy/dev/p4.local/pnfs-dev/fs/nfs/nfs4proc.c -L a/fs/nfs/nfs4proc.c -L b/fs/nfs/nfs4proc.c
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -216,7 +216,8 @@ int nfs4_recover_expired_lease(struct nf
struct nfs4_client *clp = server->nfs4_state;
if (test_and_clear_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state)) {
- clp->cl_session->expired = 1;
+ if (clp->cl_session)
+ clp->cl_session->expired = 1;
nfs4_schedule_state_recovery(clp);
}
return nfs4_wait_clnt_recover(server->client, clp);
More information about the pNFS
mailing list