nfs41 fixes for 2.6.31
Subsystems (2)
cover nfs41 fixes for 2.6.31
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
PATCH 3/3 nfs41: pass state recovery error back to caller
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
--- fs/nfs/client.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-)
fs/nfs/client.c +2 -7
@@ -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 ; }
Signature · 1 line
1.6.3.3