Commit 189e1955 authored by Dave Wysochanski's avatar Dave Wysochanski Committed by Anna Schumaker

sunrpc: Add _add_rpc_iostats() to add rpc_iostats metrics

Add a helper function to add the metrics in two rpc_iostats structures.
Signed-off-by: default avatarDave Wysochanski <dwysocha@redhat.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent acdce5fb
......@@ -208,6 +208,18 @@ static void _print_name(struct seq_file *seq, unsigned int op,
seq_printf(seq, "\t%12u: ", op);
}
static void _add_rpc_iostats(struct rpc_iostats *a, struct rpc_iostats *b)
{
a->om_ops += b->om_ops;
a->om_ntrans += b->om_ntrans;
a->om_timeouts += b->om_timeouts;
a->om_bytes_sent += b->om_bytes_sent;
a->om_bytes_recv += b->om_bytes_recv;
a->om_queue = ktime_add(a->om_queue, b->om_queue);
a->om_rtt = ktime_add(a->om_rtt, b->om_rtt);
a->om_execute = ktime_add(a->om_execute, b->om_execute);
}
static void _print_rpc_iostats(struct seq_file *seq, struct rpc_iostats *stats,
int op, const struct rpc_procinfo *procs)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment