Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
dfb7533b
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
dfb7533b
编写于
6月 22, 2005
作者:
S
Steve French
提交者:
Steve French
6月 22, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] Add stats for findfirst, findnext, findclose
Signed-off-by: Steve French (sfrench@us.ibm.com)
上级
8b22c249
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
7 deletion
+25
-7
fs/cifs/cifsglob.h
fs/cifs/cifsglob.h
+3
-0
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+12
-1
fs/cifs/readdir.c
fs/cifs/readdir.c
+10
-6
未找到文件。
fs/cifs/cifsglob.h
浏览文件 @
dfb7533b
...
...
@@ -219,6 +219,9 @@ struct cifsTconInfo {
atomic_t
num_rmdirs
;
atomic_t
num_renames
;
atomic_t
num_t2renames
;
atomic_t
num_ffirst
;
atomic_t
num_fnext
;
atomic_t
num_fclose
;
__u64
bytes_read
;
__u64
bytes_written
;
spinlock_t
stat_lock
;
...
...
fs/cifs/cifssmb.c
浏览文件 @
dfb7533b
...
...
@@ -2396,7 +2396,9 @@ int CIFSFindSingle(const int xid, struct cifsTconInfo *tcon,
if (rc) {
cFYI(1, ("Send error in FindFileDirInfo = %d", rc));
} else { /* decode response */
#ifdef CONFIG_CIFS_STATS
atomic_inc(&tcon->num_ffirst);
#endif
/* BB fill in */
}
...
...
@@ -2509,6 +2511,9 @@ CIFSFindFirst(const int xid, struct cifsTconInfo *tcon,
if
(
rc
==
-
EAGAIN
)
goto
findFirstRetry
;
}
else
{
/* decode response */
#ifdef CONFIG_CIFS_STATS
atomic_inc
(
&
tcon
->
num_ffirst
);
#endif
/* BB remember to free buffer if error BB */
rc
=
validate_t2
((
struct
smb_t2_rsp
*
)
pSMBr
);
if
(
rc
==
0
)
{
...
...
@@ -2622,6 +2627,9 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
}
else
cFYI
(
1
,
(
"FindNext returned = %d"
,
rc
));
}
else
{
/* decode response */
#ifdef CONFIG_CIFS_STATS
atomic_inc
(
&
tcon
->
num_fnext
);
#endif
rc
=
validate_t2
((
struct
smb_t2_rsp
*
)
pSMBr
);
if
(
rc
==
0
)
{
...
...
@@ -2691,6 +2699,9 @@ CIFSFindClose(const int xid, struct cifsTconInfo *tcon, const __u16 searchHandle
if
(
rc
)
{
cERROR
(
1
,
(
"Send error in FindClose = %d"
,
rc
));
}
#ifdef CONFIG_CIFS_STATS
atomic_inc
(
&
tcon
->
num_fclose
);
#endif
cifs_small_buf_release
(
pSMB
);
/* Since session is dead, search handle closed on server already */
...
...
fs/cifs/readdir.c
浏览文件 @
dfb7533b
...
...
@@ -190,8 +190,9 @@ static void fill_in_inode(struct inode *tmp_inode,
tmp_inode
->
i_data
.
a_ops
=
&
cifs_addr_ops
;
if
(
isNewInode
)
return
;
/* No sense invalidating pages for new inode since we
have not started caching readahead file data yet */
return
;
/* No sense invalidating pages for new inode
since have not started caching readahead file
data yet */
if
(
timespec_equal
(
&
tmp_inode
->
i_mtime
,
&
local_mtime
)
&&
(
local_size
==
tmp_inode
->
i_size
))
{
...
...
@@ -536,7 +537,8 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
while
((
index_to_find
>=
cifsFile
->
srch_inf
.
index_of_last_entry
)
&&
(
rc
==
0
)
&&
(
cifsFile
->
srch_inf
.
endOfSearch
==
FALSE
)){
cFYI
(
1
,(
"calling findnext2"
));
rc
=
CIFSFindNext
(
xid
,
pTcon
,
cifsFile
->
netfid
,
&
cifsFile
->
srch_inf
);
rc
=
CIFSFindNext
(
xid
,
pTcon
,
cifsFile
->
netfid
,
&
cifsFile
->
srch_inf
);
if
(
rc
)
return
-
ENOENT
;
}
...
...
@@ -555,7 +557,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
cFYI
(
1
,(
"found entry - pos_in_buf %d"
,
pos_in_buf
));
current_entry
=
cifsFile
->
srch_inf
.
srch_entries_start
;
for
(
i
=
0
;(
i
<
(
pos_in_buf
))
&&
(
current_entry
!=
NULL
);
i
++
)
{
/* go entry
to next entry figuring out which we need to start with
*/
/* go entry
by entry figuring out which is first
*/
/* if( . or ..)
skip */
rc
=
cifs_entry_is_dot
(
current_entry
,
cifsFile
);
...
...
@@ -721,7 +723,8 @@ static int cifs_filldir(char *pfindEntry, struct file *file,
(
FILE_DIRECTORY_INFO
*
)
pfindEntry
,
&
obj_type
,
rc
);
}
rc
=
filldir
(
direntry
,
qstring
.
name
,
qstring
.
len
,
file
->
f_pos
,
tmp_inode
->
i_ino
,
obj_type
);
rc
=
filldir
(
direntry
,
qstring
.
name
,
qstring
.
len
,
file
->
f_pos
,
tmp_inode
->
i_ino
,
obj_type
);
if
(
rc
)
{
cFYI
(
1
,(
"filldir rc = %d"
,
rc
));
}
...
...
@@ -906,7 +909,8 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
cifs_save_resume_key
(
current_entry
,
cifsFile
);
break
;
}
else
current_entry
=
nxt_dir_entry
(
current_entry
,
end_of_smb
);
current_entry
=
nxt_dir_entry
(
current_entry
,
end_of_smb
);
}
kfree
(
tmp_buf
);
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录