summaryrefslogtreecommitdiff
path: root/fs/cifs/cifs_debug.c
AgeCommit message (Collapse)AuthorFilesLines
2009-03-31proc 2/2: remove struct proc_dir_entry::ownerAlexey Dobriyan1-1/+0
Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy as correctly noted at bug #12454. Someone can lookup entry with NULL ->owner, thus not pinning enything, and release it later resulting in module refcount underflow. We can keep ->owner and supply it at registration time like ->proc_fops and ->data. But this leaves ->owner as easy-manipulative field (just one C assignment) and somebody will forget to unpin previous/pin current module when switching ->owner. ->proc_fops is declared as "const" which should give some thoughts. ->read_proc/->write_proc were just fixed to not require ->owner for protection. rmmod'ed directories will be empty and return "." and ".." -- no harm. And directories with tricky enough readdir and lookup shouldn't be modular. We definitely don't want such modular code. Removing ->owner will also make PDE smaller. So, let's nuke it. Kudos to Jeff Layton for reminding about this, let's say, oversight. http://bugzilla.kernel.org/show_bug.cgi?id=12454 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2009-03-12[CIFS] Send SMB flush in cifs_fsyncSteve French1-0/+2
In contrast to the now-obsolete smbfs, cifs does not send SMB_COM_FLUSH in response to an explicit fsync(2) to guarantee that all volatile data is written to stable storage on the server side, provided the server honors the request (which, to my knowledge, is true for Windows and Samba with 'strict sync' enabled). This patch modifies the cifs_fsync implementation to restore the fsync-behavior of smbfs by triggering SMB_COM_FLUSH after sending outstanding data on the client side to the server. Signed-off-by: Horst Reiterer <horst.reiterer@gmail.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-17[CIFS] Fix build breakSteve French1-2/+2
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-17cifs: reinstate sharing of tree connectionsJeff Layton1-108/+128
Use a similar approach to the SMB session sharing. Add a list of tcons attached to each SMB session. Move the refcount to non-atomic. Protect all of the above with the cifs_tcp_ses_lock. Add functions to properly find and put references to the tcons. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-15cifs: reinstate sharing of SMB sessions sans racesJeff Layton1-26/+27
We do this by abandoning the global list of SMB sessions and instead moving to a per-server list. This entails adding a new list head to the TCP_Server_Info struct. The refcounting for the cifsSesInfo is moved to a non-atomic variable. We have to protect it by a lock anyway, so there's no benefit to making it an atomic. The list and refcount are protected by the global cifs_tcp_ses_lock. The patch also adds a new routines to find and put SMB sessions and that properly take and put references under the lock. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-15cifs: disable sharing session and tcon and add new TCP sharing codeJeff Layton1-1/+1
The code that allows these structs to be shared is extremely racy. Disable the sharing of SMB and tcon structs for now until we can come up with a way to do this that's race free. We want to continue to share TCP sessions, however since they are required for multiuser mounts. For that, implement a new (hopefully race-free) scheme. Add a new global list of TCP sessions, and take care to get a reference to it whenever we're dealing with one. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-13[CIFS] remove unused list, add new cifs sock list to prepare for ↵Steve French1-2/+2
mount/umount fix Also adds two lines missing from the previous patch (for the need reconnect flag in the /proc/fs/cifs/DebugData handling) The new global_cifs_sock_list is added, and initialized in init_cifs but not used yet. Jeff Layton will be adding code in to use that and to remove the GlobalTcon and GlobalSMBSession lists. CC: Jeff Layton <jlayton@redhat.com> CC: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-08-09[CIFS] list entry can not return nullSteve French1-29/+24
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-07-24[CIFS] Fix warnings from checkpatchShirish Pargaonkar1-2/+2
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-07-24[CIFS] remove checkpatch warningSteve French1-7/+12
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-07-24Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>Alexey Dobriyan1-395/+241
Cc: Steven French <sfrench@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-29proc: remove proc_root_fsAlexey Dobriyan1-2/+2
Use creation by full path instead: "fs/foo". Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-18[CIFS] fix build break when proc disabledSteve French1-2/+2
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-12[CIFS] clean up some hard to read ifdefsSteve French1-3/+11
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-08[CIFS] reduce checkpatch warningsSteve French1-2/+1
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-10-05[CIFS] Fix cifsd so shuts down when signing fails during mountSteve French1-3/+8
Fixes two problems: 1) we dropped down to negotiating lanman if we did not recognize the mechanism (krb5 e.g.) 2) we did not stop cifsd (thus will fail when doing rmod cifs with slab free errors) when we fail tcon but have a bad session (which is the case in which signing is required but we don't allow signing on the client) It also turns on extended security flag in the header when passing "sec=krb5" on mount command (although kerberos support is not done of course) Acked-by: Jeff Layton <jlayton@redhat.com> CC: Shaggy <shaggy@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-09-15[CIFS] missing field in debug output from previous fixSteve French1-1/+2
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-09-15[CIFS] Fix potential NULL pointer usage if kzalloc failsSteve French1-7/+9
Potential problem was noticed by Cyrill Gorcunov CC: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-07-13[CIFS] whitespace/formatting fixesSteve French1-1/+0
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-06-28[CIFS] Fix sign mount option and sign proc config settingSteve French1-84/+8
We were checking the wrong (old) global variable to determine whether to override server and force signing on the SMB connection. Acked-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-06-25[CIFS] fix whitespaceSteve French1-5/+5
More whitespace problems found by checkpatch Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-06-06[CIFS] whitespace cleanup part 2Steve French1-123/+129
Various coding style problems found by running the new checkpatch.pl script against fs/cifs. 3 more files fixed up. Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-01-22[CIFS] cifs sprintf fixSteve French1-2/+2
Cc: <alert7@xfocus.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-06-06[CIFS] NTLMv2 support part 4Steve French1-1/+1
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-06-05[CIFS] Fix mask so can set new cifs security flags properlySteve French1-4/+2
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-06-03[CIFS] Support for older servers which require plaintext passwordsSteve French1-16/+40
disabled by default, but can be enabled via proc for servers which require such support. Also includes support for setting security flags for cifs. See fs/cifs/README Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-06-01[CIFS] Support for setting up SMB sessions to legacy lanman servers part 2Steve French1-2/+2
2006-06-01[CIFS] Support for setting up SMB sessions to legacy lanman serversSteve French1-13/+71
2005-12-13[CIFS] Avoid extra large buffer allocation (and memcpy) in cifs_readpagesSteve French1-20/+19
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-12-04[CIFS] Display large/small total buffer allocations in /proc/fs/cifs/StatsSteve French1-0/+8
when CONFIG_CIFS_STATS2 is on (helps in debugging performance) Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-12-04[CIFS] Add extended stats (STATS2) for total buffer allocations forSteve French1-0/+4
better performance debugging. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-10-12[CIFS] Add null malloc response check in notify experimental codeSteve French1-1/+1
Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-10-12[CIFS] CIFS Stats improvementsSteve French1-1/+48
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] Fix rsize calculation so that large readx flag is checked.Steve French1-1/+1
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-2/+2
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-4/+12
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-08-21[CIFS] Make CIFS statistics more accurate and add some stats that wereSteve French1-10/+20
missing. Most importantly SMB reads were undercounted. Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-06-24[CIFS] Performance improvement, finish up adding CIFSSMBWrite2Steve French1-2/+8
Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-04-29[PATCH] cifs: remove cifs_kcalloc and check for NULL return on kcalloc in ↵Steve French1-4/+11
session initialization Suggested by: Adrian Bunk and Dave Miller Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-29[PATCH] cifs: Do not use large smb buffers in response pathSteve French1-4/+7
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-29[PATCH] cifs: Do not interpret oplock break responses as responses to an ↵Steve French1-1/+6
unrelated command .. 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-29[PATCH] cifs: finish up of special character mapping capable unicode ↵Steve French1-4/+6
conversion routine part 2 of 3 Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-17Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds1-0/+805
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!