* [PATCH 0/3] nfs41 fixes for 2.6.31
@ 2009-06-30 17:03 Benny Halevy
2009-06-30 17:06 ` [PATCH 3/3] nfs41: pass state recovery error back to caller Benny Halevy
0 siblings, 1 reply; 2+ messages in thread
From: Benny Halevy @ 2009-06-30 17:03 UTC (permalink / raw)
To: Trond Myklebust; +Cc: NFS list, pNFS Mailing List
Trond,
please consider the following patches for 2.6.31-rc
[PATCH 1/3] nfs41: sunrpc: #include <linux/net.h> from sunrpc.h
fixes compiler warning
[PATCH 2/3] nfs4: record nfs4_reclaim_lease error in cl_cons_state
[PATCH 3/3] nfs41: pass state recovery error back to caller
These 2 patches deal with lease recovery error handling.
This is most visible at mount time when, e.g. when the server exports entry
exported a non-existing path, mounting over nfs4.0 got into a loop
broken only with ^C and mounting with minorversion=1 always returned
the wrong error (-EPROTONOSUPPORT)
fs/nfs/client.c | 10 +++-------
fs/nfs/nfs4proc.c | 16 ++++++++++++----
fs/nfs/nfs4state.c | 2 ++
net/sunrpc/sunrpc.h | 2 ++
4 files changed, 19 insertions(+), 11 deletions(-)
Benny
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 3/3] nfs41: pass state recovery error back to caller
2009-06-30 17:03 [PATCH 0/3] nfs41 fixes for 2.6.31 Benny Halevy
@ 2009-06-30 17:06 ` Benny Halevy
0 siblings, 0 replies; 2+ messages in thread
From: Benny Halevy @ 2009-06-30 17:06 UTC (permalink / raw)
To: Trond Myklebust; +Cc: linux-nfs, pnfs, Benny Halevy, Andy Adamson
Currently the error returned from create_session to the state manager
is recorded in cl_cons_state via nfs_mark_client_ready
but it is ignored by nfs4_check_client_ready and mis-translated to
-EPROTONOSUPPORT if the client has a session.
Fixes https://bugzilla.linux-nfs.org/show_bug.cgi?id=178
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Cc: Andy Adamson <andros@netapp.com>
---
fs/nfs/client.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 157a1d9..b3f8307 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -536,16 +536,11 @@ void nfs_mark_client_ready(struct nfs_client *clp, int state)
/*
* With sessions, the client is not marked ready until after a
* successful EXCHANGE_ID and CREATE_SESSION.
- *
- * Map errors cl_cons_state errors to EPROTONOSUPPORT to indicate
- * other versions of NFS can be tried.
*/
int nfs4_check_client_ready(struct nfs_client *clp)
{
- if (!nfs4_has_session(clp))
- return 0;
- if (clp->cl_cons_state < NFS_CS_READY)
- return -EPROTONOSUPPORT;
+ if (clp->cl_cons_state < 0)
+ return clp->cl_cons_state;
return 0;
}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-30 17:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-30 17:03 [PATCH 0/3] nfs41 fixes for 2.6.31 Benny Halevy
2009-06-30 17:06 ` [PATCH 3/3] nfs41: pass state recovery error back to caller Benny Halevy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox