diff options
author | Steve French <stfrench@microsoft.com> | 2024-03-06 10:03:59 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-03-11 03:36:18 +0300 |
commit | 073dd87c8e1ee55ca163956f0c71249dc28aac51 (patch) | |
tree | 28e180b007f1a8b604b94088369c1174c938a95d /fs/smb/client/ioctl.c | |
parent | f3dc1bdb6b0b0693562c7c54a6c28bafa608ba3c (diff) | |
download | linux-073dd87c8e1ee55ca163956f0c71249dc28aac51.tar.xz |
smb3: add dynamic trace point for ioctls
It can be helpful in debugging to know which ioctls are called to better
correlate them with smb3 fsctls (and opens). Add a dynamic trace point
to trace ioctls into cifs.ko
Here is sample output:
TASK-PID CPU# ||||| TIMESTAMP FUNCTION
| | | ||||| | |
new-inotify-ioc-90418 [001] ..... 142157.397024: smb3_ioctl: xid=18 fid=0x0 ioctl cmd=0xc009cf0b
new-inotify-ioc-90457 [007] ..... 142217.943569: smb3_ioctl: xid=22 fid=0x389bf5b6 ioctl cmd=0xc009cf0b
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/ioctl.c')
-rw-r--r-- | fs/smb/client/ioctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/smb/client/ioctl.c b/fs/smb/client/ioctl.c index e2f92c21fff5..c012dfdba80d 100644 --- a/fs/smb/client/ioctl.c +++ b/fs/smb/client/ioctl.c @@ -345,6 +345,11 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) xid = get_xid(); cifs_dbg(FYI, "cifs ioctl 0x%x\n", command); + if (pSMBFile == NULL) + trace_smb3_ioctl(xid, 0, command); + else + trace_smb3_ioctl(xid, pSMBFile->fid.persistent_fid, command); + switch (command) { case FS_IOC_GETFLAGS: if (pSMBFile == NULL) |