diff options
author | Steve French <stfrench@microsoft.com> | 2020-02-06 01:22:37 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2020-02-06 01:24:19 +0100 |
commit | f2bf09e97b47c7b13e8a918f560f6082e9bc8f8a (patch) | |
tree | d8cf7657f023c69359dbc58831778108e75c51eb /fs/cifs/trace.h | |
parent | cifs: log warning message (once) if out of disk space (diff) | |
download | linux-f2bf09e97b47c7b13e8a918f560f6082e9bc8f8a.tar.xz linux-f2bf09e97b47c7b13e8a918f560f6082e9bc8f8a.zip |
cifs: Add tracepoints for errors on flush or fsync
Makes it easier to debug errors on writeback that happen later,
and are being returned on flush or fsync
For example:
writetest-17829 [002] .... 13583.407859: cifs_flush_err: ino=90 rc=-28
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/trace.h')
-rw-r--r-- | fs/cifs/trace.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/fs/cifs/trace.h b/fs/cifs/trace.h index e7e350b13d6a..4cb0d5f7ce45 100644 --- a/fs/cifs/trace.h +++ b/fs/cifs/trace.h @@ -547,6 +547,33 @@ DEFINE_EVENT(smb3_exit_err_class, smb3_##name, \ DEFINE_SMB3_EXIT_ERR_EVENT(exit_err); + +DECLARE_EVENT_CLASS(smb3_sync_err_class, + TP_PROTO(unsigned long ino, + int rc), + TP_ARGS(ino, rc), + TP_STRUCT__entry( + __field(unsigned long, ino) + __field(int, rc) + ), + TP_fast_assign( + __entry->ino = ino; + __entry->rc = rc; + ), + TP_printk("\tino=%lu rc=%d", + __entry->ino, __entry->rc) +) + +#define DEFINE_SMB3_SYNC_ERR_EVENT(name) \ +DEFINE_EVENT(smb3_sync_err_class, cifs_##name, \ + TP_PROTO(unsigned long ino, \ + int rc), \ + TP_ARGS(ino, rc)) + +DEFINE_SMB3_SYNC_ERR_EVENT(fsync_err); +DEFINE_SMB3_SYNC_ERR_EVENT(flush_err); + + DECLARE_EVENT_CLASS(smb3_enter_exit_class, TP_PROTO(unsigned int xid, const char *func_name), |