Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7405e16 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Fix typo in cifs readme from previous commit
  [CIFS] Make sec=none force an anonymous mount
  [CIFS] Change semaphore to mutex for cifs lock_sem
  [CIFS] Fix oops in reset_cifs_unix_caps on reconnect
  [CIFS] UID/GID override on CIFS mounts to Samba
  [CIFS] prefixpath mounts to servers supporting posix paths used wrong slash
  [CIFS] Update cifs version to 1.49
  [CIFS] Replace kmalloc/memset combination with kzalloc
  [CIFS]  Add IPv6 support
  [CIFS] New CIFS POSIX mkdir performance improvement (part 2)
  [CIFS] New CIFS POSIX mkdir performance improvement
  [CIFS] Add write perm for usr to file on windows should remove r/o dos attr
  [CIFS] Remove unnecessary parm to cifs_reopen_file
  [CIFS] Switch cifsd to kthread_run from kernel_thread
  [CIFS] Remove unnecessary checks
parents ea62ccd0 0ec54aa8
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
Verison 1.48
Version 1.49
------------
IPv6 support.  Enable ipv6 addresses to be passed on mount (put the ipv6
address after the "ip=" mount option, at least until mount.cifs is fixed to
handle DNS host to ipv6 name translation).  Accept override of uid or gid
on mount even when Unix Extensions are negotiated (it used to be ignored
when Unix Extensions were ignored).  This allows users to override the
default uid and gid for files when they are certain that the uids or
gids on the server do not match those of the client.  Make "sec=none"
mount override username (so that null user connection is attempted)
to match what documentation said.

Version 1.48
------------
Fix mtime bouncing around from local idea of last write times to remote time.
Fix hang (in i_size_read) when simultaneous size update of same remote file
@@ -9,7 +21,13 @@ from read-only back to read-write, reflect this change in default file mode
(we had been leaving a file's mode read-only until the inode were reloaded).
Allow setting of attribute back to ATTR_NORMAL (removing readonly dos attribute
when archive dos attribute not set and we are changing mode back to writeable
on server which does not support the Unix Extensions).
on server which does not support the Unix Extensions).  Remove read only dos
attribute on chmod when adding any write permission (ie on any of
user/group/other (not all of user/group/other ie  0222) when
mounted to windows.  Add support for POSIX MkDir (slight performance
enhancement and eliminates the network race between the mkdir and set 
path info of the mode).


Version 1.47
------------
+31 −12
Original line number Diff line number Diff line
@@ -257,13 +257,19 @@ A partial list of the supported mount options follows:
		mount.	
  domain	Set the SMB/CIFS workgroup name prepended to the
		username during CIFS session establishment
  uid		If CIFS Unix extensions are not supported by the server
		this overrides the default uid for inodes. For mounts to
		servers which do support the CIFS Unix extensions, such
		as a properly configured Samba server, the server provides
		the uid, gid and mode.  For servers which do not support
		the Unix extensions, the default uid (and gid) returned on
		lookup of existing files is the uid (gid) of the person
  uid		Set the default uid for inodes. For mounts to servers
		which do support the CIFS Unix extensions, such as a
		properly configured Samba server, the server provides
		the uid, gid and mode so this parameter should  not be
		specified unless the server and clients uid and gid
		numbering differ.  If the server and client are in the
		same domain (e.g. running winbind or nss_ldap) and
		the server supports the Unix Extensions then the uid
		and gid can be retrieved from the server (and uid
		and gid would not have to be specifed on the mount. 
		For servers which do not support the CIFS Unix
		extensions, the default uid (and gid) returned on lookup
		of existing files will be the uid (gid) of the person
		who executed the mount (root, except when mount.cifs
		is configured setuid for user mounts) unless the "uid=" 
		(gid) mount option is specified.  For the uid (gid) of newly
@@ -281,8 +287,7 @@ A partial list of the supported mount options follows:
		the client.  Note that the mount.cifs helper must be
		at version 1.10 or higher to support specifying the uid
		(or gid) in non-numberic form.
  gid		If CIFS Unix extensions are not supported by the server
		this overrides the default gid for inodes.
  gid		Set the default gid for inodes (similar to above).
  file_mode     If CIFS Unix extensions are not supported by the server
		this overrides the default mode for file inodes.
  dir_mode      If CIFS Unix extensions are not supported by the server 
@@ -467,7 +472,7 @@ including:
	-V      print mount.cifs version
	-?      display simple usage information

With recent 2.6 kernel versions of modutils, the version of the cifs kernel
With most 2.6 kernel versions of modutils, the version of the cifs kernel
module can be displayed via modinfo.

Misc /proc/fs/cifs Flags and Debug Info
@@ -516,8 +521,22 @@ SecurityFlags Flags which control security negotiation and
			must use plaintext passwords			0x20020
			(reserved for future packet encryption)		0x00040

cifsFYI			If set to one, additional debug information is
			logged to the system error log. (default 0)
cifsFYI			If set to non-zero value, additional debug information
			will be logged to the system error log.  This field
			contains three flags controlling different classes of
			debugging entries.  The maximum value it can be set
			to is 7 which enables all debugging points (default 0).
			Some debugging statements are not compiled into the
			cifs kernel unless CONFIG_CIFS_DEBUG2 is enabled in the
			kernel configuration. cifsFYI may be set to one or
			nore of the following flags (7 sets them all):

			log cifs informational messages			0x01
			log return codes from cifs entry points		0x02
			log slow responses (ie which take longer than 1 second)
			  CONFIG_CIFS_STATS2 must be enabled in .config	0x04
				
				
traceSMB		If set to one, debug information is logged to the
			system error log with the start of smb requests
			and responses (default 0)
+29 −40
Original line number Diff line number Diff line
Version 1.39 November 30, 2005
Version 1.49 April 26, 2007

A Partial List of Missing Features
==================================
@@ -18,7 +18,7 @@ better)

d) Kerberos/SPNEGO session setup support - (started)

