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
2a039acc
Commit
2a039acc
authored
Feb 15, 2012
by
Pavel Shilovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 3.2 sources from stable (v3.2.6)
parent
c757d405
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
connect.c
sources/3.2/connect.c
+19
-4
sess.c
sources/3.2/sess.c
+3
-4
No files found.
sources/3.2/connect.c
View file @
2a039acc
...
...
@@ -2918,18 +2918,33 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info,
#define CIFS_DEFAULT_IOSIZE (1024 * 1024)
/*
* Windows only supports a max of 60k reads. Default to that when posix
* extensions aren't in force.
* Windows only supports a max of 60kb reads and 65535 byte writes. Default to
* those values 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_RSIZE (60 * 1024)
#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_IOSIZE
;
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_IOSIZE
;
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
))
...
...
sources/3.2/sess.c
View file @
2a039acc
...
...
@@ -246,16 +246,15 @@ static void ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,
/* copy user */
/* BB what about null user mounts - check that we do this BB */
/* copy user */
if
(
ses
->
user_name
!=
NULL
)
if
(
ses
->
user_name
!=
NULL
)
{
strncpy
(
bcc_ptr
,
ses
->
user_name
,
MAX_USERNAME_SIZE
);
bcc_ptr
+=
strnlen
(
ses
->
user_name
,
MAX_USERNAME_SIZE
);
}
/* else null user mount */
bcc_ptr
+=
strnlen
(
ses
->
user_name
,
MAX_USERNAME_SIZE
);
*
bcc_ptr
=
0
;
bcc_ptr
++
;
/* account for null termination */
/* copy domain */
if
(
ses
->
domainName
!=
NULL
)
{
strncpy
(
bcc_ptr
,
ses
->
domainName
,
256
);
bcc_ptr
+=
strnlen
(
ses
->
domainName
,
256
);
...
...
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