diff options
author | Alexandros Batsakis <batsakis@netapp.com> | 2009-12-05 13:46:14 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-12-05 13:46:14 -0500 |
commit | 0629e370dd5819efa5cf8d418a8e6729efe388ef (patch) | |
tree | 90883270cf5d677b13c81d0e6dbfaac38c5d18a9 /fs/nfs/nfs4state.c | |
parent | 2449ea2e191123729b2dc37a06fcb9d6ea7e2736 (diff) |
nfs41: check SEQUENCE status flag
the server can indicate a number of error conditions by setting the
appropriate bits in the SEQUENCE operation. The client re-establishes
state with the server when it receives one of those, with the action
depending on the specific case.
Signed-off-by: Alexandros Batsakis <batsakis@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 46c69e2248e3..a86f3acf3212 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -1173,6 +1173,28 @@ static int nfs4_reclaim_lease(struct nfs_client *clp) | |||
1173 | } | 1173 | } |
1174 | 1174 | ||
1175 | #ifdef CONFIG_NFS_V4_1 | 1175 | #ifdef CONFIG_NFS_V4_1 |
1176 | void nfs41_handle_sequence_flag_errors(struct nfs_client *clp, u32 flags) | ||
1177 | { | ||
1178 | if (!flags) | ||
1179 | return; | ||
1180 | else if (flags & SEQ4_STATUS_RESTART_RECLAIM_NEEDED) { | ||
1181 | set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); | ||
1182 | nfs4_state_start_reclaim_reboot(clp); | ||
1183 | nfs4_schedule_state_recovery(clp); | ||
1184 | } else if (flags & (SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED | | ||
1185 | SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED | | ||
1186 | SEQ4_STATUS_ADMIN_STATE_REVOKED | | ||
1187 | SEQ4_STATUS_RECALLABLE_STATE_REVOKED | | ||
1188 | SEQ4_STATUS_LEASE_MOVED)) { | ||
1189 | set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); | ||
1190 | nfs4_state_start_reclaim_nograce(clp); | ||
1191 | nfs4_schedule_state_recovery(clp); | ||
1192 | } else if (flags & (SEQ4_STATUS_CB_PATH_DOWN | | ||
1193 | SEQ4_STATUS_BACKCHANNEL_FAULT | | ||
1194 | SEQ4_STATUS_CB_PATH_DOWN_SESSION)) | ||
1195 | nfs_expire_all_delegations(clp); | ||
1196 | } | ||
1197 | |||
1176 | static void nfs4_session_recovery_handle_error(struct nfs_client *clp, int err) | 1198 | static void nfs4_session_recovery_handle_error(struct nfs_client *clp, int err) |
1177 | { | 1199 | { |
1178 | switch (err) { | 1200 | switch (err) { |