diff options
| author | David Howells <dhowells@redhat.com> | 2025-10-24 09:25:31 +0100 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2025-12-05 17:11:43 -0600 |
| commit | f80ac7eda1cf5205aaa2b676827ae1e312a5a894 (patch) | |
| tree | 84ab90c4dcb3f23f0c7c03ce5cbe2263073da7e0 /fs/smb/client/readdir.c | |
| parent | 3a7b6d0afe6e01d054c9334cf1203953a0f72a1e (diff) | |
| download | linux-next-f80ac7eda1cf5205aaa2b676827ae1e312a5a894.tar.gz linux-next-f80ac7eda1cf5205aaa2b676827ae1e312a5a894.zip | |
cifs: Add a tracepoint to log EIO errors
Add a tracepoint to log EIO errors and give it the capacity to convey up to
two integers of information. This is then wrapped with three functions:
int smb_EIO(enum smb_eio_trace trace)
int smb_EIO1(enum smb_eio_trace trace, unsigned long info)
int smb_EIO2(enum smb_eio_trace trace, unsigned long info,
unsigned long info2)
depending on how many bits of info are desired to be logged with any
particular trace. The functions all return -EIO and can be used in place
of -EIO.
The trace argument is an enum value that gets translated to a string when
the trace is printed.
This makes is easier to log EIO instances when the client is under high
load than turning on a printk wrapper such as cifs_dbg(). Granted, EIO
could have its own separate EIO printing since EIO shouldn't happen.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/readdir.c')
| -rw-r--r-- | fs/smb/client/readdir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/readdir.c b/fs/smb/client/readdir.c index 7ff728503ed1..6844f1dc3921 100644 --- a/fs/smb/client/readdir.c +++ b/fs/smb/client/readdir.c @@ -775,7 +775,7 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos, if (cfile->srch_inf.ntwrk_buf_start == NULL) { cifs_dbg(VFS, "ntwrk_buf_start is NULL during readdir\n"); - return -EIO; + return smb_EIO(smb_eio_trace_null_pointers); } end_of_smb = cfile->srch_inf.ntwrk_buf_start + |
