Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
75865f8c
L
linux
项目概览
xiphi1978
/
linux
通知
2
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,发现更多精彩内容 >>
提交
75865f8c
编写于
6月 24, 2007
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] Add in some missing flags and cifs README and TODO corrections
Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
75154f40
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
80 addition
and
29 deletion
+80
-29
fs/cifs/CHANGES
fs/cifs/CHANGES
+4
-1
fs/cifs/README
fs/cifs/README
+18
-7
fs/cifs/TODO
fs/cifs/TODO
+6
-0
fs/cifs/cifspdu.h
fs/cifs/cifspdu.h
+8
-3
fs/cifs/connect.c
fs/cifs/connect.c
+37
-16
fs/cifs/file.c
fs/cifs/file.c
+7
-2
未找到文件。
fs/cifs/CHANGES
浏览文件 @
75865f8c
...
...
@@ -8,7 +8,10 @@ when Unix Extensions were ignored). This allows users to override the
default uid and gid for files when they are certain that the uids or
gids on the server do not match those of the client. Make "sec=none"
mount override username (so that null user connection is attempted)
to match what documentation said.
to match what documentation said. Support for very large reads, over 127K,
available to some newer servers (such as Samba 3.0.26 and later but
note that it also requires setting CIFSMaxBufSize at module install
time to a larger value which may hurt performance in some cases).
Version 1.48
------------
...
...
fs/cifs/README
浏览文件 @
75865f8c
...
...
@@ -301,10 +301,21 @@ A partial list of the supported mount options follows:
during the local client kernel build will be used.
If server does not support Unicode, this parameter is
unused.
rsize default read size (usually 16K)
wsize default write size (usually 16K, 32K is often better over GigE)
maximum wsize currently allowed by CIFS is 57344 (14 4096 byte
pages)
rsize default read size (usually 16K). The client currently
can not use rsize larger than CIFSMaxBufSize. CIFSMaxBufSize
defaults to 16K and may be changed (from 8K to the maximum
kmalloc size allowed by your kernel) at module install time
for cifs.ko. Setting CIFSMaxBufSize to a very large value
will cause cifs to use more memory and may reduce performance
in some cases. To use rsize greater than 127K (the original
cifs protocol maximum) also requires that the server support
a new Unix Capability flag (for very large read) which some
newer servers (e.g. Samba 3.0.26 or later) do. rsize can be
set from a minimum of 2048 to a maximum of 130048 (127K or
CIFSMaxBufSize, whichever is smaller)
wsize default write size (default 57344)
maximum wsize currently allowed by CIFS is 57344 (fourteen
4096 byte pages)
rw mount the network share read-write (note that the
server may still consider the share read-only)
ro mount network share read-only
...
...
@@ -582,10 +593,10 @@ the start of smb requests and responses can be enabled via:
echo 1 > /proc/fs/cifs/traceSMB
Two other experimental features are under development
and to test
require enabling CONFIG_CIFS_EXPERIMENTAL
Two other experimental features are under development
. To test these
require
s
enabling CONFIG_CIFS_EXPERIMENTAL
More efficient write operations
ipv6 enablement
DNOTIFY fcntl: needed for support of directory change
notification and perhaps later for file leases)
...
...
fs/cifs/TODO
浏览文件 @
75865f8c
...
...
@@ -106,6 +106,12 @@ but recognizes them
succeed but still return access denied (appears to be Windows
server not cifs client problem) and has not been reproduced recently.
NTFS partitions do not have this problem.
4) Unix/POSIX capabilities are reset after reconnection, and affect
a few fields in the tree connection but we do do not know which
superblocks to apply these changes to. We should probably walk
the list of superblocks to set these. Also need to check the
flags on the second mount to the same share, and see if we
can do the same trick that NFS does to remount duplicate shares.
Misc testing to do
==================
...
...
fs/cifs/cifspdu.h
浏览文件 @
75865f8c
...
...
@@ -712,6 +712,7 @@ typedef struct smb_com_findclose_req {
#define REQ_OPLOCK 0x00000002
#define REQ_BATCHOPLOCK 0x00000004
#define REQ_OPENDIRONLY 0x00000008
#define REQ_EXTENDED_INFO 0x00000010
typedef
struct
smb_com_open_req
{
/* also handles create */
struct
smb_hdr
hdr
;
/* wct = 24 */
...
...
@@ -1885,15 +1886,19 @@ typedef struct {
#define CIFS_UNIX_POSIX_PATHNAMES_CAP 0x00000010
/* Allow POSIX path chars */
#define CIFS_UNIX_POSIX_PATH_OPS_CAP 0x00000020
/* Allow new POSIX path based
calls including posix open
and posix unlink */
and posix unlink */
#define CIFS_UNIX_LARGE_READ_CAP 0x00000040
/* support reads >128K (up
to 0xFFFF00 */
#define CIFS_UNIX_LARGE_WRITE_CAP 0x00000080
#ifdef CONFIG_CIFS_POSIX
/* Can not set pathnames cap yet until we send new posix create SMB since
otherwise server can treat such handles opened with older ntcreatex
(by a new client which knows how to send posix path ops)
as non-posix handles (can affect write behavior with byte range locks.
We can add back in POSIX_PATH_OPS cap when Posix Create/Mkdir finished */
/* #define CIFS_UNIX_CAP_MASK 0x000000
3
b */
#define CIFS_UNIX_CAP_MASK 0x000000
1
b
/* #define CIFS_UNIX_CAP_MASK 0x000000
f
b */
#define CIFS_UNIX_CAP_MASK 0x000000
d
b
#else
#define CIFS_UNIX_CAP_MASK 0x00000013
#endif
/* CONFIG_CIFS_POSIX */
...
...
fs/cifs/connect.c
浏览文件 @
75865f8c
/*
* fs/cifs/connect.c
*
* Copyright (C) International Business Machines Corp., 2002,200
6
* Copyright (C) International Business Machines Corp., 2002,200
7
* Author(s): Steve French (sfrench@us.ibm.com)
*
* This library is free software; you can redistribute it and/or modify
...
...
@@ -1650,19 +1650,19 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo * tcon,
}
cap
&=
CIFS_UNIX_CAP_MASK
;
if
(
vol_info
&&
vol_info
->
no_psx_acl
)
if
(
vol_info
&&
vol_info
->
no_psx_acl
)
cap
&=
~
CIFS_UNIX_POSIX_ACL_CAP
;
else
if
(
CIFS_UNIX_POSIX_ACL_CAP
&
cap
)
{
else
if
(
CIFS_UNIX_POSIX_ACL_CAP
&
cap
)
{
cFYI
(
1
,(
"negotiated posix acl support"
));
if
(
sb
)
sb
->
s_flags
|=
MS_POSIXACL
;
}
if
(
vol_info
&&
vol_info
->
posix_paths
==
0
)
if
(
vol_info
&&
vol_info
->
posix_paths
==
0
)
cap
&=
~
CIFS_UNIX_POSIX_PATHNAMES_CAP
;
else
if
(
cap
&
CIFS_UNIX_POSIX_PATHNAMES_CAP
)
{
else
if
(
cap
&
CIFS_UNIX_POSIX_PATHNAMES_CAP
)
{
cFYI
(
1
,(
"negotiate posix pathnames"
));
if
(
sb
)
if
(
sb
)
CIFS_SB
(
sb
)
->
mnt_cifs_flags
|=
CIFS_MOUNT_POSIX_PATHS
;
}
...
...
@@ -1670,21 +1670,35 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo * tcon,
/* We might be setting the path sep back to a different
form if we are reconnecting and the server switched its
posix path capability for this share */
if
(
sb
&&
(
CIFS_SB
(
sb
)
->
prepathlen
>
0
))
if
(
sb
&&
(
CIFS_SB
(
sb
)
->
prepathlen
>
0
))
CIFS_SB
(
sb
)
->
prepath
[
0
]
=
CIFS_DIR_SEP
(
CIFS_SB
(
sb
));
if
(
sb
&&
(
CIFS_SB
(
sb
)
->
rsize
>
127
*
1024
))
{
if
((
cap
&
CIFS_UNIX_LARGE_READ_CAP
)
==
0
)
{
CIFS_SB
(
sb
)
->
rsize
=
127
*
1024
;
#ifdef CONFIG_CIFS_DEBUG2
cFYI
(
1
,(
"larger reads not supported by srv"
));
#endif
}
}
cFYI
(
1
,(
"Negotiate caps 0x%x"
,(
int
)
cap
));
#ifdef CONFIG_CIFS_DEBUG2
if
(
cap
&
CIFS_UNIX_FCNTL_CAP
)
if
(
cap
&
CIFS_UNIX_FCNTL_CAP
)
cFYI
(
1
,(
"FCNTL cap"
));
if
(
cap
&
CIFS_UNIX_EXTATTR_CAP
)
if
(
cap
&
CIFS_UNIX_EXTATTR_CAP
)
cFYI
(
1
,(
"EXTATTR cap"
));
if
(
cap
&
CIFS_UNIX_POSIX_PATHNAMES_CAP
)
if
(
cap
&
CIFS_UNIX_POSIX_PATHNAMES_CAP
)
cFYI
(
1
,(
"POSIX path cap"
));
if
(
cap
&
CIFS_UNIX_XATTR_CAP
)
if
(
cap
&
CIFS_UNIX_XATTR_CAP
)
cFYI
(
1
,(
"XATTR cap"
));
if
(
cap
&
CIFS_UNIX_POSIX_ACL_CAP
)
if
(
cap
&
CIFS_UNIX_POSIX_ACL_CAP
)
cFYI
(
1
,(
"POSIX ACL cap"
));
if
(
cap
&
CIFS_UNIX_LARGE_READ_CAP
)
cFYI
(
1
,(
"very large read cap"
));
if
(
cap
&
CIFS_UNIX_LARGE_WRITE_CAP
)
cFYI
(
1
,(
"very large write cap"
));
#endif
/* CIFS_DEBUG2 */
if
(
CIFSSMBSetFSUnixInfo
(
xid
,
tcon
,
cap
))
{
cFYI
(
1
,(
"setting capabilities failed"
));
...
...
@@ -1935,13 +1949,14 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
cERROR
(
1
,(
"rsize %d too large, using MaxBufSize"
,
volume_info
.
rsize
));
cifs_sb
->
rsize
=
CIFSMaxBufSize
;
}
else
if
((
volume_info
.
rsize
)
&&
(
volume_info
.
rsize
<=
CIFSMaxBufSize
))
}
else
if
((
volume_info
.
rsize
)
&&
(
volume_info
.
rsize
<=
CIFSMaxBufSize
))
cifs_sb
->
rsize
=
volume_info
.
rsize
;
else
/* default */
cifs_sb
->
rsize
=
CIFSMaxBufSize
;
if
(
volume_info
.
wsize
>
PAGEVEC_SIZE
*
PAGE_CACHE_SIZE
)
{
cERROR
(
1
,(
"wsize %d too large using 4096 instead"
,
cERROR
(
1
,(
"wsize %d too large
,
using 4096 instead"
,
volume_info
.
wsize
));
cifs_sb
->
wsize
=
4096
;
}
else
if
(
volume_info
.
wsize
)
...
...
@@ -1960,7 +1975,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
if
(
cifs_sb
->
rsize
<
2048
)
{
cifs_sb
->
rsize
=
2048
;
/* Windows ME may prefer this */
cFYI
(
1
,(
"readsize set to minimum 2048"
));
cFYI
(
1
,(
"readsize set to minimum
:
2048"
));
}
/* calculate prepath */
cifs_sb
->
prepath
=
volume_info
.
prepath
;
...
...
@@ -2116,7 +2131,13 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
/* tell server which Unix caps we support */
if
(
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
reset_cifs_unix_caps
(
xid
,
tcon
,
sb
,
&
volume_info
);
else
if
(
cifs_sb
->
rsize
>
(
1024
*
127
))
{
cifs_sb
->
rsize
=
1024
*
127
;
#ifdef CONFIG_CIFS_DEBUG2
cFYI
(
1
,(
"no very large read support, rsize 127K"
));
#endif
}
if
(
!
(
tcon
->
ses
->
capabilities
&
CAP_LARGE_WRITE_X
))
cifs_sb
->
wsize
=
min
(
cifs_sb
->
wsize
,
(
tcon
->
ses
->
server
->
maxBuf
-
...
...
fs/cifs/file.c
浏览文件 @
75865f8c
...
...
@@ -1720,7 +1720,9 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
pTcon
=
cifs_sb
->
tcon
;
pagevec_init
(
&
lru_pvec
,
0
);
#ifdef CONFIG_CIFS_DEBUG2
cFYI
(
1
,(
"rpages: num pages %d"
,
num_pages
));
#endif
for
(
i
=
0
;
i
<
num_pages
;
)
{
unsigned
contig_pages
;
struct
page
*
tmp_page
;
...
...
@@ -1753,7 +1755,10 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
/* Read size needs to be in multiples of one page */
read_size
=
min_t
(
const
unsigned
int
,
read_size
,
cifs_sb
->
rsize
&
PAGE_CACHE_MASK
);
#ifdef CONFIG_CIFS_DEBUG2
cFYI
(
1
,(
"rpages: read size 0x%x contiguous pages %d"
,
read_size
,
contig_pages
));
#endif
rc
=
-
EAGAIN
;
while
(
rc
==
-
EAGAIN
)
{
if
((
open_file
->
invalidHandle
)
&&
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录