diff options
author | David Howells <dhowells@redhat.com> | 2023-10-30 11:43:24 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2024-01-01 16:37:27 +0000 |
commit | 92f091cdddace38e57ad570663b058a38b4d8bed (patch) | |
tree | 991f09f937e580fac3fc823a74aaf81b7e863da8 /include/trace | |
parent | d14cf8edd30678b5d1e3671466d458bf72a53e86 (diff) |
afs: Dispatch fileserver probes in priority order
When probing all the addresses for a fileserver, dispatch them in order of
descending priority to try and get back highest priority one first.
Also add a tracepoint to show the transmission and completion of the
probes.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/afs.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/trace/events/afs.h b/include/trace/events/afs.h index 0f68d67f52c8..81eb87fbcfa7 100644 --- a/include/trace/events/afs.h +++ b/include/trace/events/afs.h @@ -1387,6 +1387,39 @@ TRACE_EVENT(afs_alist, __entry->ref) ); +TRACE_EVENT(afs_fs_probe, + TP_PROTO(struct afs_server *server, bool tx, struct afs_addr_list *alist, + unsigned int addr_index, int error, s32 abort_code, unsigned int rtt_us), + + TP_ARGS(server, tx, alist, addr_index, error, abort_code, rtt_us), + + TP_STRUCT__entry( + __field(unsigned int, server) + __field(bool, tx) + __field(u16, addr_index) + __field(short, error) + __field(s32, abort_code) + __field(unsigned int, rtt_us) + __field_struct(struct sockaddr_rxrpc, srx) + ), + + TP_fast_assign( + __entry->server = server->debug_id; + __entry->tx = tx; + __entry->addr_index = addr_index; + __entry->error = error; + __entry->abort_code = abort_code; + __entry->rtt_us = rtt_us; + memcpy(&__entry->srx, rxrpc_kernel_remote_srx(alist->addrs[addr_index].peer), + sizeof(__entry->srx)); + ), + + TP_printk("s=%08x %s ax=%u e=%d ac=%d rtt=%d %pISpc", + __entry->server, __entry->tx ? "tx" : "rx", __entry->addr_index, + __entry->error, __entry->abort_code, __entry->rtt_us, + &__entry->srx.transport) + ); + #endif /* _TRACE_AFS_H */ /* This part must be outside protection */ |