e) NTLMv2 authentication (mostly implemented - double check
e) More testing of NTLMv2 authentication (mostly implemented - double check
that NTLMv2 signing works, also need to cleanup now unneeded SessSetup code in
fs/cifs/connect.c)

@@ -27,55 +27,44 @@ used (Kerberos or NTLMSSP). Signing alreadyimplemented for NTLM
and raw NTLMSSP already. This is important when enabling
extended security and mounting to Windows 2003 Servers

f) Directory entry caching relies on a 1 second timer, rather than 
g) Directory entry caching relies on a 1 second timer, rather than 
using FindNotify or equivalent.  - (started)

g) A few byte range testcases fail due to POSIX vs. Windows/CIFS
style byte range lock differences.  Save byte range locks so
reconnect can replay them.  

h) Support unlock all (unlock 0,MAX_OFFSET)
by unlocking all known byte range locks that we locked on the file.

i) quota support (needs minor kernel change since quota calls
h) quota support (needs minor kernel change since quota calls
to make it to network filesystems or deviceless filesystems)

j) investigate sync behavior (including syncpage) and check  
i) investigate sync behavior (including syncpage) and check  
for proper behavior of intr/nointr

k) hook lower into the sockets api (as NFS/SunRPC does) to avoid the
j) hook lower into the sockets api (as NFS/SunRPC does) to avoid the
extra copy in/out of the socket buffers in some cases.

l) finish support for IPv6.  This is mostly complete but
needs a simple conversion of ipv6 to sin6_addr from the
address in string representation.

m) Better optimize open (and pathbased setfilesize) to reduce the
k) Better optimize open (and pathbased setfilesize) to reduce the
oplock breaks coming from windows srv.  Piggyback identical file
opens on top of each other by incrementing reference count rather
than resending (helps reduce server resource utilization and avoid
spurious oplock breaks).

o) Improve performance of readpages by sending more than one read
l) Improve performance of readpages by sending more than one read
at a time when 8 pages or more are requested. In conjuntion
add support for async_cifs_readpages.

p) Add support for storing symlink info to Windows servers 
m) Add support for storing symlink info to Windows servers 
in the Extended Attribute format their SFU clients would recognize.

q) Finish fcntl D_NOTIFY support so kde and gnome file list windows
n) Finish fcntl D_NOTIFY support so kde and gnome file list windows
will autorefresh (partially complete by Asser). Needs minor kernel
vfs change to support removing D_NOTIFY on a file.   

r) Add GUI tool to configure /proc/fs/cifs settings and for display of
o) Add GUI tool to configure /proc/fs/cifs settings and for display of
the CIFS statistics (started)

