]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb3 client: add missing tracepoint for unsupported ioctls
authorSteve French <stfrench@microsoft.com>
Mon, 29 Dec 2025 16:23:12 +0000 (10:23 -0600)
committerSteve French <stfrench@microsoft.com>
Tue, 30 Dec 2025 15:16:45 +0000 (09:16 -0600)
In debugging a recent problem with an xfstest, noticed that we weren't
tracing cases where the ioctl was not supported.  Add dynamic tracepoint:
    "trace-cmd record -e smb3_unsupported_ioctl"
and then after running an app which calls unsupported ioctl,
"trace-cmd show"would display e.g.
      xfs_io-7289    [012] .....  1205.137765: smb3_unsupported_ioctl: xid=19 fid=0x4535bb84 ioctl cmd=0x801c581f

Acked-by: Bharath SM <bharathsm@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/ioctl.c
fs/smb/client/trace.h

index 0a9935ce05a5ad9a4fce128201757a1c1cdaeb42..d1b1532094240f143b65a10ef96fb1706a5c76e2 100644 (file)
@@ -588,6 +588,9 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
                        break;
                default:
                        cifs_dbg(FYI, "unsupported ioctl\n");
+                       trace_smb3_unsupported_ioctl(xid,
+                               pSMBFile ? pSMBFile->fid.persistent_fid : 0,
+                               command);
                        break;
        }
 cifs_ioc_exit:
index b0fbc2df642e9b60329ef4d2df1b2779116054c0..a584a77431132910387714628e5477b7227c1bdd 100644 (file)
@@ -1579,6 +1579,7 @@ DEFINE_EVENT(smb3_ioctl_class, smb3_##name,  \
        TP_ARGS(xid, fid, command))
 
 DEFINE_SMB3_IOCTL_EVENT(ioctl);
+DEFINE_SMB3_IOCTL_EVENT(unsupported_ioctl);
 
 DECLARE_EVENT_CLASS(smb3_shutdown_class,
        TP_PROTO(__u32 flags,