Skip to content

Commit bc31161

Browse files
committed
smb3 client: add missing tracepoint for unsupported ioctls
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>
1 parent f8f9c1f commit bc31161

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

fs/smb/client/ioctl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,9 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
588588
break;
589589
default:
590590
cifs_dbg(FYI, "unsupported ioctl\n");
591+
trace_smb3_unsupported_ioctl(xid,
592+
pSMBFile ? pSMBFile->fid.persistent_fid : 0,
593+
command);
591594
break;
592595
}
593596
cifs_ioc_exit:

fs/smb/client/trace.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,7 @@ DEFINE_EVENT(smb3_ioctl_class, smb3_##name, \
15791579
TP_ARGS(xid, fid, command))
15801580

15811581
DEFINE_SMB3_IOCTL_EVENT(ioctl);
1582+
DEFINE_SMB3_IOCTL_EVENT(unsupported_ioctl);
15821583

15831584
DECLARE_EVENT_CLASS(smb3_shutdown_class,
15841585
TP_PROTO(__u32 flags,

0 commit comments

Comments
 (0)