Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
d47d7c1a
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d47d7c1a
编写于
2月 28, 2006
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] CIFS readdir perf optimizations part 1
Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
4b8f930f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
11 deletion
+27
-11
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+7
-1
fs/cifs/file.c
fs/cifs/file.c
+14
-9
fs/cifs/readdir.c
fs/cifs/readdir.c
+6
-1
未找到文件。
fs/cifs/cifssmb.c
浏览文件 @
d47d7c1a
...
...
@@ -3026,6 +3026,7 @@ CIFSFindFirst(const int xid, struct cifsTconInfo *tcon,
psrch_inf
->
unicode
=
FALSE
;
psrch_inf
->
ntwrk_buf_start
=
(
char
*
)
pSMBr
;
psrch_inf
->
smallBuf
=
0
;
psrch_inf
->
srch_entries_start
=
(
char
*
)
&
pSMBr
->
hdr
.
Protocol
+
le16_to_cpu
(
pSMBr
->
t2
.
DataOffset
);
...
...
@@ -3146,9 +3147,14 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
parms
=
(
T2_FNEXT_RSP_PARMS
*
)
response_data
;
response_data
=
(
char
*
)
&
pSMBr
->
hdr
.
Protocol
+
le16_to_cpu
(
pSMBr
->
t2
.
DataOffset
);
cifs_buf_release
(
psrch_inf
->
ntwrk_buf_start
);
if
(
psrch_inf
->
smallBuf
)
cifs_small_buf_release
(
psrch_inf
->
ntwrk_buf_start
);
else
cifs_buf_release
(
psrch_inf
->
ntwrk_buf_start
);
psrch_inf
->
srch_entries_start
=
response_data
;
psrch_inf
->
ntwrk_buf_start
=
(
char
*
)
pSMB
;
psrch_inf
->
smallBuf
=
0
;
if
(
parms
->
EndofSearch
)
psrch_inf
->
endOfSearch
=
TRUE
;
else
...
...
fs/cifs/file.c
浏览文件 @
d47d7c1a
...
...
@@ -555,7 +555,10 @@ int cifs_closedir(struct inode *inode, struct file *file)
if
(
ptmp
)
{
cFYI
(
1
,
(
"closedir free smb buf in srch struct"
));
pCFileStruct
->
srch_inf
.
ntwrk_buf_start
=
NULL
;
cifs_buf_release
(
ptmp
);
if
(
pCFileStruct
->
srch_inf
.
smallBuf
)
cifs_small_buf_release
(
ptmp
);
else
cifs_buf_release
(
ptmp
);
}
ptmp
=
pCFileStruct
->
search_resume_name
;
if
(
ptmp
)
{
...
...
@@ -592,11 +595,11 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
pfLock
->
fl_end
));
if
(
pfLock
->
fl_flags
&
FL_POSIX
)
cFYI
(
1
,
(
"Posix
"
));
cFYI
(
1
,
(
"Posix"
));
if
(
pfLock
->
fl_flags
&
FL_FLOCK
)
cFYI
(
1
,
(
"Flock
"
));
cFYI
(
1
,
(
"Flock"
));
if
(
pfLock
->
fl_flags
&
FL_SLEEP
)
{
cFYI
(
1
,
(
"Blocking lock
"
));
cFYI
(
1
,
(
"Blocking lock"
));
wait_flag
=
TRUE
;
}
if
(
pfLock
->
fl_flags
&
FL_ACCESS
)
...
...
@@ -612,21 +615,23 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
cFYI
(
1
,
(
"F_WRLCK "
));
numLock
=
1
;
}
else
if
(
pfLock
->
fl_type
==
F_UNLCK
)
{
cFYI
(
1
,
(
"F_UNLCK
"
));
cFYI
(
1
,
(
"F_UNLCK"
));
numUnlock
=
1
;
/* Check if unlock includes more than
one lock range */
}
else
if
(
pfLock
->
fl_type
==
F_RDLCK
)
{
cFYI
(
1
,
(
"F_RDLCK
"
));
cFYI
(
1
,
(
"F_RDLCK"
));
lockType
|=
LOCKING_ANDX_SHARED_LOCK
;
numLock
=
1
;
}
else
if
(
pfLock
->
fl_type
==
F_EXLCK
)
{
cFYI
(
1
,
(
"F_EXLCK
"
));
cFYI
(
1
,
(
"F_EXLCK"
));
numLock
=
1
;
}
else
if
(
pfLock
->
fl_type
==
F_SHLCK
)
{
cFYI
(
1
,
(
"F_SHLCK
"
));
cFYI
(
1
,
(
"F_SHLCK"
));
lockType
|=
LOCKING_ANDX_SHARED_LOCK
;
numLock
=
1
;
}
else
cFYI
(
1
,
(
"Unknown type of lock
"
));
cFYI
(
1
,
(
"Unknown type of lock"
));
cifs_sb
=
CIFS_SB
(
file
->
f_dentry
->
d_sb
);
pTcon
=
cifs_sb
->
tcon
;
...
...
fs/cifs/readdir.c
浏览文件 @
d47d7c1a
...
...
@@ -604,7 +604,12 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
cifsFile
->
search_resume_name
=
NULL
;
if
(
cifsFile
->
srch_inf
.
ntwrk_buf_start
)
{
cFYI
(
1
,(
"freeing SMB ff cache buf on search rewind"
));
cifs_buf_release
(
cifsFile
->
srch_inf
.
ntwrk_buf_start
);
if
(
cifsFile
->
srch_inf
.
smallBuf
)
cifs_small_buf_release
(
cifsFile
->
srch_inf
.
ntwrk_buf_start
);
else
cifs_buf_release
(
cifsFile
->
srch_inf
.
ntwrk_buf_start
);
}
rc
=
initiate_cifs_search
(
xid
,
file
);
if
(
rc
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录