diff options
Diffstat (limited to 'fs/nfs/nfs3proc.c')
-rw-r--r-- | fs/nfs/nfs3proc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index ed67567f0556..7204ba5b2bf8 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/smp_lock.h> | 19 | #include <linux/smp_lock.h> |
20 | #include <linux/nfs_mount.h> | 20 | #include <linux/nfs_mount.h> |
21 | 21 | ||
22 | #include "iostat.h" | ||
23 | |||
22 | #define NFSDBG_FACILITY NFSDBG_PROC | 24 | #define NFSDBG_FACILITY NFSDBG_PROC |
23 | 25 | ||
24 | extern struct rpc_procinfo nfs3_procedures[]; | 26 | extern struct rpc_procinfo nfs3_procedures[]; |
@@ -58,10 +60,11 @@ nfs3_rpc_call_wrapper(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, i | |||
58 | nfs3_rpc_wrapper(clnt, msg, flags) | 60 | nfs3_rpc_wrapper(clnt, msg, flags) |
59 | 61 | ||
60 | static int | 62 | static int |
61 | nfs3_async_handle_jukebox(struct rpc_task *task) | 63 | nfs3_async_handle_jukebox(struct rpc_task *task, struct inode *inode) |
62 | { | 64 | { |
63 | if (task->tk_status != -EJUKEBOX) | 65 | if (task->tk_status != -EJUKEBOX) |
64 | return 0; | 66 | return 0; |
67 | nfs_inc_stats(inode, NFSIOS_DELAY); | ||
65 | task->tk_status = 0; | 68 | task->tk_status = 0; |
66 | rpc_restart_call(task); | 69 | rpc_restart_call(task); |
67 | rpc_delay(task, NFS_JUKEBOX_RETRY_TIME); | 70 | rpc_delay(task, NFS_JUKEBOX_RETRY_TIME); |
@@ -447,7 +450,7 @@ nfs3_proc_unlink_done(struct dentry *dir, struct rpc_task *task) | |||
447 | struct rpc_message *msg = &task->tk_msg; | 450 | struct rpc_message *msg = &task->tk_msg; |
448 | struct nfs_fattr *dir_attr; | 451 | struct nfs_fattr *dir_attr; |
449 | 452 | ||
450 | if (nfs3_async_handle_jukebox(task)) | 453 | if (nfs3_async_handle_jukebox(task, dir->d_inode)) |
451 | return 1; | 454 | return 1; |
452 | if (msg->rpc_argp) { | 455 | if (msg->rpc_argp) { |
453 | dir_attr = (struct nfs_fattr*)msg->rpc_resp; | 456 | dir_attr = (struct nfs_fattr*)msg->rpc_resp; |
@@ -748,7 +751,7 @@ static void nfs3_read_done(struct rpc_task *task, void *calldata) | |||
748 | { | 751 | { |
749 | struct nfs_read_data *data = calldata; | 752 | struct nfs_read_data *data = calldata; |
750 | 753 | ||
751 | if (nfs3_async_handle_jukebox(task)) | 754 | if (nfs3_async_handle_jukebox(task, data->inode)) |
752 | return; | 755 | return; |
753 | /* Call back common NFS readpage processing */ | 756 | /* Call back common NFS readpage processing */ |
754 | if (task->tk_status >= 0) | 757 | if (task->tk_status >= 0) |
@@ -786,7 +789,7 @@ static void nfs3_write_done(struct rpc_task *task, void *calldata) | |||
786 | { | 789 | { |
787 | struct nfs_write_data *data = calldata; | 790 | struct nfs_write_data *data = calldata; |
788 | 791 | ||
789 | if (nfs3_async_handle_jukebox(task)) | 792 | if (nfs3_async_handle_jukebox(task, data->inode)) |
790 | return; | 793 | return; |
791 | if (task->tk_status >= 0) | 794 | if (task->tk_status >= 0) |
792 | nfs_post_op_update_inode(data->inode, data->res.fattr); | 795 | nfs_post_op_update_inode(data->inode, data->res.fattr); |
@@ -833,7 +836,7 @@ static void nfs3_commit_done(struct rpc_task *task, void *calldata) | |||
833 | { | 836 | { |
834 | struct nfs_write_data *data = calldata; | 837 | struct nfs_write_data *data = calldata; |
835 | 838 | ||
836 | if (nfs3_async_handle_jukebox(task)) | 839 | if (nfs3_async_handle_jukebox(task, data->inode)) |
837 | return; | 840 | return; |
838 | if (task->tk_status >= 0) | 841 | if (task->tk_status >= 0) |
839 | nfs_post_op_update_inode(data->inode, data->res.fattr); | 842 | nfs_post_op_update_inode(data->inode, data->res.fattr); |