diff options
author | Olga Kornievskaia <kolga@netapp.com> | 2024-01-26 13:04:16 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2024-02-28 16:18:19 -0500 |
commit | 47f7c956327ff4ff4ddf1305e8571ce530157091 (patch) | |
tree | 3f8f03bb03e0505fb91e57c444932ff403adfa80 /fs/nfs/nfs4trace.h | |
parent | bcac8bff90a6ee1629f90669cdb9d28fb86049b0 (diff) | |
download | linux-47f7c956327ff4ff4ddf1305e8571ce530157091.tar.gz linux-47f7c956327ff4ff4ddf1305e8571ce530157091.tar.bz2 linux-47f7c956327ff4ff4ddf1305e8571ce530157091.zip |
pnfs/filelayout: add tracepoint to getdeviceinfo
While decoding filelayout getdeviceinfo received, print out the
information about the location of data servers (IPs).
Generic getdeviceinfo tracepoints prints the MDS's ip for the
dstaddr. In this patch, separate the MDS's address from the
DS's addresses.
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/nfs4trace.h')
-rw-r--r-- | fs/nfs/nfs4trace.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h index d27919d7241d..713d080fd268 100644 --- a/fs/nfs/nfs4trace.h +++ b/fs/nfs/nfs4trace.h @@ -1991,6 +1991,34 @@ DECLARE_EVENT_CLASS(nfs4_deviceid_status, DEFINE_PNFS_DEVICEID_STATUS(nfs4_getdeviceinfo); DEFINE_PNFS_DEVICEID_STATUS(nfs4_find_deviceid); +TRACE_EVENT(fl_getdevinfo, + TP_PROTO( + const struct nfs_server *server, + const struct nfs4_deviceid *deviceid, + char *ds_remotestr + ), + TP_ARGS(server, deviceid, ds_remotestr), + + TP_STRUCT__entry( + __string(mds_addr, server->nfs_client->cl_hostname) + __array(unsigned char, deviceid, NFS4_DEVICEID4_SIZE) + __string(ds_ips, ds_remotestr) + ), + + TP_fast_assign( + __assign_str(mds_addr, server->nfs_client->cl_hostname); + __assign_str(ds_ips, ds_remotestr); + memcpy(__entry->deviceid, deviceid->data, + NFS4_DEVICEID4_SIZE); + ), + TP_printk( + "deviceid=%s, mds_addr=%s, ds_ips=%s", + __print_hex(__entry->deviceid, NFS4_DEVICEID4_SIZE), + __get_str(mds_addr), + __get_str(ds_ips) + ) +); + DECLARE_EVENT_CLASS(nfs4_flexfiles_io_event, TP_PROTO( const struct nfs_pgio_header *hdr |