aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-06-23 20:31:17 -0400
committerSteve French <sfrench@us.ibm.com>2005-06-23 20:31:17 -0400
commit0c0ff09329dafb165c0d9ac08965ddc0615020b1 (patch)
tree19b4cf11057b8cc740382c7d2c63b84538d45819 /fs/cifs
parent45abc6ee2b916a235d6824a41225177bd6e5e24f (diff)
[CIFS] Performance improvement, finish up adding CIFSSMBWrite2
Signed-off-by: Steve French (sfrench@us.ibm.com)
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifs_debug.c10
-rw-r--r--fs/cifs/cifssmb.c2
-rw-r--r--fs/cifs/file.c7
-rw-r--r--fs/cifs/transport.c6
4 files changed, 16 insertions, 9 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 4061e43471c1..838171328076 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -283,6 +283,12 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
283 atomic_read(&tcon->num_t2renames)); 283 atomic_read(&tcon->num_t2renames));
284 buf += item_length; 284 buf += item_length;
285 length += item_length; 285 length += item_length;
286 item_length = sprintf(buf,"\nFindFirst: %d FNext %d FClose %d",
287 atomic_read(&tcon->num_ffirst),
288 atomic_read(&tcon->num_fnext),
289 atomic_read(&tcon->num_fclose));
290 buf += item_length;
291 length += item_length;
286 } 292 }
287 read_unlock(&GlobalSMBSeslock); 293 read_unlock(&GlobalSMBSeslock);
288 294
@@ -360,7 +366,7 @@ cifs_proc_init(void)
360 if (pde) 366 if (pde)
361 pde->write_proc = oplockEnabled_write; 367 pde->write_proc = oplockEnabled_write;
362 368
363 pde = create_proc_read_entry("ReenableOldCifsReaddirCode", 0, proc_fs_cifs, 369 pde = create_proc_read_entry("Experimental", 0, proc_fs_cifs,
364 quotaEnabled_read, NULL); 370 quotaEnabled_read, NULL);
365 if (pde) 371 if (pde)
366 pde->write_proc = quotaEnabled_write; 372 pde->write_proc = quotaEnabled_write;
@@ -419,7 +425,7 @@ cifs_proc_clean(void)
419 remove_proc_entry("ExtendedSecurity",proc_fs_cifs); 425 remove_proc_entry("ExtendedSecurity",proc_fs_cifs);
420 remove_proc_entry("PacketSigningEnabled",proc_fs_cifs); 426 remove_proc_entry("PacketSigningEnabled",proc_fs_cifs);
421 remove_proc_entry("LinuxExtensionsEnabled",proc_fs_cifs); 427 remove_proc_entry("LinuxExtensionsEnabled",proc_fs_cifs);
422 remove_proc_entry("ReenableOldCifsReaddirCode",proc_fs_cifs); 428 remove_proc_entry("Experimental",proc_fs_cifs);
423 remove_proc_entry("LookupCacheEnabled",proc_fs_cifs); 429 remove_proc_entry("LookupCacheEnabled",proc_fs_cifs);
424 remove_proc_entry("cifs", proc_root_fs); 430 remove_proc_entry("cifs", proc_root_fs);
425} 431}
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index f3dfae7788fd..56d79fd90679 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -964,7 +964,7 @@ CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon,
964 __u32 bytes_sent; 964 __u32 bytes_sent;
965 __u16 byte_count; 965 __u16 byte_count;
966 966
967 cERROR(1,("write2 at %lld %d bytes",offset,count)); /* BB removeme BB */ 967 cFYI(1,("write2 at %lld %d bytes",offset,count)); /* BB removeme BB */
968 rc = small_smb_init(SMB_COM_WRITE_ANDX, 14, tcon, (void **) &pSMB); 968 rc = small_smb_init(SMB_COM_WRITE_ANDX, 14, tcon, (void **) &pSMB);
969 if (rc) 969 if (rc)
970 return rc; 970 return rc;
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index f55c0c7aeeb0..ddb25a0a63d5 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -845,11 +845,10 @@ static ssize_t cifs_write(struct file *file, const char *write_data,
845 if (rc != 0) 845 if (rc != 0)
846 break; 846 break;
847 } 847 }
848#ifdef CIFS_EXPERIMENTAL 848#ifdef CONFIG_CIFS_EXPERIMENTAL
849 /* BB FIXME We can not sign across two buffers yet */ 849 /* BB FIXME We can not sign across two buffers yet */
850 cERROR(1,("checking signing")); /* BB removeme BB */ 850 if((experimEnabled) && ((pTcon->ses->server->secMode &
851 if(pTcon->ses->server->secMode & 851 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) == 0)) {
852 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED) == 0)
853 rc = CIFSSMBWrite2(xid, pTcon, 852 rc = CIFSSMBWrite2(xid, pTcon,
854 open_file->netfid, 853 open_file->netfid,
855 min_t(const int, cifs_sb->wsize, 854 min_t(const int, cifs_sb->wsize,
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 04f4af07fdd4..496a2738bbe3 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -197,7 +197,7 @@ smb_send2(struct socket *ssocket, struct smb_hdr *smb_buffer,
197 iov[0].iov_base = smb_buffer; 197 iov[0].iov_base = smb_buffer;
198 iov[0].iov_len = len; 198 iov[0].iov_len = len;
199 iov[1].iov_base = data; 199 iov[1].iov_base = data;
200 iov[2].iov_len = datalen; 200 iov[1].iov_len = datalen;
201 smb_msg.msg_name = sin; 201 smb_msg.msg_name = sin;
202 smb_msg.msg_namelen = sizeof (struct sockaddr); 202 smb_msg.msg_namelen = sizeof (struct sockaddr);
203 smb_msg.msg_control = NULL; 203 smb_msg.msg_control = NULL;
@@ -210,7 +210,8 @@ smb_send2(struct socket *ssocket, struct smb_hdr *smb_buffer,
210 Flags2 is converted in SendReceive */ 210 Flags2 is converted in SendReceive */
211 211
212 smb_buffer->smb_buf_length = cpu_to_be32(smb_buffer->smb_buf_length); 212 smb_buffer->smb_buf_length = cpu_to_be32(smb_buffer->smb_buf_length);
213 cFYI(1, ("Sending smb of length %d ", len + datalen)); 213 cFYI(1, ("Sending smb: hdrlen %d datalen %d",
214 smb_hdr_length,datalen));
214 dump_smb(smb_buffer, len); 215 dump_smb(smb_buffer, len);
215 216
216 while (len + datalen > 0) { 217 while (len + datalen > 0) {
@@ -233,6 +234,7 @@ smb_send2(struct socket *ssocket, struct smb_hdr *smb_buffer,
233 if(rc >= len) { 234 if(rc >= len) {
234 iov[0].iov_len = 0; 235 iov[0].iov_len = 0;
235 rc -= len; 236 rc -= len;
237 len = 0;
236 } else { /* some of hdr was not sent */ 238 } else { /* some of hdr was not sent */
237 len -= rc; 239 len -= rc;
238 iov[0].iov_len -= rc; 240 iov[0].iov_len -= rc;