aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/transport.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-10-30[CIFS] fix error in smb_send2Steve French1-2/+5
smb_send2 exit logic was strange, and with the previous change could cause us to fail large smb writes when all of the smb was not sent as one chunk. Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-29[CIFS] Reduce number of socket retries in large write pathSteve French1-10/+31
CIFS in some heavy stress conditions cifs could get EAGAIN repeatedly in smb_send2 which led to repeated retries and eventually failure of large writes which could lead to data corruption. There are three changes that were suggested by various network developers: 1) convert cifs from non-blocking to blocking tcp sendmsg (we left in the retry on failure) 2) change cifs to not set sendbuf and rcvbuf size for the socket (let tcp autotune the buffer sizes since that works much better in the TCP stack now) 3) if we have a partial frame sent in smb_send2, mark the tcp session as invalid (close the socket and reconnect) so we do not corrupt the remaining part of the SMB with the beginning of the next SMB. This does not appear to hurt performance measurably and has been run in various scenarios, but it definately removes a corruption that we were seeing in some high stress test cases. Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-09-22cifs: don't use GFP_KERNEL with GFP_NOFSPekka Enberg1-2/+1
GFP_KERNEL and GFP_NOFS are mutually exclusive. If you combine them, you end up with plain GFP_KERNEL which can deadlock in cases where you really want GFP_NOFS. Cc: Steve French <sfrench@samba.org> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-07-29[CIFS] cifs send2 not retrying enough in some cases on full socketShirish Pargaonkar1-0/+1
There are cases in which, on a full socket which requires retry on sending data by the app (cifs in this case), that we were not retrying since we did not reinitialize a counter. This fixes the retry logic to retry up to 15 seconds on stuck sockets. Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-15[CIFS] Fix oops when slow oplock process races with unmountSteve French1-0/+18
If a tcon is being freed in call tconInfoFree, clean up any entries that may exist in global oplock queue as the tcon structure hanging off of those entries will be invalid and can cause oops while accesing any elements in the tcon structure. Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-12[CIFS] clean up some hard to read ifdefsSteve French1-3/+2
Christoph had noticed too many ifdefs in the CIFS code making it hard to read. This patch removes about a quarter of them from the C files in cifs by improving a few key ifdefs in the .h files. Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-07[CIFS] reduce checkpatch warningsSteve French1-3/+3
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-11-13[CIFS] Fix buffer overflow if server sends corrupt response to smallSteve French1-21/+70
request In SendReceive() function in transport.c - it memcpy's message payload into a buffer passed via out_buf param. The function assumes that all buffers are of size (CIFSMaxBufSize + MAX_CIFS_HDR_SIZE) , unfortunately it is also called with smaller (MAX_CIFS_SMALL_BUFFER_SIZE) buffers. There are eight callers (SMB worker functions) which are primarily affected by this change: TreeDisconnect, uLogoff, Close, findClose, SetFileSize, SetFileTimes, Lock and PosixLock CC: Dave Kleikamp <shaggy@austin.ibm.com> CC: Przemyslaw Wegrzyn <czajnik@czajsoft.pl> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-10-18[CIFS] log better errors on failed mountsSteve French1-6/+4
Also returns more accurate errors to mount for the cases of account expired and password expired Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-08-30[CIFS] formatting cleanup found by checkpatchSteve French1-14/+10
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-07-13[CIFS] whitespace/formatting fixesSteve French1-8/+8
This should be the last big batch of whitespace/formatting fixes. checkpatch warnings for the cifs directory are down about 90% and many of the remaining ones are harder to remove or make the code harder to read. Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-07-09[CIFS] Fix packet signatures for NTLMv2 caseSteve French1-3/+3
Signed-off-by: Yehuda Sadeh Weinraub <Yehuda.Sadeh@expand.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-07-06[CIFS] whitespace cleanupSteve French1-113/+113
checkpatch.pl redux Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-03-06[CIFS] cifs_prepare_write was incorrectly rereading page in some casesSteve French1-4/+2
Noticed by Shaggy. Signed-off-by: Shaggy <shaggy@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-12-07[PATCH] slab: remove kmem_cache_tChristoph Lameter1-1/+1
Replace all uses of kmem_cache_t with struct kmem_cache. The patch was generated using the following script: #!/bin/sh # # Replace one string by another in all the kernel sources. # set -e for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do quilt add $file sed -e "1,\$s/$1/$2/g" $file >/tmp/$$ mv /tmp/$$ $file quilt refresh done The script was run like this sh replace kmem_cache_t "struct kmem_cache" Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07[PATCH] slab: remove SLAB_KERNELChristoph Lameter1-2/+2
SLAB_KERNEL is an alias of GFP_KERNEL. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07[PATCH] slab: remove SLAB_NOFSChristoph Lameter1-1/+1
SLAB_NOFS is an alias of GFP_NOFS. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-11[CIFS]Jeremy Allison1-273/+404
Allow Windows blocking locks to be cancelled via a CANCEL_LOCK call. TODO - restrict this to servers that support NT_STATUS codes (Win9x will probably not support this call). Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Steve French <sfrench@us.ibm.com> (cherry picked from 570d4d2d895569825d0d017d4e76b51138f68864 commit)
2006-08-11[CIFS] Make midState usage more consistentSteve French1-6/+6
Although harmless, we were sometimes treating midState like it contained flags but they are exclusive states, and this makes that more clear. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Steve French <sfrench@us.ibm.com> (cherry picked from 586c057c3a68dd6ae0f3ba94fbf76798b1558074 commit)
2006-08-11[CIFS] spinlock protect read of last srv response time in timeout pathSteve French1-23/+76
Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Steve French <sfrench@us.ibm.com> (cherry picked from b33a3f55e54fd210fc043eafcf83728b03bc9e02 commit)
2006-08-11[CIFS] Do not time out posix brl requests when using new posix setfileinfoSteve French1-3/+13
request and do not time out slow requests to a server that is still responding well to other threads Suggested by jra of Samba team Signed-off-by: Steve French <sfrench@us.ibm.com> (cherry picked from 89b57148115479eef074b8d3f86c4c86c96ac969 commit)
2006-05-31[CIFS] Cleanup extra whitespace in dmesg logging. Update cifs change logSteve French1-2/+1
2006-02-26[CIFS] Free small buffers earlier so we exceed the cifsSteve French1-8/+14
small req buffer pool less often. Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-23[CIFS] Do not zero non-existent iovec in SendReceive response processing.Steve French1-1/+0
Could cause memory leak in some readpaths depending on what junk followed it in the stack. Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-12[CIFS] Add worker function for Get ACL cifs styleSteve French1-1/+0
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-12-12[CIFS] Avoid extra large buffer allocation (and memcpy) in cifs_readpagesSteve French1-19/+19
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-12-02[CIFS] Readpages and readir performance improvements - eliminate extraSteve French1-8/+11
memcpy. Part 1 Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-29[CIFS] Fix umount --force to wake up the pending response queue, not justSteve French1-0/+1
the request queue. Also periodically wakeup response_q so threads can check if stuck requests have timed out. Workaround Windows server illegal smb length on transact2 findfirst response. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-16[CIFS] Fix sparse warnings on smb bcc (byte count)Steve French1-2/+2
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-10-11[CIFS] CIFS Stats improvementsSteve French1-1/+24
New cifs_writepages routine was not updated bytes written in cifs stats. Also added ability to clear /proc/fs/cifs/Stats by writing (0 or 1) to it. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-10-10[CIFS] Correct cifs tcp retry when some data sent before getting EAGAIN.Steve French1-0/+3
Continue implementation of cifs umount begin to allow force unmounts of cifs mounts. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-10-10[CIFS] Reduce CIFS tcp congestion timeout (it was too long) and backoffSteve French1-6/+7
ever longer amounts (up to 15 seconds). This improves performance especially when using large wsize. Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-10-07[CIFS] /proc/fs/cifs debug code cleanup and new stats2Steve French1-0/+24
These changes to debug code and new stats are helpful in debugging potential tcp performance/configuration problems under cifs. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-10-05CIFS: Allow wsize to exceed CIFSMaxBufSizeSteve French1-15/+1
This allows cifs_writepages to send data in larger chunks from the page cache, without requiring larger memory allocations in other cases. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-10-05CIFS: implement cifs_writepages to perform multi-page I/OSteve French1-4/+6
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-10-03[CIFS] Missing parenthesis from error message in previous fixSteve French1-1/+1
Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-10-03[CIFS] Add writepages support to shrink memory usage on writes,Steve French1-40/+55
eliminate the double copy, and improve cifs write performance and help the server by upping the typical write size from 4K to 16K (or even larger if wsize set explicitly) for servers which support this. Part 1 of 2 Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-09-22[CIFS] Various minor bigendian fixes and sparse level 2 warning message fixesSteve French1-2/+2
Most important of these fixes mapchars on bigendian and a few statfs fields Signed-off-by: Shaggy (shaggy@austin.ibm.com) Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-09-15[CIFS] Fix compiler warningsSteve French1-1/+1
Fix some compiler warnings noticed on x64 by me and ppc64 by Shaggy Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-08-20[CIFS] Make CIFS statistics more accurate and add some stats that wereSteve French1-1/+1
missing. Most importantly SMB reads were undercounted. Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-06-23[CIFS] Performance improvement, finish up adding CIFSSMBWrite2Steve French1-2/+4
Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-06-13[CIFS] CIFS writepage improvements - eliminate double copySteve French1-50/+173
Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-04-28[PATCH] cifs: Do not init smb requests or block when sending requestsSteve French1-0/+6
if cifsd thread is no longer running to demultixplex responses. Do not send FindClose request when FindFirst failed without reaching end of search. Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-28[PATCH] cifs: cleanup various long linesSteve French1-9/+13
Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-28[PATCH] cifs: Do not use large smb buffers in response pathSteve French1-2/+5
unless response is larger than 256 bytes. This cuts more than 1/3 of the large memory allocations that cifs does and should be a huge help to memory pressure under stress. Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-28[PATCH] cifs: Do not interpret oplock break responses as responses to an unrelated commandSteve French1-1/+0
.. even if the multiplex ids match. Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-28[PATCH] cifs: Fix multiuser packet signing to use the right sequence number and mac session keySteve French1-9/+13
Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+619
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!