Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etercifs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etercifs
Commits
dd8a2bfe
Commit
dd8a2bfe
authored
Feb 15, 2012
by
Pavel Shilovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lower default wsize when unix extensions are not used for 3.0
parent
2a039acc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
connect.c
sources/3.0/connect.c
+21
-2
No files found.
sources/3.0/connect.c
View file @
dd8a2bfe
...
...
@@ -2783,13 +2783,32 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info,
*/
#define CIFS_DEFAULT_WSIZE (1024 * 1024)
/*
* Windows only supports a max of 65535 byte writes. Default to this value when
* posix extensions aren't in force. In actuality here, we use 65536 to allow
* for a write that is a multiple of 4k. Most servers seem to be ok with the
* extra byte even though Windows doesn't send writes that are that large.
*
* Citation:
*
* http://blogs.msdn.com/b/openspecification/archive/2009/04/10/smb-maximum-transmit-buffer-size-and-performance-tuning.aspx
*/
#define CIFS_DEFAULT_NON_POSIX_WSIZE (65536)
static
unsigned
int
cifs_negotiate_wsize
(
struct
cifs_tcon
*
tcon
,
struct
smb_vol
*
pvolume_info
)
{
__u64
unix_cap
=
le64_to_cpu
(
tcon
->
fsUnixInfo
.
Capability
);
struct
TCP_Server_Info
*
server
=
tcon
->
ses
->
server
;
unsigned
int
wsize
=
pvolume_info
->
wsize
?
pvolume_info
->
wsize
:
CIFS_DEFAULT_WSIZE
;
unsigned
int
wsize
;
/* start with specified wsize, or default */
if
(
pvolume_info
->
wsize
)
wsize
=
pvolume_info
->
wsize
;
else
if
(
tcon
->
unix_ext
&&
(
unix_cap
&
CIFS_UNIX_LARGE_WRITE_CAP
))
wsize
=
CIFS_DEFAULT_WSIZE
;
else
wsize
=
CIFS_DEFAULT_NON_POSIX_WSIZE
;
/* can server support 24-bit write sizes? (via UNIX extensions) */
if
(
!
tcon
->
unix_ext
||
!
(
unix_cap
&
CIFS_UNIX_LARGE_WRITE_CAP
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment