Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
0c0ff093
Commit
0c0ff093
authored
Jun 23, 2005
by
Steve French
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CIFS] Performance improvement, finish up adding CIFSSMBWrite2
Signed-off-by: Steve French (sfrench@us.ibm.com)
parent
45abc6ee
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
9 deletions
+16
-9
fs/cifs/cifs_debug.c
fs/cifs/cifs_debug.c
+8
-2
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+1
-1
fs/cifs/file.c
fs/cifs/file.c
+3
-4
fs/cifs/transport.c
fs/cifs/transport.c
+4
-2
No files found.
fs/cifs/cifs_debug.c
View file @
0c0ff093
...
@@ -283,6 +283,12 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
...
@@ -283,6 +283,12 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
atomic_read
(
&
tcon
->
num_t2renames
));
atomic_read
(
&
tcon
->
num_t2renames
));
buf
+=
item_length
;
buf
+=
item_length
;
length
+=
item_length
;
length
+=
item_length
;
item_length
=
sprintf
(
buf
,
"
\n
FindFirst: %d FNext %d FClose %d"
,
atomic_read
(
&
tcon
->
num_ffirst
),
atomic_read
(
&
tcon
->
num_fnext
),
atomic_read
(
&
tcon
->
num_fclose
));
buf
+=
item_length
;
length
+=
item_length
;
}
}
read_unlock
(
&
GlobalSMBSeslock
);
read_unlock
(
&
GlobalSMBSeslock
);
...
@@ -360,7 +366,7 @@ cifs_proc_init(void)
...
@@ -360,7 +366,7 @@ cifs_proc_init(void)
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
oplockEnabled_write
;
pde
->
write_proc
=
oplockEnabled_write
;
pde
=
create_proc_read_entry
(
"
ReenableOldCifsReaddirCode
"
,
0
,
proc_fs_cifs
,
pde
=
create_proc_read_entry
(
"
Experimental
"
,
0
,
proc_fs_cifs
,
quotaEnabled_read
,
NULL
);
quotaEnabled_read
,
NULL
);
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
quotaEnabled_write
;
pde
->
write_proc
=
quotaEnabled_write
;
...
@@ -419,7 +425,7 @@ cifs_proc_clean(void)
...
@@ -419,7 +425,7 @@ cifs_proc_clean(void)
remove_proc_entry
(
"ExtendedSecurity"
,
proc_fs_cifs
);
remove_proc_entry
(
"ExtendedSecurity"
,
proc_fs_cifs
);
remove_proc_entry
(
"PacketSigningEnabled"
,
proc_fs_cifs
);
remove_proc_entry
(
"PacketSigningEnabled"
,
proc_fs_cifs
);
remove_proc_entry
(
"LinuxExtensionsEnabled"
,
proc_fs_cifs
);
remove_proc_entry
(
"LinuxExtensionsEnabled"
,
proc_fs_cifs
);
remove_proc_entry
(
"
ReenableOldCifsReaddirCode
"
,
proc_fs_cifs
);
remove_proc_entry
(
"
Experimental
"
,
proc_fs_cifs
);
remove_proc_entry
(
"LookupCacheEnabled"
,
proc_fs_cifs
);
remove_proc_entry
(
"LookupCacheEnabled"
,
proc_fs_cifs
);
remove_proc_entry
(
"cifs"
,
proc_root_fs
);
remove_proc_entry
(
"cifs"
,
proc_root_fs
);
}
}
...
...
fs/cifs/cifssmb.c
View file @
0c0ff093
...
@@ -964,7 +964,7 @@ CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon,
...
@@ -964,7 +964,7 @@ CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon,
__u32
bytes_sent
;
__u32
bytes_sent
;
__u16
byte_count
;
__u16
byte_count
;
c
ERROR
(
1
,(
"write2 at %lld %d bytes"
,
offset
,
count
));
/* BB removeme BB */
c
FYI
(
1
,(
"write2 at %lld %d bytes"
,
offset
,
count
));
/* BB removeme BB */
rc
=
small_smb_init
(
SMB_COM_WRITE_ANDX
,
14
,
tcon
,
(
void
**
)
&
pSMB
);
rc
=
small_smb_init
(
SMB_COM_WRITE_ANDX
,
14
,
tcon
,
(
void
**
)
&
pSMB
);
if
(
rc
)
if
(
rc
)
return
rc
;
return
rc
;
...
...
fs/cifs/file.c
View file @
0c0ff093
...
@@ -845,11 +845,10 @@ static ssize_t cifs_write(struct file *file, const char *write_data,
...
@@ -845,11 +845,10 @@ static ssize_t cifs_write(struct file *file, const char *write_data,
if
(
rc
!=
0
)
if
(
rc
!=
0
)
break
;
break
;
}
}
#ifdef CIFS_EXPERIMENTAL
#ifdef C
ONFIG_C
IFS_EXPERIMENTAL
/* BB FIXME We can not sign across two buffers yet */
/* BB FIXME We can not sign across two buffers yet */
cERROR
(
1
,(
"checking signing"
));
/* BB removeme BB */
if
((
experimEnabled
)
&&
((
pTcon
->
ses
->
server
->
secMode
&
if
(
pTcon
->
ses
->
server
->
secMode
&
(
SECMODE_SIGN_REQUIRED
|
SECMODE_SIGN_ENABLED
))
==
0
))
{
(
SECMODE_SIGN_REQUIRED
|
SECMODE_SIGN_ENABLED
)
==
0
)
rc
=
CIFSSMBWrite2
(
xid
,
pTcon
,
rc
=
CIFSSMBWrite2
(
xid
,
pTcon
,
open_file
->
netfid
,
open_file
->
netfid
,
min_t
(
const
int
,
cifs_sb
->
wsize
,
min_t
(
const
int
,
cifs_sb
->
wsize
,
...
...
fs/cifs/transport.c
View file @
0c0ff093
...
@@ -197,7 +197,7 @@ smb_send2(struct socket *ssocket, struct smb_hdr *smb_buffer,
...
@@ -197,7 +197,7 @@ smb_send2(struct socket *ssocket, struct smb_hdr *smb_buffer,
iov
[
0
].
iov_base
=
smb_buffer
;
iov
[
0
].
iov_base
=
smb_buffer
;
iov
[
0
].
iov_len
=
len
;
iov
[
0
].
iov_len
=
len
;
iov
[
1
].
iov_base
=
data
;
iov
[
1
].
iov_base
=
data
;
iov
[
2
].
iov_len
=
datalen
;
iov
[
1
].
iov_len
=
datalen
;
smb_msg
.
msg_name
=
sin
;
smb_msg
.
msg_name
=
sin
;
smb_msg
.
msg_namelen
=
sizeof
(
struct
sockaddr
);
smb_msg
.
msg_namelen
=
sizeof
(
struct
sockaddr
);
smb_msg
.
msg_control
=
NULL
;
smb_msg
.
msg_control
=
NULL
;
...
@@ -210,7 +210,8 @@ smb_send2(struct socket *ssocket, struct smb_hdr *smb_buffer,
...
@@ -210,7 +210,8 @@ smb_send2(struct socket *ssocket, struct smb_hdr *smb_buffer,
Flags2 is converted in SendReceive */
Flags2 is converted in SendReceive */
smb_buffer
->
smb_buf_length
=
cpu_to_be32
(
smb_buffer
->
smb_buf_length
);
smb_buffer
->
smb_buf_length
=
cpu_to_be32
(
smb_buffer
->
smb_buf_length
);
cFYI
(
1
,
(
"Sending smb of length %d "
,
len
+
datalen
));
cFYI
(
1
,
(
"Sending smb: hdrlen %d datalen %d"
,
smb_hdr_length
,
datalen
));
dump_smb
(
smb_buffer
,
len
);
dump_smb
(
smb_buffer
,
len
);
while
(
len
+
datalen
>
0
)
{
while
(
len
+
datalen
>
0
)
{
...
@@ -233,6 +234,7 @@ smb_send2(struct socket *ssocket, struct smb_hdr *smb_buffer,
...
@@ -233,6 +234,7 @@ smb_send2(struct socket *ssocket, struct smb_hdr *smb_buffer,
if
(
rc
>=
len
)
{
if
(
rc
>=
len
)
{
iov
[
0
].
iov_len
=
0
;
iov
[
0
].
iov_len
=
0
;
rc
-=
len
;
rc
-=
len
;
len
=
0
;
}
else
{
/* some of hdr was not sent */
}
else
{
/* some of hdr was not sent */
len
-=
rc
;
len
-=
rc
;
iov
[
0
].
iov_len
-=
rc
;
iov
[
0
].
iov_len
-=
rc
;
...
...
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