]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cifs: Add a tracepoint to log EIO errors
authorDavid Howells <dhowells@redhat.com>
Fri, 24 Oct 2025 08:25:31 +0000 (09:25 +0100)
committerSteve French <stfrench@microsoft.com>
Fri, 5 Dec 2025 23:11:43 +0000 (17:11 -0600)
commitf80ac7eda1cf5205aaa2b676827ae1e312a5a894
tree84ab90c4dcb3f23f0c7c03ce5cbe2263073da7e0
parent3a7b6d0afe6e01d054c9334cf1203953a0f72a1e
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>
27 files changed:
fs/smb/client/cached_dir.c
fs/smb/client/cifsacl.c
fs/smb/client/cifsencrypt.c
fs/smb/client/cifsglob.h
fs/smb/client/cifsproto.h
fs/smb/client/cifssmb.c
fs/smb/client/cifstransport.c
fs/smb/client/compress.c
fs/smb/client/connect.c
fs/smb/client/dir.c
fs/smb/client/file.c
fs/smb/client/inode.c
fs/smb/client/link.c
fs/smb/client/misc.c
fs/smb/client/netmisc.c
fs/smb/client/readdir.c
fs/smb/client/reparse.c
fs/smb/client/sess.c
fs/smb/client/smb2file.c
fs/smb/client/smb2inode.c
fs/smb/client/smb2maperror.c
fs/smb/client/smb2ops.c
fs/smb/client/smb2pdu.c
fs/smb/client/smb2transport.c
fs/smb/client/trace.h
fs/smb/client/transport.c
fs/smb/client/xattr.c