diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-02-03 16:01:27 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-02-03 16:01:27 -0500 |
commit | e2c63e091e29786a34ecf42c169e627a3d1d96d7 (patch) | |
tree | 4e96723b969bd6b3d39613de601f18da678cca71 /net | |
parent | cc3ea893cbb386e657d775f299f61bb9ba3bc435 (diff) | |
parent | 7c13789e3e6c66dbcaade1760087429240eb3d27 (diff) |
Merge branch 'flexfiles'
* flexfiles: (53 commits)
pnfs: lookup new lseg at lseg boundary
nfs41: .init_read and .init_write can be called with valid pg_lseg
pnfs: Update documentation on the Layout Drivers
pnfs/flexfiles: Add the FlexFile Layout Driver
nfs: count DIO good bytes correctly with mirroring
nfs41: wait for LAYOUTRETURN before retrying LAYOUTGET
nfs: add a helper to set NFS_ODIRECT_RESCHED_WRITES to direct writes
nfs41: add NFS_LAYOUT_RETRY_LAYOUTGET to layout header flags
nfs/flexfiles: send layoutreturn before freeing lseg
nfs41: introduce NFS_LAYOUT_RETURN_BEFORE_CLOSE
nfs41: allow async version layoutreturn
nfs41: add range to layoutreturn args
pnfs: allow LD to ask to resend read through pnfs
nfs: add nfs_pgio_current_mirror helper
nfs: only reset desc->pg_mirror_idx when mirroring is supported
nfs41: add a debug warning if we destroy an unempty layout
pnfs: fail comparison when bucket verifier not set
nfs: mirroring support for direct io
nfs: add mirroring support to pgio layer
pnfs: pass ds_commit_idx through the commit path
...
Conflicts:
fs/nfs/pnfs.c
fs/nfs/pnfs.h
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/stats.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c index 9711a155bc50..2ecb994314c1 100644 --- a/net/sunrpc/stats.c +++ b/net/sunrpc/stats.c | |||
@@ -140,22 +140,20 @@ void rpc_free_iostats(struct rpc_iostats *stats) | |||
140 | EXPORT_SYMBOL_GPL(rpc_free_iostats); | 140 | EXPORT_SYMBOL_GPL(rpc_free_iostats); |
141 | 141 | ||
142 | /** | 142 | /** |
143 | * rpc_count_iostats - tally up per-task stats | 143 | * rpc_count_iostats_metrics - tally up per-task stats |
144 | * @task: completed rpc_task | 144 | * @task: completed rpc_task |
145 | * @stats: array of stat structures | 145 | * @op_metrics: stat structure for OP that will accumulate stats from @task |
146 | */ | 146 | */ |
147 | void rpc_count_iostats(const struct rpc_task *task, struct rpc_iostats *stats) | 147 | void rpc_count_iostats_metrics(const struct rpc_task *task, |
148 | struct rpc_iostats *op_metrics) | ||
148 | { | 149 | { |
149 | struct rpc_rqst *req = task->tk_rqstp; | 150 | struct rpc_rqst *req = task->tk_rqstp; |
150 | struct rpc_iostats *op_metrics; | ||
151 | ktime_t delta, now; | 151 | ktime_t delta, now; |
152 | 152 | ||
153 | if (!stats || !req) | 153 | if (!op_metrics || !req) |
154 | return; | 154 | return; |
155 | 155 | ||
156 | now = ktime_get(); | 156 | now = ktime_get(); |
157 | op_metrics = &stats[task->tk_msg.rpc_proc->p_statidx]; | ||
158 | |||
159 | spin_lock(&op_metrics->om_lock); | 157 | spin_lock(&op_metrics->om_lock); |
160 | 158 | ||
161 | op_metrics->om_ops++; | 159 | op_metrics->om_ops++; |
@@ -175,6 +173,20 @@ void rpc_count_iostats(const struct rpc_task *task, struct rpc_iostats *stats) | |||
175 | 173 | ||
176 | spin_unlock(&op_metrics->om_lock); | 174 | spin_unlock(&op_metrics->om_lock); |
177 | } | 175 | } |
176 | EXPORT_SYMBOL_GPL(rpc_count_iostats_metrics); | ||
177 | |||
178 | /** | ||
179 | * rpc_count_iostats - tally up per-task stats | ||
180 | * @task: completed rpc_task | ||
181 | * @stats: array of stat structures | ||
182 | * | ||
183 | * Uses the statidx from @task | ||
184 | */ | ||
185 | void rpc_count_iostats(const struct rpc_task *task, struct rpc_iostats *stats) | ||
186 | { | ||
187 | rpc_count_iostats_metrics(task, | ||
188 | &stats[task->tk_msg.rpc_proc->p_statidx]); | ||
189 | } | ||
178 | EXPORT_SYMBOL_GPL(rpc_count_iostats); | 190 | EXPORT_SYMBOL_GPL(rpc_count_iostats); |
179 | 191 | ||
180 | static void _print_name(struct seq_file *seq, unsigned int op, | 192 | static void _print_name(struct seq_file *seq, unsigned int op, |