cifs: CONFIG_CIFS_EXPERIMENTAL removal
Subsystems (2)
cover cifs: CONFIG_CIFS_EXPERIMENTAL removal
The CONFIG_CIFS_EXPERIMENTAL KConfig option is the sort of thing that gives distro packagers nightmares. The things that live under it are impossible to predict for someone who isn't following development upstream.
We usually want bleeding-edge distros like Fedora to turn on these sorts of bleeding edge features, but it's difficult for them to do so with any confidence because so much of the code under this option is just plain broken. If we have code that needs to be conditionally compiled in, then it generally ought to be given its own KConfig option.
This patchset eliminates the CONFIG_CIFS_EXPERIMENTAL Kconfig option. Code that currently resides under this option is either moved to being built in by default or is removed from the kernel altogether.
The last patch in the series also removes /proc/fs/cifs/Experimental -- a knob that's purpose has been unclear since I've been working on CIFS.
I've tested this by building cifs.ko with a variety of different Kconfig combinations and it seems to be OK.
I think this patchset is appropriate for 2.6.38, though I won't object if you want to merge it sooner.
Jeff Layton (4):
cifs: remove export_ops code
cifs: move "ntlmssp" and "local_leases" options out of experimental
code
cifs: remove CIFSSMBQueryReparseLinkInfo and CONFIG_CIFS_EXPERIMENTAL
cifs: remove /proc/fs/cifs/Experimental
fs/cifs/Kconfig | 13 ------ fs/cifs/Makefile | 2 +- fs/cifs/README | 12 ----- fs/cifs/cifs_debug.c | 42 ------------------- fs/cifs/cifsfs.c | 8 ---- fs/cifs/cifsfs.h | 4 -- fs/cifs/cifsglob.h | 1 - fs/cifs/cifsproto.h | 6 --- fs/cifs/cifssmb.c | 109 +------------------------------------------------- fs/cifs/connect.c | 4 -- fs/cifs/export.c | 67 ------------------------------ fs/cifs/file.c | 6 +- fs/cifs/sess.c | 103 +++++++++++++++++++++------------------------- 13 files changed, 52 insertions(+), 325 deletions(-) delete mode 100644 fs/cifs/export.c
Signature · 1 line
1.7.3.2
A message that is not in the archive (sent off-list or not yet received): 1291731835-1120-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
PATCH 1/4 cifs: remove export_ops code
Stubs for this code were added under the CONFIG_CIFS_EXPERIMENTAL tag in 2007, but were never completed. The upshot -- anyone who turns on CONFIG_CIFS_EXPERIMENTAL gets a filesystem that pretends to allow exporting via nfsd. Trying to actually use it will just get you an error once nfsd tries to walk into the directory.
Remove this code since it's unfinished. We can reintroduce it once someone spends time on it and makes it usable.
--- fs/cifs/Makefile | 2 +- fs/cifs/cifsfs.c | 7 ----- fs/cifs/cifsfs.h | 4 --- fs/cifs/export.c | 67 ------------------------------------------------------ 4 files changed, 1 insertions(+), 79 deletions(-) delete mode 100644 fs/cifs/export.c
fs/cifs/Makefile +1 -1
@@ -6,7 +6,7 @@ obj-$(CONFIG_CIFS) += cifs.o cifs-y := cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o inode.o \ link.o misc.o netmisc.o smbdes.o smbencrypt.o transport.o asn1.o \ md4.o md5.o cifs_unicode.o nterr.o xattr.o cifsencrypt.o \ - readdir.o ioctl.o sess.o export.o + readdir.o ioctl.o sess.o cifs-$(CONFIG_CIFS_ACL) += cifsacl.o
fs/cifs/cifsfs.c +0 -7
@@ -174,13 +174,6 @@ cifs_read_super(struct super_block *sb, void *data, goto out_no_root; } -#ifdef CONFIG_CIFS_EXPERIMENTAL -if (cifs_sb->mnt_cifs_flags &CIFS_MOUNT_SERVER_INUM ) { -cFYI (1 ,"export ops supported" ); - sb->s_export_op = &cifs_export_ops; - } -#endif /* EXPERIMENTAL */ -return 0 ; out_no_root:
fs/cifs/cifsfs.h +0 -4
@@ -108,9 +108,5 @@ extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t);extern ssize_t cifs_listxattr (struct dentry *,char *,size_t );extern long cifs_ioctl (struct file *filep,unsigned int cmd,unsigned long arg); -#ifdef CONFIG_CIFS_EXPERIMENTAL -extern const struct export_operations cifs_export_ops; -#endif /* EXPERIMENTAL */ -#define CIFS_VERSION "1.68"#endif /* _CIFSFS_H */
fs/cifs/export.c deleted +0 -67
67 lines not on this page · raw message
Signature · 1 line
1.7.3.2
PATCH 2/4 cifs: move "ntlmssp" and "local_leases" options out of experimental code
In reply to a message not in the archiveI see no real need to leave these sorts of options under an EXPERIMENTAL ifdef. Since you need a mount option to turn this code on, that only blows out the testing matrix.
local_leases has been under the EXPERIMENTAL tag for some time, but it's only the mount option that's under this label. Move it out from under this tag.
The NTLMSSP code is also under EXPERIMENTAL, but it needs a mount option to turn it on, and in the future any distro will reasonably want this enabled. Go ahead and move it out from under the EXPERIMENTAL tag.
--- fs/cifs/cifssmb.c | 5 +-- fs/cifs/connect.c | 4 -- fs/cifs/sess.c | 103 ++++++++++++++++++++++++----------------------------- 3 files changed, 48 insertions(+), 64 deletions(-)
fs/cifs/cifssmb.c +1 -4
@@ -401,15 +401,12 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)else if ((secFlags &CIFSSEC_AUTH_MASK ) ==CIFSSEC_MAY_KRB5 ) {cFYI (1 ,"Kerberos only mechanism, enable extended security" ); pSMB->hdr.Flags2 |=SMBFLG2_EXT_SEC ; - } -#ifdef CONFIG_CIFS_EXPERIMENTAL - else if ((secFlags & CIFSSEC_MUST_NTLMSSP) == CIFSSEC_MUST_NTLMSSP) + }else if ((secFlags &CIFSSEC_MUST_NTLMSSP ) ==CIFSSEC_MUST_NTLMSSP ) pSMB->hdr.Flags2 |=SMBFLG2_EXT_SEC ;else if ((secFlags &CIFSSEC_AUTH_MASK ) ==CIFSSEC_MAY_NTLMSSP ) {cFYI (1 ,"NTLMSSP only mechanism, enable extended security" ); pSMB->hdr.Flags2 |=SMBFLG2_EXT_SEC ; } -#endif count =0 ;for (i =0 ; i <CIFS_NUM_PROT ; i++) {
fs/cifs/connect.c +0 -4
@@ -985,13 +985,11 @@ cifs_parse_mount_options(char *options, const char *devname,return 1 ; }else if (strnicmp (value,"krb5" ,4 ) ==0 ) { vol->secFlg |=CIFSSEC_MAY_KRB5 ; -#ifdef CONFIG_CIFS_EXPERIMENTAL }else if (strnicmp (value,"ntlmsspi" ,8 ) ==0 ) { vol->secFlg |=CIFSSEC_MAY_NTLMSSP |CIFSSEC_MUST_SIGN ; }else if (strnicmp (value,"ntlmssp" ,7 ) ==0 ) { vol->secFlg |=CIFSSEC_MAY_NTLMSSP ; -#endif }else if (strnicmp (value,"ntlmv2i" ,7 ) ==0 ) { vol->secFlg |=CIFSSEC_MAY_NTLMV2 |CIFSSEC_MUST_SIGN ;
@@ -1342,10 +1340,8 @@ cifs_parse_mount_options(char *options, const char *devname, vol->no_psx_acl =0 ; }else if (strnicmp (data,"noacl" ,5 ) ==0 ) { vol->no_psx_acl =1 ; -#ifdef CONFIG_CIFS_EXPERIMENTAL }else if (strnicmp (data,"locallease" ,6 ) ==0 ) { vol->local_lease =1 ; -#endif }else if (strnicmp (data,"sign" ,4 ) ==0 ) { vol->secFlg |=CIFSSEC_MUST_SIGN ; }else if (strnicmp (data,"seal" ,4 ) ==0 ) {
fs/cifs/sess.c +47 -56
132 lines not on this page · raw message
Signature · 1 line
1.7.3.2
PATCH 3/4 cifs: remove CIFSSMBQueryReparseLinkInfo and CONFIG_CIFS_EXPERIMENTAL
In reply to a message not in the archiveNothing calls this function. Remove it.
With this, the last user of CONFIG_CIFS_EXPERIMENTAL has been removed. Also, update the README.
--- fs/cifs/Kconfig | 13 ------ fs/cifs/README | 12 ------ fs/cifs/cifsproto.h | 6 --- fs/cifs/cifssmb.c | 104 --------------------------------------------------- 4 files changed, 0 insertions(+), 135 deletions(-)
fs/cifs/Kconfig +0 -13
@@ -151,16 +151,3 @@ config CIFS_ACL Allows to fetch CIFS/NTFS ACL from the server. The DACL blob is handed over to the application/caller. -config CIFS_EXPERIMENTAL - bool "CIFS Experimental Features (EXPERIMENTAL)" - depends on CIFS && EXPERIMENTAL - help - Enables cifs features under testing. These features are - experimental and currently include DFS support and directory - change notification ie fcntl(F_DNOTIFY), as well as the upcall - mechanism which will be used for Kerberos session negotiation - and uid remapping. Some of these features also may depend on - setting a value of 1 to the pseudo-file /proc/fs/cifs/Experimental - (which is disabled by default). See the file fs/cifs/README - for more details. If unsure, say N. -
fs/cifs/README +0 -12
@@ -715,18 +715,6 @@ the start of smb requests and responses can be enabled via: echo 1 > /proc/fs/cifs/traceSMB -Two other experimental features are under development. To test these -requires enabling CONFIG_CIFS_EXPERIMENTAL - - cifsacl support needed to retrieve approximated mode bits based on - the contents on the CIFS ACL. - - lease support: cifs will check the oplock state before calling into - the vfs to see if we can grant a lease on a file. - - DNOTIFY fcntl: needed for support of directory change - notification and perhaps later for file leases) - Per share (per client mount) statistics are available in /proc/fs/cifs/Stats if the kernel was configured with cifs statistics enabled. The statistics represent the number of successful (ie non-zero return code from the server)
fs/cifs/cifsproto.h +0 -6
@@ -296,12 +296,6 @@ extern int CIFSSMBUnixQuerySymLink(const int xid,struct cifsTconInfo *tcon, const unsigned char *searchName, char **syminfo, const struct nls_table *nls_codepage); -extern int CIFSSMBQueryReparseLinkInfo (const int xid, -struct cifsTconInfo *tcon, -const unsigned char *searchName, -char *symlinkinfo,const int buflen,__u16 fid, -const struct nls_table *nls_codepage); - extern int CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, const char *fileName, const int disposition, const int access_flags, const int omode,
fs/cifs/cifssmb.c +0 -104
110 lines not on this page · raw message
Signature · 1 line
1.7.3.2
PATCH 4/4 cifs: remove /proc/fs/cifs/Experimental
In reply to a message not in the archiveThis flag only affects a couple of places in the write codepath, and it's not entirely clear to me what the purpose of it is. I've never known anyone (even developers) to use this knob, so let's remove it.
--- fs/cifs/cifs_debug.c | 42 ------------------------------------------ fs/cifs/cifsfs.c | 1 - fs/cifs/cifsglob.h | 1 - fs/cifs/file.c | 6 +++--- 4 files changed, 3 insertions(+), 47 deletions(-)
fs/cifs/cifs_debug.c +0 -42
@@ -425,7 +425,6 @@ static const struct file_operations cifs_lookup_cache_proc_fops;static const struct file_operations traceSMB_proc_fops;static const struct file_operations cifs_multiuser_mount_proc_fops;static const struct file_operations cifs_security_flags_proc_fops; -static const struct file_operations cifs_experimental_proc_fops;static const struct file_operations cifs_linux_ext_proc_fops;void
@@ -443,8 +442,6 @@ cifs_proc_init(void)proc_create ("cifsFYI" ,0 , proc_fs_cifs, &cifsFYI_proc_fops);proc_create ("traceSMB" ,0 , proc_fs_cifs, &traceSMB_proc_fops);proc_create ("OplockEnabled" ,0 , proc_fs_cifs, &cifs_oplock_proc_fops); -proc_create ("Experimental" ,0 , proc_fs_cifs, - &cifs_experimental_proc_fops);proc_create ("LinuxExtensionsEnabled" ,0 , proc_fs_cifs, &cifs_linux_ext_proc_fops); proc_create("MultiuserMount", 0, proc_fs_cifs,
@@ -552,45 +549,6 @@ static const struct file_operations cifs_oplock_proc_fops = { .write = cifs_oplock_proc_write, }; -static int cifs_experimental_proc_show (struct seq_file *m,void *v) -{ -seq_printf (m,"%d\n" , experimEnabled); -return 0 ; -} - -static int cifs_experimental_proc_open (struct inode *inode,struct file *file) -{ -return single_open (file, cifs_experimental_proc_show,NULL ); -} - -static ssize_t cifs_experimental_proc_write (struct file *file, -const char __user *buffer,size_t count,loff_t *ppos) -{ -char c; -int rc; - - rc =get_user (c, buffer); -if (rc) -return rc; -if (c =='0' || c =='n' || c =='N' ) - experimEnabled =0 ; -else if (c =='1' || c =='y' || c =='Y' ) - experimEnabled =1 ; -else if (c =='2' ) - experimEnabled =2 ; - -return count; -} - -static const struct file_operations cifs_experimental_proc_fops = { - .owner =THIS_MODULE , - .open = cifs_experimental_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .write = cifs_experimental_proc_write, -}; -static int cifs_linux_ext_proc_show (struct seq_file *m,void *v) {seq_printf (m,"%d\n" , linuxExtEnabled);
fs/cifs/cifsfs.c +0 -1
@@ -53,7 +53,6 @@ int cifsFYI = 0;int cifsERROR =1 ;int traceSMB =0 ;unsigned int oplockEnabled =1 ; -unsigned int experimEnabled =0 ;unsigned int linuxExtEnabled =1 ;unsigned int lookupCacheEnabled =1 ;unsigned int multiuser_mount =0 ;
fs/cifs/cifsglob.h +0 -1
@@ -777,7 +777,6 @@ GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessionshave the uid/password or Kerberos credential or equivalent for current user */ GLOBAL_EXTERN unsigned int oplockEnabled; -GLOBAL_EXTERN unsigned int experimEnabled; GLOBAL_EXTERN unsigned int lookupCacheEnabled; GLOBAL_EXTERN unsigned int global_secflags; /* if on, session setup sentwith more secure ntlmssp2 challenge/resp */
fs/cifs/file.c +3 -3
@@ -1054,10 +1054,10 @@ static ssize_t cifs_write(struct cifsFileInfo *open_file,if (rc !=0 )break ; } -if (experimEnabled || (pTcon->ses->server && +if (pTcon->ses->server && ((pTcon->ses->server->secMode & (SECMODE_SIGN_REQUIRED |SECMODE_SIGN_ENABLED )) - ==0 ))) { + ==0 )) {struct kvec iov[2 ];unsigned int len;
@@ -1319,7 +1319,7 @@ static int cifs_writepages(struct address_space *mapping, } tcon =tlink_tcon (open_file->tlink); -if (!experimEnabled && tcon->ses->server->secMode & +if (tcon->ses->server->secMode & (SECMODE_SIGN_REQUIRED |SECMODE_SIGN_ENABLED )) {cifsFileInfo_put (open_file);kfree (iov);
Signature · 1 line
1.7.3.2
A message that is not in the archive (sent off-list or not yet received): 1291731835-1120-5-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Re: [PATCH 4/4] cifs: remove /proc/fs/cifs/Experimental
Quoted 121 lines · On Tue, 7 Dec 2010 09:23:55 -0500 Jeff Layton…
This flag only affects a couple of places in the write codepath, and it's not entirely clear to me what the purpose of it is. I've never known anyone (even developers) to use this knob, so let's remove it.
Signed-off-by Jeff Layton <[email protected]>--- fs/cifs/cifs_debug.c | 42 ------------------------------------------ fs/cifs/cifsfs.c | 1 - fs/cifs/cifsglob.h | 1 - fs/cifs/file.c | 6 +++--- 4 files changed, 3 insertions(+), 47 deletions(-)fs/cifs/cifs_debug.c +0
-42@@ -425,7 +425,6 @@ static const struct file_operations cifs_lookup_cache_proc_fops;static const struct file_operations traceSMB_proc_fops;static const struct file_operations cifs_multiuser_mount_proc_fops;static const struct file_operations cifs_security_flags_proc_fops; -static const struct file_operations cifs_experimental_proc_fops;static const struct file_operations cifs_linux_ext_proc_fops;void @@ -443,8 +442,6 @@ cifs_proc_init(void)proc_create ("cifsFYI" ,0 , proc_fs_cifs, &cifsFYI_proc_fops);proc_create ("traceSMB" ,0 , proc_fs_cifs, &traceSMB_proc_fops);proc_create ("OplockEnabled" ,0 , proc_fs_cifs, &cifs_oplock_proc_fops); -proc_create ("Experimental" ,0 , proc_fs_cifs, - &cifs_experimental_proc_fops);proc_create ("LinuxExtensionsEnabled" ,0 , proc_fs_cifs, &cifs_linux_ext_proc_fops); proc_create("MultiuserMount", 0, proc_fs_cifs,@@ -552,45 +549,6 @@ static const struct file_operations cifs_oplock_proc_fops = { .write = cifs_oplock_proc_write, }; -static int cifs_experimental_proc_show (struct seq_file *m,void *v) -{ -seq_printf (m,"%d\n" , experimEnabled); -return 0 ; -} - -static int cifs_experimental_proc_open (struct inode *inode,struct file *file) -{ -return single_open (file, cifs_experimental_proc_show,NULL ); -} - -static ssize_t cifs_experimental_proc_write (struct file *file, -const char __user *buffer,size_t count,loff_t *ppos) -{ -char c; -int rc; - - rc =get_user (c, buffer); -if (rc) -return rc; -if (c =='0' || c =='n' || c =='N' ) - experimEnabled =0 ; -else if (c =='1' || c =='y' || c =='Y' ) - experimEnabled =1 ; -else if (c =='2' ) - experimEnabled =2 ; - -return count; -} - -static const struct file_operations cifs_experimental_proc_fops = { - .owner =THIS_MODULE , - .open = cifs_experimental_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .write = cifs_experimental_proc_write, -}; -static int cifs_linux_ext_proc_show (struct seq_file *m,void *v) {seq_printf (m,"%d\n" , linuxExtEnabled);fs/cifs/cifsfs.c +0
-1@@ -53,7 +53,6 @@ int cifsFYI = 0;int cifsERROR =1 ;int traceSMB =0 ;unsigned int oplockEnabled =1 ; -unsigned int experimEnabled =0 ;unsigned int linuxExtEnabled =1 ;unsigned int lookupCacheEnabled =1 ;unsigned int multiuser_mount =0 ;fs/cifs/cifsglob.h +0
-1@@ -777,7 +777,6 @@ GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessionshave the uid/password or Kerberos credential or equivalent for current user */ GLOBAL_EXTERN unsigned int oplockEnabled; -GLOBAL_EXTERN unsigned int experimEnabled; GLOBAL_EXTERN unsigned int lookupCacheEnabled; GLOBAL_EXTERN unsigned int global_secflags; /* if on, session setup sentwith more secure ntlmssp2 challenge/resp */ fs/cifs/file.c +2
-2@@ -1054,10 +1054,10 @@ static ssize_t cifs_write(struct cifsFileInfo *open_file,if (rc !=0 )break ; } -if (experimEnabled || (pTcon->ses->server && +if (pTcon->ses->server && ((pTcon->ses->server->secMode & (SECMODE_SIGN_REQUIRED |SECMODE_SIGN_ENABLED )) - ==0 ))) { + ==0 )) {struct kvec iov[2 ];unsigned int len;
fs/cifs/file.c static int cifs_writepages(struct address_space *mapping, · line 1325
Quoted 8 lines
fs/cifs/file.c +1
-1@@ -1319,7 +1319,7 @@ static int cifs_writepages(struct address_space *mapping, } tcon =tlink_tcon (open_file->tlink); -if (!experimEnabled && tcon->ses->server->secMode & +if (tcon->ses->server->secMode & (SECMODE_SIGN_REQUIRED |SECMODE_SIGN_ENABLED )) {cifsFileInfo_put (open_file);kfree (iov);
Just noticed that this misses removing the de-registration of "Experimental", so it'll need to be respun.
Signature · 1 line
Jeff Layton <[email protected]>
A message that is not in the archive (sent off-list or not yet received): 20101207111328.6647c36c-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org
Re: [PATCH 4/4] cifs: remove /proc/fs/cifs/Experimental
The issue of how to prevent a page from being modified as it is written out (due to signing in our case) has been discussed on lkml a
few times (e.g. T10 block devices). We should hold off on changing
this until we have a way of handling the case of: we calculate the
signature, but just before the page in the cache is remodified, we send it with the wrong signature ... obviously if we reissue the write we are fine (the data is fine) but there may be better ways to lock the page (and some suggestions have been made on lkml for similar sounding problems).
Quoted 139 lines · Jeff Layton
Quoted 121 lines · On Tue, 7 Dec 2010 09:23:55 -0500 Jeff Layton…
This flag only affects a couple of places in the write codepath, and it's not entirely clear to me what the purpose of it is. I've never known anyone (even developers) to use this knob, so let's remove it.
Signed-off-by Jeff Layton <[email protected]>---
fs/cifs/cifs_debug.c | 42 ------------------------------------------fs/cifs/cifsfs.c| 1 -
fs/cifs/cifsglob.h | 1 -
fs/cifs/file.c | 6 +++---4 files changed, 3 insertions(+), 47 deletions(-)fs/cifs/cifs_debug.c +0
-1@@ -425,7 +425,6 @@ static const struct file_operations cifs_lookup_cache_proc_fops; static const struct file_operations traceSMB_proc_fops; static const struct file_operations cifs_multiuser_mount_proc_fops; static const struct file_operations cifs_security_flags_proc_fops; -static const struct file_operations cifs_experimental_proc_fops; static const struct file_operations cifs_linux_ext_proc_fops;void
fs/cifs/cifs_debug.c +0
-41@@ -443,8 +442,6 @@ cifs_proc_init(void) proc_create("cifsFYI", 0, proc_fs_cifs, &cifsFYI_proc_fops); proc_create("traceSMB", 0, proc_fs_cifs, &traceSMB_proc_fops); proc_create("OplockEnabled", 0, proc_fs_cifs, &cifs_oplock_proc_fops); - proc_create("Experimental", 0, proc_fs_cifs, - &cifs_experimental_proc_fops); proc_create("LinuxExtensionsEnabled", 0, proc_fs_cifs, &cifs_linux_ext_proc_fops); proc_create("MultiuserMount", 0, proc_fs_cifs,@@ -552,45 +549,6 @@ static const struct file_operations cifs_oplock_proc_fops = { .write = cifs_oplock_proc_write, }; -static int cifs_experimental_proc_show (struct seq_file *m,void *v) -{ - seq_printf(m, "%d\n", experimEnabled); - return 0; -} - -static int cifs_experimental_proc_open (struct inode *inode,struct file *file) -{ - return single_open(file, cifs_experimental_proc_show, NULL); -} - -static ssize_t cifs_experimental_proc_write (struct file *file, - const char __user *buffer, size_t count, loff_t *ppos) -{ - char c; - int rc; - - rc = get_user(c, buffer); - if (rc) - return rc; - if (c == '0' || c == 'n' || c == 'N') - experimEnabled = 0; - else if (c == '1' || c == 'y' || c == 'Y') - experimEnabled = 1; - else if (c == '2') - experimEnabled = 2; - - return count; -} - -static const struct file_operations cifs_experimental_proc_fops = { - .owner = THIS_MODULE, - .open = cifs_experimental_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .write = cifs_experimental_proc_write, -}; - static int cifs_linux_ext_proc_show(struct seq_file *m, void *v) { seq_printf(m, "%d\n", linuxExtEnabled);fs/cifs/cifsfs.c +0
-1@@ -53,7 +53,6 @@ int cifsFYI = 0; int cifsERROR = 1; int traceSMB = 0; unsigned int oplockEnabled = 1; -unsigned int experimEnabled =0 ; unsigned int linuxExtEnabled = 1; unsigned int lookupCacheEnabled = 1; unsigned int multiuser_mount = 0;fs/cifs/cifsglob.h +0
-0@@ -777,7 +777,6 @@ GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessionshave the uid/password or Kerberos credential or equivalent for current user */
GLOBAL_EXTERNunsigned int oplockEnabled;
-GLOBAL_EXTERN unsigned int experimEnabled;
GLOBAL_EXTERN unsigned int lookupCacheEnabled;
GLOBAL_EXTERN unsigned intglobal_secflags; /* if on, session setup sent with more secure ntlmssp2 challenge/resp */fs/cifs/file.c +1
-1@@ -1054,10 +1054,10 @@ static ssize_t cifs_write(struct cifsFileInfo *open_file, if (rc != 0) break; } - if (experimEnabled || (pTcon->ses->server && + if (pTcon->ses->server &&((
pTcon->ses->server->secMode& (SECMODE_SIGN_REQUIRED|SECMODE_SIGN_ENABLED))
- == 0))) {
+ == 0)) {
struct kvec iov[2];
unsigned int len;fs/cifs/file.c static int cifs_writepages(struct address_space *mapping, · line 1325
Quoted 8 lines
fs/cifs/file.c +1
-1@@ -1319,7 +1319,7 @@ static int cifs_writepages(struct address_space *mapping, } tcon = tlink_tcon(open_file->tlink); - if (!experimEnabled && tcon->ses->server->secMode & + if (tcon->ses->server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { cifsFileInfo_put(open_file); kfree(iov);Just noticed that this misses removing the de-registration of "Experimental", so it'll need to be respun.
--
Jeff Layton <[email protected]>
Signature · 3 lines
Thanks, Steve
A message that is not in the archive (sent off-list or not yet received): AANLkTi=_5VYCXpd+WfwcKq50=kN3GRaGVgjfkReM9Ye0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Re: [PATCH 4/4] cifs: remove /proc/fs/cifs/Experimental
Quoted 10 lines · On Tue, 7 Dec 2010 10:21:11 -0600 Steve French…
The issue of how to prevent a page from being modified as it is written out (due to signing in our case) has been discussed on lkml a
few times (e.g. T10 block devices). We should hold off on changing
this until we have a way of handling the case of: we calculate the
signature, but just before the page in the cache is remodified, we send it with the wrong signature ... obviously if we reissue the write we are fine (the data is fine) but there may be better ways to lock the page (and some suggestions have been made on lkml for similar sounding problems).
This behavior has been "Experimental" for years. At what point do we remove this kludge? Who in their right mind is going to turn on a switch called "Experimental" to enable this? As a user, I'd certainly be reticent to do so. It's not clear what turning on "Experimental" would give me.
If you think this behavior deserves to be switchable then let's put a real usable switch on it. I don't think it ought to be hidden as /proc/fs/cifs/Experimental. Perhaps a module parameter for this would be more appropriate?
If so what would you name such a switch?
Quoted 143 lines · Jeff Layton
Quoted 139 lines
Quoted 121 lines · On Tue, 7 Dec 2010 09:23:55 -0500 Jeff Layton…
This flag only affects a couple of places in the write codepath, and it's not entirely clear to me what the purpose of it is. I've never known anyone (even developers) to use this knob, so let's remove it.
Signed-off-by Jeff Layton <[email protected]>---
fs/cifs/cifs_debug.c | 42 ------------------------------------------fs/cifs/cifsfs.c| 1 -
fs/cifs/cifsglob.h | 1 -
fs/cifs/file.c | 6 +++---4 files changed, 3 insertions(+), 47 deletions(-)fs/cifs/cifs_debug.c +0
-1@@ -425,7 +425,6 @@ static const struct file_operations cifs_lookup_cache_proc_fops; static const struct file_operations traceSMB_proc_fops; static const struct file_operations cifs_multiuser_mount_proc_fops; static const struct file_operations cifs_security_flags_proc_fops; -static const struct file_operations cifs_experimental_proc_fops; static const struct file_operations cifs_linux_ext_proc_fops;void
fs/cifs/cifs_debug.c +0
-41@@ -443,8 +442,6 @@ cifs_proc_init(void) proc_create("cifsFYI", 0, proc_fs_cifs, &cifsFYI_proc_fops); proc_create("traceSMB", 0, proc_fs_cifs, &traceSMB_proc_fops); proc_create("OplockEnabled", 0, proc_fs_cifs, &cifs_oplock_proc_fops); - proc_create("Experimental", 0, proc_fs_cifs, - &cifs_experimental_proc_fops); proc_create("LinuxExtensionsEnabled", 0, proc_fs_cifs, &cifs_linux_ext_proc_fops); proc_create("MultiuserMount", 0, proc_fs_cifs,@@ -552,45 +549,6 @@ static const struct file_operations cifs_oplock_proc_fops = { .write = cifs_oplock_proc_write, }; -static int cifs_experimental_proc_show (struct seq_file *m,void *v) -{ - seq_printf(m, "%d\n", experimEnabled); - return 0; -} - -static int cifs_experimental_proc_open (struct inode *inode,struct file *file) -{ - return single_open(file, cifs_experimental_proc_show, NULL); -} - -static ssize_t cifs_experimental_proc_write (struct file *file, - const char __user *buffer, size_t count, loff_t *ppos) -{ - char c; - int rc; - - rc = get_user(c, buffer); - if (rc) - return rc; - if (c == '0' || c == 'n' || c == 'N') - experimEnabled = 0; - else if (c == '1' || c == 'y' || c == 'Y') - experimEnabled = 1; - else if (c == '2') - experimEnabled = 2; - - return count; -} - -static const struct file_operations cifs_experimental_proc_fops = { - .owner = THIS_MODULE, - .open = cifs_experimental_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .write = cifs_experimental_proc_write, -}; - static int cifs_linux_ext_proc_show(struct seq_file *m, void *v) { seq_printf(m, "%d\n", linuxExtEnabled);fs/cifs/cifsfs.c +0
-1@@ -53,7 +53,6 @@ int cifsFYI = 0; int cifsERROR = 1; int traceSMB = 0; unsigned int oplockEnabled = 1; -unsigned int experimEnabled =0 ; unsigned int linuxExtEnabled = 1; unsigned int lookupCacheEnabled = 1; unsigned int multiuser_mount = 0;fs/cifs/cifsglob.h +0
-0@@ -777,7 +777,6 @@ GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessionshave the uid/password or Kerberos credential or equivalent for current user */
GLOBAL_EXTERNunsigned int oplockEnabled;
-GLOBAL_EXTERN unsigned int experimEnabled;
GLOBAL_EXTERN unsigned int lookupCacheEnabled;
GLOBAL_EXTERN unsigned intglobal_secflags; /* if on, session setup sent with more secure ntlmssp2 challenge/resp */fs/cifs/file.c +1
-1@@ -1054,10 +1054,10 @@ static ssize_t cifs_write(struct cifsFileInfo *open_file, if (rc != 0) break; } - if (experimEnabled || (pTcon->ses->server && + if (pTcon->ses->server &&((
pTcon->ses->server->secMode& (SECMODE_SIGN_REQUIRED|SECMODE_SIGN_ENABLED))
- == 0))) {
+ == 0)) {
struct kvec iov[2];
unsigned int len;fs/cifs/file.c static int cifs_writepages(struct address_space *mapping, · line 1325
Quoted 8 lines
fs/cifs/file.c +1
-1@@ -1319,7 +1319,7 @@ static int cifs_writepages(struct address_space *mapping, } tcon = tlink_tcon(open_file->tlink); - if (!experimEnabled && tcon->ses->server->secMode & + if (tcon->ses->server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { cifsFileInfo_put(open_file); kfree(iov);Just noticed that this misses removing the de-registration of "Experimental", so it'll need to be respun.
--
Jeff Layton <[email protected]>
Signature · 1 line
Jeff Layton <[email protected]>
A message that is not in the archive (sent off-list or not yet received): 20101207141059.0ddc6c7d-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org
Re: [PATCH 4/4] cifs: remove /proc/fs/cifs/Experimental
Quoted 14 lines · Jeff Layton
Quoted 10 lines · On Tue, 7 Dec 2010 10:21:11 -0600 Steve French…
The issue of how to prevent a page from being modified as it is written out (due to signing in our case) has been discussed on lkml a few times (e.g. T10 block devices). We should hold off on changing this until we have a way of handling the case of: we calculate the signature, but just before the page in the cache is remodified, we send it with the wrong signature ... obviously if we reissue the write we are fine (the data is fine) but there may be better ways to lock the page (and some suggestions have been made on lkml for similar sounding problems).
Quoted 5 lines
This behavior has been "Experimental" for years. At what point do we remove this kludge? Who in their right mind is going to turn on a switch called "Experimental" to enable this? As a user, I'd certainly be reticent to do so. It's not clear what turning on "Experimental" would give me.
20%+ better write performance
Quoted 4 lines
If you think this behavior deserves to be switchable then let's put a real usable switch on it. I don't think it ought to be hidden as
/proc/fs/cifs/Experimental. Perhaps a module parameter for this would be more appropriate?
Probably best to work through how to fix the general issue on fsevel (ie how to write a presumably unstable page from the cache out)
Signature · 3 lines
Thanks, Steve
A message that is not in the archive (sent off-list or not yet received): AANLkTimUKtFdX4fYtVHQPp0K3KrAhi8xG=YXHT9199Gj-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Re: [PATCH 4/4] cifs: remove /proc/fs/cifs/Experimental
Quoted 23 lines · On Tue, 7 Dec 2010 14:31:25 -0600 Steve French…
Quoted 14 lines · Jeff Layton
Quoted 10 lines · On Tue, 7 Dec 2010 10:21:11 -0600 Steve French…
The issue of how to prevent a page from being modified as it is written out (due to signing in our case) has been discussed on lkml a few times (e.g. T10 block devices). We should hold off on changing this until we have a way of handling the case of: we calculate the signature, but just before the page in the cache is remodified, we send it with the wrong signature ... obviously if we reissue the write we are fine (the data is fine) but there may be better ways to lock the page (and some suggestions have been made on lkml for similar sounding problems).
Quoted 5 lines
This behavior has been "Experimental" for years. At what point do we remove this kludge? Who in their right mind is going to turn on a switch called "Experimental" to enable this? As a user, I'd certainly be reticent to do so. It's not clear what turning on "Experimental" would give me.
20%+ better write performance
Quoted 10 lines
Quoted 4 lines
If you think this behavior deserves to be switchable then let's put a real usable switch on it. I don't think it ought to be hidden as
/proc/fs/cifs/Experimental. Perhaps a module parameter for this would be more appropriate?Probably best to work through how to fix the general issue on fsevel (ie how to write a presumably unstable page from the cache out)
Obviously there needs to be some sort of endgame for this code. It's not healthy to keep this under "Experimental" for years on end. That said, I don't really want to tackle that project at the moment.
I am however interested in moving this code out from under this "Experimental" procfile. Would you be amenable to a module option for this? If so, how would you describe this knob? What name should it have?
The main reason I mention module option is that it's now very helpful to have this sort of knob based on a file under /proc/fs/cifs. It can't be set at boot time without a special script.
Signature · 1 line
Jeff Layton <[email protected]>