summaryrefslogtreecommitdiffstats
path: root/fs/cifs/transport.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-12-02 13:32:45 -0800
committerSteve French <sfrench@us.ibm.com>2005-12-02 13:32:45 -0800
commit84afc29b185334f489975a003b128e1b15e24a54 (patch)
treeab9544be46e3c52fcf799bb9bbf14c0db7b94b37 /fs/cifs/transport.c
parentbf8206791750854bc6668266b694e8fe2cacb924 (diff)
[CIFS] Readpages and readir performance improvements - eliminate extra
memcpy. Part 1 Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r--fs/cifs/transport.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index f8871196098..0abfbf4e4a4 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -206,7 +206,6 @@ smb_send(struct socket *ssocket, struct smb_hdr *smb_buffer,
return rc;
}
-#ifdef CONFIG_CIFS_EXPERIMENTAL
static int
smb_send2(struct socket *ssocket, struct kvec *iov, int n_vec,
struct sockaddr *sin)
@@ -392,8 +391,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
return -ENOMEM;
}
-/* BB FIXME */
-/* rc = cifs_sign_smb2(iov, n_vec, ses->server, &midQ->sequence_number); */
+ rc = cifs_sign_smb2(iov, n_vec, ses->server, &midQ->sequence_number);
midQ->midState = MID_REQUEST_SUBMITTED;
#ifdef CONFIG_CIFS_STATS2
@@ -492,11 +490,17 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
if (midQ->resp_buf &&
(midQ->midState == MID_RESPONSE_RECEIVED)) {
+
in_buf->smb_buf_length = receive_len;
- /* BB verify that length would not overrun small buf */
- memcpy((char *)in_buf + 4,
- (char *)midQ->resp_buf + 4,
- receive_len);
+ if(receive_len > 500) {
+ /* use multiple buffers on way out */
+ } else {
+ memcpy((char *)in_buf + 4,
+ (char *)midQ->resp_buf + 4,
+ receive_len);
+ iov[0].iov_len = receive_len + 4;
+ iov[1].iov_len = 0;
+ }
dump_smb(in_buf, 80);
/* convert the length into a more usable form */
@@ -549,7 +553,6 @@ out_unlock2:
return rc;
}
-#endif /* CIFS_EXPERIMENTAL */
int
SendReceive(const unsigned int xid, struct cifsSesInfo *ses,