diff options
author | Weston Andros Adamson <dros@netapp.com> | 2012-02-17 13:15:24 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-02-17 13:39:47 -0500 |
commit | 0a702195234eb77c4097148285cccf7f095de9cf (patch) | |
tree | 40fead6b131fb3c24e3cd85e39fbba8057196457 /net/sunrpc/stats.c | |
parent | b6bf6e7d6f6fae1ddcae9e02dfe676bdc8fe892c (diff) |
NFS: include filelayout DS rpc stats in mountstats
Include RPC statistics from all data servers in /proc/self/mountstats for pNFS
filelayout mounts.
Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/stats.c')
-rw-r--r-- | net/sunrpc/stats.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c index 3c4f6888c891..1eb3304bc105 100644 --- a/net/sunrpc/stats.c +++ b/net/sunrpc/stats.c | |||
@@ -133,20 +133,19 @@ EXPORT_SYMBOL_GPL(rpc_free_iostats); | |||
133 | /** | 133 | /** |
134 | * rpc_count_iostats - tally up per-task stats | 134 | * rpc_count_iostats - tally up per-task stats |
135 | * @task: completed rpc_task | 135 | * @task: completed rpc_task |
136 | * @stats: array of stat structures | ||
136 | * | 137 | * |
137 | * Relies on the caller for serialization. | 138 | * Relies on the caller for serialization. |
138 | */ | 139 | */ |
139 | void rpc_count_iostats(struct rpc_task *task) | 140 | void rpc_count_iostats(const struct rpc_task *task, struct rpc_iostats *stats) |
140 | { | 141 | { |
141 | struct rpc_rqst *req = task->tk_rqstp; | 142 | struct rpc_rqst *req = task->tk_rqstp; |
142 | struct rpc_iostats *stats; | ||
143 | struct rpc_iostats *op_metrics; | 143 | struct rpc_iostats *op_metrics; |
144 | ktime_t delta; | 144 | ktime_t delta; |
145 | 145 | ||
146 | if (!task->tk_client || !task->tk_client->cl_metrics || !req) | 146 | if (!stats || !req) |
147 | return; | 147 | return; |
148 | 148 | ||
149 | stats = task->tk_client->cl_metrics; | ||
150 | op_metrics = &stats[task->tk_msg.rpc_proc->p_statidx]; | 149 | op_metrics = &stats[task->tk_msg.rpc_proc->p_statidx]; |
151 | 150 | ||
152 | op_metrics->om_ops++; | 151 | op_metrics->om_ops++; |
@@ -164,6 +163,7 @@ void rpc_count_iostats(struct rpc_task *task) | |||
164 | delta = ktime_sub(ktime_get(), task->tk_start); | 163 | delta = ktime_sub(ktime_get(), task->tk_start); |
165 | op_metrics->om_execute = ktime_add(op_metrics->om_execute, delta); | 164 | op_metrics->om_execute = ktime_add(op_metrics->om_execute, delta); |
166 | } | 165 | } |
166 | EXPORT_SYMBOL_GPL(rpc_count_iostats); | ||
167 | 167 | ||
168 | static void _print_name(struct seq_file *seq, unsigned int op, | 168 | static void _print_name(struct seq_file *seq, unsigned int op, |
169 | struct rpc_procinfo *procs) | 169 | struct rpc_procinfo *procs) |