Commit b1c5bf7c authored by Steve French's avatar Steve French Committed by Steve French

[CIFS] Allow peek to return less than smb header so we do not prematurely kill...

[CIFS] Allow peek to return less than smb header so we do not prematurely kill session to server when 
socket stack is busy.

Signed-off-by: Steve French (sfrench@us.ibm.com)
parent 9eaa23ae
...@@ -200,7 +200,20 @@ Servers must support the NTLM SMB dialect (which is the most recent, supported ...@@ -200,7 +200,20 @@ Servers must support the NTLM SMB dialect (which is the most recent, supported
by Samba and Windows NT version 4, 2000 and XP and many other SMB/CIFS servers) by Samba and Windows NT version 4, 2000 and XP and many other SMB/CIFS servers)
Servers must support either "pure-TCP" (port 445 TCP/IP CIFS connections) or RFC Servers must support either "pure-TCP" (port 445 TCP/IP CIFS connections) or RFC
1001/1002 support for "Netbios-Over-TCP/IP." Neither of these is likely to be a 1001/1002 support for "Netbios-Over-TCP/IP." Neither of these is likely to be a
problem as most servers support this. IPv6 support is planned for the future. problem as most servers support this. IPv6 support is planned for the future,
and is almost complete.
Valid filenames differ between Windows and Linux. Windows typically restricts
filenames which contain certain reserved characters (e.g.the character :
which is used to delimit the beginning of a stream name by Windows), while
Linux allows a slightly wider set of valid characters in filenames. Windows
servers can remap such characters when an explicit mapping is specified in
the Server's registry. Samba starting with version 3.10 will allow such
filenames (ie those which contain valid Linux characters, which normally
would be forbidden for Windows/CIFS semantics) as long as the server is
configured for Unix Extensions (and the client has not disabled
/proc/fs/cifs/LinuxExtensionsEnabled).
CIFS VFS Mount Options CIFS VFS Mount Options
====================== ======================
...@@ -421,11 +434,11 @@ and for more extensive tracing including the start of smb requests and responses ...@@ -421,11 +434,11 @@ and for more extensive tracing including the start of smb requests and responses
echo 1 > /proc/fs/cifs/traceSMB echo 1 > /proc/fs/cifs/traceSMB
Two other experimental features are under development and to test Two other experimental features are under development and to test
require enabling an ifdef (e.g. by adding "#define CIFS_FCNTL" in cifsglob.h) require enabling CONFIG_CIFS_EXPERIMENTAL
CONFIG_CIFS_QUOTA More efficient write operations and SMB buffer handling
CONFIG_CIFS_FCNTL (fcntl needed for support of directory change DNOTIFY fcntl: needed for support of directory change
notification and perhaps later for file leases) notification and perhaps later for file leases)
Per share (per client mount) statistics are available in /proc/fs/cifs/Stats Per share (per client mount) statistics are available in /proc/fs/cifs/Stats
......
...@@ -14,7 +14,7 @@ b) Better pam/winbind integration (e.g. to handle uid mapping ...@@ -14,7 +14,7 @@ b) Better pam/winbind integration (e.g. to handle uid mapping
better) better)
c) multi-user mounts - multiplexed sessionsetups over single vc c) multi-user mounts - multiplexed sessionsetups over single vc
(ie tcp session) - prettying up needed (ie tcp session) - prettying up needed, and more testing needed
d) Kerberos/SPNEGO session setup support - (started) d) Kerberos/SPNEGO session setup support - (started)
...@@ -40,8 +40,8 @@ k) hook lower into the sockets api (as NFS/SunRPC does) to avoid the ...@@ -40,8 +40,8 @@ k) hook lower into the sockets api (as NFS/SunRPC does) to avoid the
extra copy in/out of the socket buffers in some cases. extra copy in/out of the socket buffers in some cases.
l) finish support for IPv6. This is mostly complete but l) finish support for IPv6. This is mostly complete but
needs a simple inet_pton like function to convert ipv6 needs a simple conversion of ipv6 to sin6_addr from the
addresses in string representation. address in string representation.
m) Better optimize open (and pathbased setfilesize) to reduce the m) Better optimize open (and pathbased setfilesize) to reduce the
oplock breaks coming from windows srv. Piggyback identical file oplock breaks coming from windows srv. Piggyback identical file
...@@ -50,23 +50,24 @@ than resending (helps reduce server resource utilization and avoid ...@@ -50,23 +50,24 @@ than resending (helps reduce server resource utilization and avoid
spurious oplock breaks). spurious oplock breaks).
o) Improve performance of readpages by sending more than one read o) Improve performance of readpages by sending more than one read
at a time when 8 pages or more are requested. Evaluate whether at a time when 8 pages or more are requested. In conjuntion
reads larger than 16K would be helpful. add support for async_cifs_readpages.
p) For support of Windows9x/98 we need to retry failed mounts p) Add support for storing symlink and fifo info to Windows servers
to *SMBSERVER (default server name) with the uppercase hostname
in the RFC1001 session_init request.
q) Add support for storing symlink and fifo info to Windows servers
in the Extended Attribute format their SFU clients would recognize. in the Extended Attribute format their SFU clients would recognize.
r) Finish fcntl D_NOTIFY support so kde and gnome file list windows q) Finish fcntl D_NOTIFY support so kde and gnome file list windows
will autorefresh will autorefresh (started)
r) Add GUI tool to configure /proc/fs/cifs settings and for display of
the CIFS statistics (started)
q) implement support for security and trusted categories of xattrs
(requires minor protocol extension) to enable better support for SELINUX
s) Add GUI tool to configure /proc/fs/cifs settings and for display of r) Implement O_DIRECT flag on open (already supported on mount)
the CIFS statistics
KNOWN BUGS (updated May 27, 2004) KNOWN BUGS (updated December 10, 2004)
==================================== ====================================
1) existing symbolic links (Windows reparse points) are recognized but 1) existing symbolic links (Windows reparse points) are recognized but
can not be created remotely. They are implemented for Samba and those that can not be created remotely. They are implemented for Samba and those that
...@@ -83,9 +84,6 @@ Samba (may be unmappable due to POSIX to Windows lock model ...@@ -83,9 +84,6 @@ Samba (may be unmappable due to POSIX to Windows lock model
differences but worth investigating). Also debug Samba to differences but worth investigating). Also debug Samba to
see why lock test case 7 takes longer to complete to Samba see why lock test case 7 takes longer to complete to Samba
than to Windows. than to Windows.
5) implement search rewind (seeking backward in a readdir), which is
necessary for one of the "special" subsection of posix file API
tests in the Connectathon nfs test suite.
Misc testing to do Misc testing to do
================== ==================
......
...@@ -330,8 +330,8 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) ...@@ -330,8 +330,8 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
csocket = server->ssocket; csocket = server->ssocket;
continue; continue;
} else { } else {
if ((length != sizeof (struct smb_hdr) - 1) if (/*(length != sizeof (struct smb_hdr) - 1)
|| (pdu_length > ||*/ (pdu_length >
CIFS_MAX_MSGSIZE + MAX_CIFS_HDR_SIZE) CIFS_MAX_MSGSIZE + MAX_CIFS_HDR_SIZE)
|| (pdu_length < || (pdu_length <
sizeof (struct smb_hdr) - 1) sizeof (struct smb_hdr) - 1)
...@@ -341,7 +341,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) ...@@ -341,7 +341,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
cERROR(1, cERROR(1,
("Invalid size or format for SMB found with length %d and pdu_length %d", ("Invalid size or format for SMB found with length %d and pdu_length %d",
length, pdu_length)); length, pdu_length));
cifs_dump_mem("Received Data is: ",temp,sizeof(struct smb_hdr)); cifs_dump_mem("Received Data is: ",temp,sizeof(struct smb_hdr)+3);
/* could we fix this network corruption by finding next /* could we fix this network corruption by finding next
smb header (instead of killing the session) and smb header (instead of killing the session) and
restart reading from next valid SMB found? */ restart reading from next valid SMB found? */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment