Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
d683bcd3
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d683bcd3
编写于
5月 19, 2018
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
smb3: add additional ftrace entry points for entry/exit to cifs.ko
Signed-off-by:
N
Steve French
<
smfrench@gmail.com
>
上级
cfe89091
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
85 addition
and
35 deletion
+85
-35
fs/cifs/cifsproto.h
fs/cifs/cifsproto.h
+7
-1
fs/cifs/smb2maperror.c
fs/cifs/smb2maperror.c
+4
-5
fs/cifs/trace.h
fs/cifs/trace.h
+74
-29
未找到文件。
fs/cifs/cifsproto.h
浏览文件 @
d683bcd3
...
...
@@ -21,6 +21,7 @@
#ifndef _CIFSPROTO_H
#define _CIFSPROTO_H
#include <linux/nls.h>
#include "trace.h"
struct
statfs
;
struct
smb_vol
;
...
...
@@ -47,6 +48,7 @@ extern void _free_xid(unsigned int);
cifs_dbg(FYI, "CIFS VFS: in %s as Xid: %u with uid: %d\n", \
__func__, __xid, \
from_kuid(&init_user_ns, current_fsuid())); \
trace_smb3_enter(__xid, __func__); \
__xid; \
})
...
...
@@ -54,7 +56,11 @@ extern void _free_xid(unsigned int);
do { \
_free_xid(curr_xid); \
cifs_dbg(FYI, "CIFS VFS: leaving %s (xid = %u) rc = %d\n", \
__func__, curr_xid, (int)rc); \
__func__, curr_xid, (int)rc); \
if (rc) \
trace_smb3_exit_err(curr_xid, __func__, (int)rc); \
else \
trace_smb3_exit_done(curr_xid, __func__); \
} while (0)
extern
int
init_cifs_idmap
(
void
);
extern
void
exit_cifs_idmap
(
void
);
...
...
fs/cifs/smb2maperror.c
浏览文件 @
d683bcd3
...
...
@@ -2457,9 +2457,8 @@ map_smb2_to_linux_error(char *buf, bool log_err)
__le32
smb2err
=
shdr
->
Status
;
if
(
smb2err
==
0
)
{
trace_smb3_cmd_done
(
le32_to_cpu
(
shdr
->
ProcessId
),
shdr
->
TreeId
,
shdr
->
SessionId
,
le16_to_cpu
(
shdr
->
Command
),
le64_to_cpu
(
shdr
->
MessageId
));
trace_smb3_cmd_done
(
shdr
->
TreeId
,
shdr
->
SessionId
,
le16_to_cpu
(
shdr
->
Command
),
le64_to_cpu
(
shdr
->
MessageId
));
return
0
;
}
...
...
@@ -2483,8 +2482,8 @@ map_smb2_to_linux_error(char *buf, bool log_err)
cifs_dbg
(
FYI
,
"Mapping SMB2 status code 0x%08x to POSIX err %d
\n
"
,
__le32_to_cpu
(
smb2err
),
rc
);
trace_smb3_cmd_err
(
le32_to_cpu
(
shdr
->
ProcessId
),
shdr
->
Tree
Id
,
shdr
->
SessionId
,
le16_to_cpu
(
shdr
->
Command
),
trace_smb3_cmd_err
(
shdr
->
TreeId
,
shdr
->
Session
Id
,
le16_to_cpu
(
shdr
->
Command
),
le64_to_cpu
(
shdr
->
MessageId
),
le32_to_cpu
(
smb2err
),
rc
);
return
rc
;
}
fs/cifs/trace.h
浏览文件 @
d683bcd3
...
...
@@ -50,8 +50,8 @@ DECLARE_EVENT_CLASS(smb3_rw_err_class,
__entry
->
len
=
len
;
__entry
->
rc
=
rc
;
),
TP_printk
(
"
xid=%u fid=0x%llx tid=0x%x s
id=0x%llx offset=0x%llx len=0x%x rc=%d"
,
__entry
->
xid
,
__entry
->
fid
,
__entry
->
tid
,
__entry
->
ses
id
,
TP_printk
(
"
\t
xid=%u sid=0x%llx tid=0x%x f
id=0x%llx offset=0x%llx len=0x%x rc=%d"
,
__entry
->
xid
,
__entry
->
sesid
,
__entry
->
tid
,
__entry
->
f
id
,
__entry
->
offset
,
__entry
->
len
,
__entry
->
rc
)
)
...
...
@@ -95,8 +95,8 @@ DECLARE_EVENT_CLASS(smb3_rw_done_class,
__entry
->
offset
=
offset
;
__entry
->
len
=
len
;
),
TP_printk
(
"xid=%u
fid=0x%llx tid=0x%x s
id=0x%llx offset=0x%llx len=0x%x"
,
__entry
->
xid
,
__entry
->
fid
,
__entry
->
tid
,
__entry
->
ses
id
,
TP_printk
(
"xid=%u
sid=0x%llx tid=0x%x f
id=0x%llx offset=0x%llx len=0x%x"
,
__entry
->
xid
,
__entry
->
sesid
,
__entry
->
tid
,
__entry
->
f
id
,
__entry
->
offset
,
__entry
->
len
)
)
...
...
@@ -137,8 +137,8 @@ DECLARE_EVENT_CLASS(smb3_fd_err_class,
__entry
->
sesid
=
sesid
;
__entry
->
rc
=
rc
;
),
TP_printk
(
"
xid=%u fid=0x%llx tid=0x%x s
id=0x%llx rc=%d"
,
__entry
->
xid
,
__entry
->
fid
,
__entry
->
tid
,
__entry
->
ses
id
,
TP_printk
(
"
\t
xid=%u sid=0x%llx tid=0x%x f
id=0x%llx rc=%d"
,
__entry
->
xid
,
__entry
->
sesid
,
__entry
->
tid
,
__entry
->
f
id
,
__entry
->
rc
)
)
...
...
@@ -185,8 +185,8 @@ DECLARE_EVENT_CLASS(smb3_inf_err_class,
__entry
->
type
=
type
;
__entry
->
rc
=
rc
;
),
TP_printk
(
"xid=%u
fid=0x%llx tid=0x%x s
id=0x%llx class=%u type=0x%x rc=%d"
,
__entry
->
xid
,
__entry
->
fid
,
__entry
->
tid
,
__entry
->
ses
id
,
TP_printk
(
"xid=%u
sid=0x%llx tid=0x%x f
id=0x%llx class=%u type=0x%x rc=%d"
,
__entry
->
xid
,
__entry
->
sesid
,
__entry
->
tid
,
__entry
->
f
id
,
__entry
->
infclass
,
__entry
->
type
,
__entry
->
rc
)
)
...
...
@@ -209,16 +209,14 @@ DEFINE_SMB3_INF_ERR_EVENT(fsctl_err);
* For logging SMB3 Status code and Command for responses which return errors
*/
DECLARE_EVENT_CLASS
(
smb3_cmd_err_class
,
TP_PROTO
(
__u32
pid
,
__u32
tid
,
TP_PROTO
(
__u32
tid
,
__u64
sesid
,
__u16
cmd
,
__u64
mid
,
__u32
status
,
int
rc
),
TP_ARGS
(
pid
,
tid
,
sesid
,
cmd
,
mid
,
status
,
rc
),
TP_ARGS
(
tid
,
sesid
,
cmd
,
mid
,
status
,
rc
),
TP_STRUCT__entry
(
__field
(
__u32
,
pid
)
__field
(
__u32
,
tid
)
__field
(
__u64
,
sesid
)
__field
(
__u16
,
cmd
)
...
...
@@ -227,7 +225,6 @@ DECLARE_EVENT_CLASS(smb3_cmd_err_class,
__field
(
int
,
rc
)
),
TP_fast_assign
(
__entry
->
pid
=
pid
;
__entry
->
tid
=
tid
;
__entry
->
sesid
=
sesid
;
__entry
->
cmd
=
cmd
;
...
...
@@ -235,61 +232,109 @@ DECLARE_EVENT_CLASS(smb3_cmd_err_class,
__entry
->
status
=
status
;
__entry
->
rc
=
rc
;
),
TP_printk
(
"
pid=%u tid=0x%x sid=0x%ll
x cmd=%u mid=%llu status=0x%x rc=%d"
,
__entry
->
pid
,
__entry
->
tid
,
__entry
->
ses
id
,
__entry
->
cmd
,
__entry
->
mid
,
__entry
->
status
,
__entry
->
rc
)
TP_printk
(
"
\t
sid=0x%llx tid=0x%
x cmd=%u mid=%llu status=0x%x rc=%d"
,
__entry
->
sesid
,
__entry
->
tid
,
__entry
->
cmd
,
__entry
->
m
id
,
__entry
->
status
,
__entry
->
rc
)
)
#define DEFINE_SMB3_CMD_ERR_EVENT(name) \
DEFINE_EVENT(smb3_cmd_err_class, smb3_##name, \
TP_PROTO(unsigned int pid, \
__u32 tid, \
TP_PROTO(__u32 tid, \
__u64 sesid, \
__u16 cmd, \
__u64 mid, \
__u32 status, \
int rc), \
TP_ARGS(
pid,
tid, sesid, cmd, mid, status, rc))
TP_ARGS(tid, sesid, cmd, mid, status, rc))
DEFINE_SMB3_CMD_ERR_EVENT
(
cmd_err
);
DECLARE_EVENT_CLASS
(
smb3_cmd_done_class
,
TP_PROTO
(
__u32
pid
,
__u32
tid
,
TP_PROTO
(
__u32
tid
,
__u64
sesid
,
__u16
cmd
,
__u64
mid
),
TP_ARGS
(
pid
,
tid
,
sesid
,
cmd
,
mid
),
TP_ARGS
(
tid
,
sesid
,
cmd
,
mid
),
TP_STRUCT__entry
(
__field
(
__u32
,
pid
)
__field
(
__u32
,
tid
)
__field
(
__u64
,
sesid
)
__field
(
__u16
,
cmd
)
__field
(
__u64
,
mid
)
),
TP_fast_assign
(
__entry
->
pid
=
pid
;
__entry
->
tid
=
tid
;
__entry
->
sesid
=
sesid
;
__entry
->
cmd
=
cmd
;
__entry
->
mid
=
mid
;
),
TP_printk
(
"
pid=%u tid=0x%x sid=0x%ll
x cmd=%u mid=%llu"
,
__entry
->
pid
,
__entry
->
tid
,
__entry
->
ses
id
,
TP_printk
(
"
\t
sid=0x%llx tid=0x%
x cmd=%u mid=%llu"
,
__entry
->
sesid
,
__entry
->
t
id
,
__entry
->
cmd
,
__entry
->
mid
)
)
#define DEFINE_SMB3_CMD_DONE_EVENT(name) \
DEFINE_EVENT(smb3_cmd_done_class, smb3_##name, \
TP_PROTO(unsigned int pid, \
__u32 tid, \
TP_PROTO(__u32 tid, \
__u64 sesid, \
__u16 cmd, \
__u64 mid), \
TP_ARGS(
pid,
tid, sesid, cmd, mid))
TP_ARGS(tid, sesid, cmd, mid))
DEFINE_SMB3_CMD_DONE_EVENT
(
cmd_done
);
DECLARE_EVENT_CLASS
(
smb3_exit_err_class
,
TP_PROTO
(
unsigned
int
xid
,
const
char
*
func_name
,
int
rc
),
TP_ARGS
(
xid
,
func_name
,
rc
),
TP_STRUCT__entry
(
__field
(
unsigned
int
,
xid
)
__field
(
const
char
*
,
func_name
)
__field
(
int
,
rc
)
),
TP_fast_assign
(
__entry
->
xid
=
xid
;
__entry
->
func_name
=
func_name
;
__entry
->
rc
=
rc
;
),
TP_printk
(
"
\t
%s: xid=%u rc=%d"
,
__entry
->
func_name
,
__entry
->
xid
,
__entry
->
rc
)
)
#define DEFINE_SMB3_EXIT_ERR_EVENT(name) \
DEFINE_EVENT(smb3_exit_err_class, smb3_##name, \
TP_PROTO(unsigned int xid, \
const char *func_name, \
int rc), \
TP_ARGS(xid, func_name, rc))
DEFINE_SMB3_EXIT_ERR_EVENT
(
exit_err
);
DECLARE_EVENT_CLASS
(
smb3_enter_exit_class
,
TP_PROTO
(
unsigned
int
xid
,
const
char
*
func_name
),
TP_ARGS
(
xid
,
func_name
),
TP_STRUCT__entry
(
__field
(
unsigned
int
,
xid
)
__field
(
const
char
*
,
func_name
)
),
TP_fast_assign
(
__entry
->
xid
=
xid
;
__entry
->
func_name
=
func_name
;
),
TP_printk
(
"
\t
%s: xid=%u"
,
__entry
->
func_name
,
__entry
->
xid
)
)
#define DEFINE_SMB3_ENTER_EXIT_EVENT(name) \
DEFINE_EVENT(smb3_enter_exit_class, smb3_##name, \
TP_PROTO(unsigned int xid, \
const char *func_name), \
TP_ARGS(xid, func_name))
DEFINE_SMB3_ENTER_EXIT_EVENT
(
enter
);
DEFINE_SMB3_ENTER_EXIT_EVENT
(
exit_done
);
#endif
/* _CIFS_TRACE_H */
#undef TRACE_INCLUDE_PATH
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录