diff options
| author | Trond Myklebust <trond.myklebust@fys.uio.no> | 2002-03-11 22:04:53 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-03-11 22:04:53 -0800 |
| commit | dbd6e343b70c101fb43896110aed7d9b3442a1e9 (patch) | |
| tree | 2fbf6acffd50f3f92d91cb3026a5abc3ab7f0f9b /include | |
| parent | 36b319a69669c3e0bc2d3f4301a150c1860398f2 (diff) | |
[PATCH] 2.5.6 correct NFS client handling of EJUKEBOX error...
The following patch resyncs 2.5.6 with the 2.4.x series w.r.t. the
handling of the EJUKEBOX error. The latter is an NFS-specific error
that is returned by servers that support hierarchical storage: it
notifies the client that the request cannot be completed in a timely
fashion (Imagine for instance a situation where you have a cdrom
jukebox system, and the user has just requested a file on another cd).
Under these circumstances, the RFC specifies that the request should
be retried after suitable timeout during which the server will attempt
to perform whatever action is required to make the file available
again.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/nfs_fs.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index e95a085a2fdd..ef81457b484b 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -16,6 +16,7 @@ #include <linux/sunrpc/debug.h> #include <linux/sunrpc/auth.h> +#include <linux/sunrpc/clnt.h> #include <linux/nfs.h> #include <linux/nfs2.h> @@ -419,6 +420,29 @@ extern void * nfs_root_data(void); __retval; \ }) +#ifdef CONFIG_NFS_V3 + +#define NFS_JUKEBOX_RETRY_TIME (5 * HZ) +static inline int +nfs_async_handle_jukebox(struct rpc_task *task) +{ + if (task->tk_status != -EJUKEBOX) + return 0; + task->tk_status = 0; + rpc_restart_call(task); + rpc_delay(task, NFS_JUKEBOX_RETRY_TIME); + return 1; +} + +#else + +static inline int +nfs_async_handle_jukebox(struct rpc_task *task) +{ + return 0; +} +#endif /* CONFIG_NFS_V3 */ + #endif /* __KERNEL__ */ /* |
