aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/transport.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-12-02 16:32:45 -0500
committerSteve French <sfrench@us.ibm.com>2005-12-02 16:32:45 -0500
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 f8871196098c..0abfbf4e4a49 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,
206 return rc; 206 return rc;
207} 207}
208 208
209#ifdef CONFIG_CIFS_EXPERIMENTAL
210static int 209static int
211smb_send2(struct socket *ssocket, struct kvec *iov, int n_vec, 210smb_send2(struct socket *ssocket, struct kvec *iov, int n_vec,
212 struct sockaddr *sin) 211 struct sockaddr *sin)
@@ -392,8 +391,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
392 return -ENOMEM; 391 return -ENOMEM;
393 } 392 }
394 393
395/* BB FIXME */ 394 rc = cifs_sign_smb2(iov, n_vec, ses->server, &midQ->sequence_number);
396/* rc = cifs_sign_smb2(iov, n_vec, ses->server, &midQ->sequence_number); */
397 395
398 midQ->midState = MID_REQUEST_SUBMITTED; 396 midQ->midState = MID_REQUEST_SUBMITTED;
399#ifdef CONFIG_CIFS_STATS2 397#ifdef CONFIG_CIFS_STATS2
@@ -492,11 +490,17 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
492 490
493 if (midQ->resp_buf && 491 if (midQ->resp_buf &&
494 (midQ->midState == MID_RESPONSE_RECEIVED)) { 492 (midQ->midState == MID_RESPONSE_RECEIVED)) {
493
495 in_buf->smb_buf_length = receive_len; 494 in_buf->smb_buf_length = receive_len;
496 /* BB verify that length would not overrun small buf */ 495 if(receive_len > 500) {
497 memcpy((char *)in_buf + 4, 496 /* use multiple buffers on way out */
498 (char *)midQ->resp_buf + 4, 497 } else {
499 receive_len); 498 memcpy((char *)in_buf + 4,
499 (char *)midQ->resp_buf + 4,
500 receive_len);
501 iov[0].iov_len = receive_len + 4;
502 iov[1].iov_len = 0;
503 }
500 504
501 dump_smb(in_buf, 80); 505 dump_smb(in_buf, 80);
502 /* convert the length into a more usable form */ 506 /* convert the length into a more usable form */
@@ -549,7 +553,6 @@ out_unlock2:
549 553
550 return rc; 554 return rc;
551} 555}
552#endif /* CIFS_EXPERIMENTAL */
553 556
554int 557int
555SendReceive(const unsigned int xid, struct cifsSesInfo *ses, 558SendReceive(const unsigned int xid, struct cifsSesInfo *ses,