s) implement support for security and trusted categories of xattrs
p) implement support for security and trusted categories of xattrs
(requires minor protocol extension) to enable better support for SELINUX

t) Implement O_DIRECT flag on open (already supported on mount)
q) Implement O_DIRECT flag on open (already supported on mount)

u) Create UID mapping facility so server UIDs can be mapped on a per
r) Create UID mapping facility so server UIDs can be mapped on a per
mount or a per server basis to client UIDs or nobody if no mapping
exists.  This is helpful when Unix extensions are negotiated to
allow better permission checking when UIDs differ on the server
@@ -83,19 +72,26 @@ and client. Add new protocol request to the CIFS protocol
standard for asking the server for the corresponding name of a
particular uid.

v) Add support for CIFS Unix and also the newer POSIX extensions to the
s) Add support for CIFS Unix and also the newer POSIX extensions to the
server side for Samba 4.

w) Finish up the dos time conversion routines needed to return old server
time to the client (default time, of now or time 0 is used now for these 
very old servers)

x) In support for OS/2 (LANMAN 1.2 and LANMAN2.1 based SMB servers) 
t) In support for OS/2 (LANMAN 1.2 and LANMAN2.1 based SMB servers) 
need to add ability to set time to server (utimes command)

y) Finish testing of Windows 9x/Windows ME server support (started).
u) DOS attrs - returned as pseudo-xattr in Samba format (check VFAT and NTFS for this too)

v) mount check for unmatched uids

w) Add mount option for Linux extension disable per mount, and partial
disable per mount (uid off, symlink/fifo/mknod on but what about posix acls?)

KNOWN BUGS (updated February 26, 2007)
x) Fix Samba 3 server to handle Linux kernel aio so dbench with lots of 
processes can proceed better in parallel (on the server)

y) Fix Samba 3 to handle reads/writes over 127K (and remove the cifs mount
restriction of wsize max being 127K) 

KNOWN BUGS (updated April 24, 2007)
====================================
See http://bugzilla.samba.org - search on product "CifsVFS" for
current bug list.
@@ -127,10 +123,3 @@ negotiated size) and send larger write sizes to modern servers.
4) More exhaustively test against less common servers.  More testing
against Windows 9x, Windows ME servers.
DOS attrs - returned as pseudo-xattr in Samba format (check VFAT and NTFS for this too)

mount check for unmatched uids - and uid override

Add mount option for Linux extension disable per mount, and partial disable per mount (uid off, symlink/fifo/mknod on but what about posix acls?) 

Free threads at umount --force that are stuck on the sesSem
+8 −6
Original line number Diff line number Diff line
@@ -24,10 +24,12 @@
#define CIFS_MOUNT_DIRECT_IO    8 /* do not write nor read through page cache */
#define CIFS_MOUNT_NO_XATTR     0x10  /* if set - disable xattr support       */
#define CIFS_MOUNT_MAP_SPECIAL_CHR 0x20 /* remap illegal chars in filenames   */
#define CIFS_MOUNT_POSIX_PATHS	0x40 /* Negotiate posix pathnames if possible. */
#define CIFS_MOUNT_POSIX_PATHS  0x40  /* Negotiate posix pathnames if possible*/
#define CIFS_MOUNT_UNX_EMUL     0x80  /* Network compat with SFUnix emulation */
#define CIFS_MOUNT_NO_BRL       0x100 /* No sending byte range locks to srv   */
#define CIFS_MOUNT_CIFS_ACL     0x200 /* send ACL requests to non-POSIX srv   */
#define CIFS_MOUNT_OVERR_UID    0x400 /* override uid returned from server    */
#define CIFS_MOUNT_OVERR_GID    0x800 /* override gid returned from server    */

struct cifs_sb_info {
	struct cifsTconInfo *tcon;	/* primary mount */
+2 −2
Original line number Diff line number Diff line
@@ -74,8 +74,8 @@ cifs_strtoUCS(__le16 * to, const char *from, int len,
		charlen = codepage->char2uni(from, len, &wchar_to[i]);
		if (charlen < 1) {
			cERROR(1,
			       ("cifs_strtoUCS: char2uni returned %d",
				charlen));
			       ("strtoUCS: char2uni of %d returned %d",
				(int)*from, charlen));
			/* A question mark */
			to[i] = cpu_to_le16(0x003f);
			charlen = 1;
Loading