cifs: CONFIG_CIFS_EXPERIMENTAL removal (try #2)
Subsystems (2)
cover cifs: CONFIG_CIFS_EXPERIMENTAL removal (try #2)
This is the second version of this patchset. The changes since the last set are:
1) The patch to remove "/proc/fs/cifs/Experimental" did not remove the deregistration of that file, which caused a warning on rmmod.
2) The patch to remove "/proc/fs/cifs/Experimental" now adds a new module parameter so that people relying on it to allow zero-copy writes with signing have a way to continue using that.
A modified description of the set follows...
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 and replaces with with a bool module_parm that better describes what it does.
I've tested this by building cifs.ko with a variety of different Kconfig combinations and it seems to be OK. I've also played with the new module option and it seems to work properly.
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: replace /proc/fs/cifs/Experimental with a module parm
fs/cifs/Kconfig | 13 ------ fs/cifs/Makefile | 2 +- fs/cifs/README | 28 ------------- fs/cifs/cifs_debug.c | 43 -------------------- fs/cifs/cifsfs.c | 13 ++---- fs/cifs/cifsfs.h | 4 -- fs/cifs/cifsglob.h | 2 +- fs/cifs/cifsproto.h | 6 --- fs/cifs/cifssmb.c | 109 +------------------------------------------------- fs/cifs/connect.c | 4 -- fs/cifs/export.c | 67 ------------------------------ fs/cifs/file.c | 4 +- fs/cifs/sess.c | 103 +++++++++++++++++++++------------------------- 13 files changed, 56 insertions(+), 342 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): 1291820625-20907-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
A message that is not in the archive (sent off-list or not yet received): 1291820625-20907-2-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Suresh Jayaraman
Reviewed-byRe: [PATCH 1/4] cifs: remove export_ops code
Quoted 9 lines · Jeff Layton
Stubs for this code were added under the
CONFIG_CIFS_EXPERIMENTALtag in 2007, but were never completed. The upshot -- anyone who turns onCONFIG_CIFS_EXPERIMENTALgets 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.
Quoted 8 lines
Signed-off-by Jeff Layton <[email protected]>--- 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
Looks good to me.
Perhaps it would be a good idea to briefly document expected behavior, what is working, problems etc (in Samba wiki) so that someone can pick up this later?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 1/4] cifs: remove export_ops code
Quoted 19 lines · On Fri, 17 Dec 2010 20:58:42 +0530 Suresh Jayaraman…
Quoted 9 lines · Jeff Layton
Stubs for this code were added under the
CONFIG_CIFS_EXPERIMENTALtag in 2007, but were never completed. The upshot -- anyone who turns onCONFIG_CIFS_EXPERIMENTALgets 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.
Quoted 8 lines
Signed-off-by Jeff Layton <[email protected]>--- 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
Quoted 8 lines
Looks good to me.
Reviewed-by Suresh Jayaraman <[email protected]>Perhaps it would be a good idea to briefly document expected behavior, what is working, problems etc (in Samba wiki) so that someone can pick up this later?
Sounds reasonable.
Signature · 1 line
Jeff Layton <[email protected]>
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
A message that is not in the archive (sent off-list or not yet received): 1291820625-20907-3-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Suresh Jayaraman
Acked-byRe: [PATCH 2/4] cifs: move "ntlmssp" and "local_leases" options out of experimental code
Quoted 13 lines · Jeff Layton
I 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_leaseshas 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.
Quoted 6 lines
Signed-off-by Jeff Layton <[email protected]>--- fs/cifs/cifssmb.c | 5 +-- fs/cifs/connect.c | 4 -- fs/cifs/sess.c | 103 ++++++++++++++++++++++++----------------------------- 3 files changed, 48 insertions(+), 64 deletions(-)
Moving local_leases out sounds fine to me. While I agree that NTLMSSP is something everyone wants moving ahead, I'm not sure whether there are currently any known/open issues with specific Servers. Shirish?
Assuming there are none,
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 2/4] cifs: move "ntlmssp" and "local_leases" options out of experimental code
Quoted 21 lines · On Fri, 17 Dec 2010 20:58:56 +0530 Suresh Jayaraman…
Quoted 13 lines · Jeff Layton
I 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_leaseshas 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.
Quoted 6 lines
Signed-off-by Jeff Layton <[email protected]>--- fs/cifs/cifssmb.c | 5 +-- fs/cifs/connect.c | 4 -- fs/cifs/sess.c | 103 ++++++++++++++++++++++++----------------------------- 3 files changed, 48 insertions(+), 64 deletions(-)
Quoted 8 lines
Moving
local_leasesout sounds fine to me. While I agree that NTLMSSP is something everyone wants moving ahead, I'm not sure whether there are currently any known/open issues with specific Servers. Shirish?Assuming there are none,
Acked-by Suresh Jayaraman <[email protected]>
I think the NTLMSSP code is still a work in progress. There are still some bugs, but Shirish has really fixed and cleaned the code up recently. At this point, it works well enough that there's not much benefit to keeping it under an EXPERIMENTAL tag. That just makes it hard to integrate the code. It's messy and you have to deal with two different compile-time scenarios. I'd feel differently if were code that changed the "normal" functioning of CIFS, but since you have to use a mount option to turn this, I think we should just go for it.
Signature · 1 line
Jeff Layton <[email protected]>
Re: [PATCH 2/4] cifs: move "ntlmssp" and "local_leases" options out of experimental code
In reply to a message not in the archiveQuoted 21 lines · Suresh Jayaraman
Quoted 13 lines · Jeff Layton
I 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_leaseshas 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.
Quoted 6 lines
Signed-off-by Jeff Layton <[email protected]>---
fs/cifs/cifssmb.c | 5 +--
fs/cifs/connect.c | 4 --
fs/cifs/sess.c | 103 ++++++++++++++++++++++++-----------------------------3 files changed, 48 insertions(+), 64 deletions(-)
Quoted 6 lines
Moving
local_leasesout sounds fine to me. While I agree that NTLMSSP is something everyone wants moving ahead, I'm not sure whether there are currently any known/open issues with specific Servers. Shirish?Assuming there are none,
Yes. There was one issue in NTLMSSP and it has been fixed and the patch hasbeen posted, discussed, and ack'ed by Jeff Layton. I am not aware of any other issues at this time that break NTLMSSP authentication.
Only change we would want to see is reconciliation of flags sent by client in type 1 (negotiation) exchange packet and flags sent by server in type 2 (challenge) exchange packet and resultant flags and data according to those flags sent by client in type 3 (authentication) exchange packet.
Quoted 3 lines
Acked-by Suresh Jayaraman <[email protected]>
A message that is not in the archive (sent off-list or not yet received): AANLkTikcnfDE=TwQ4uHWxQPOkPvuJhAkROT6fuDksOSs-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Re: [PATCH 2/4] cifs: move "ntlmssp" and "local_leases" options out of experimental code
I would like this patch in soon - as was noted it simplifies build/testing to make these options non-experimental and we need to have at least an informal schedule for moving code out of experimental when no bugs found (over a few release cycles)
Shirish,
Can you point me to any NTLMSSP fixes you think are necessary?
Quoted 44 lines · Shirish Pargaonkar
Quoted 21 lines · Suresh Jayaraman
Quoted 13 lines · Jeff Layton
I 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_leaseshas 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.
Quoted 6 lines
Signed-off-by Jeff Layton <[email protected]>---
fs/cifs/cifssmb.c | 5 +--
fs/cifs/connect.c | 4 --
fs/cifs/sess.c | 103 ++++++++++++++++++++++++-----------------------------3 files changed, 48 insertions(+), 64 deletions(-)Quoted 6 lines
Moving
local_leasesout sounds fine to me. While I agree that NTLMSSP is something everyone wants moving ahead, I'm not sure whether there are currently any known/open issues with specific Servers. Shirish?Assuming there are none,
Yes. There was one issue in NTLMSSP and it has been fixed and the patch hasbeen posted, discussed, and ack'ed by Jeff Layton. I am not aware of any other issues at this time that break NTLMSSP authentication.
Only change we would want to see is reconciliation of flags sent by client in type 1 (negotiation) exchange packet and flags sent by server in type 2 (challenge) exchange packet and resultant flags and data according to those flags sent by client in type 3 (authentication) exchange packet.
Quoted 3 lines
Acked-by Suresh Jayaraman <[email protected]>
Signature · 3 lines
Thanks, Steve
A message that is not in the archive (sent off-list or not yet received): AANLkTikSOy-UHrOQxpACBrA9=5G+H8yDxVGDt_B443LJ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Re: [PATCH 2/4] cifs: move "ntlmssp" and "local_leases" options out of experimental code
Quoted 7 lines · Steve French
I would like this patch in soon - as was noted it simplifies build/testing to make these options non-experimental and we need to have at least an informal schedule for moving code out of experimental when no bugs found (over a few release cycles)
Shirish,
Can you point me to any NTLMSSP fixes you think are necessary?
Steve, this patch is ready to get merged. I think it would be helpful to have it in
as soon as possible, has been Ack'ed by Jeff Layton and tested by Robbert Kouprie
(and I did verify too that it works).
[PATCH] cifs: Support NTLM2 session security during NTLMSSP authentication [try #5]
Quoted 55 lines
Quoted 34 lines · Shirish Pargaonkar
Quoted 21 lines · Suresh Jayaraman
Quoted 13 lines · Jeff Layton
I 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_leaseshas 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.
Quoted 6 lines
Signed-off-by Jeff Layton <[email protected]>---
fs/cifs/cifssmb.c | 5 +--
fs/cifs/connect.c | 4 --
fs/cifs/sess.c | 103 ++++++++++++++++++++++++-----------------------------3 files changed, 48 insertions(+), 64 deletions(-)Quoted 6 lines
Moving
local_leasesout sounds fine to me. While I agree that NTLMSSP is something everyone wants moving ahead, I'm not sure whether there are currently any known/open issues with specific Servers. Shirish?Assuming there are none,
Yes. There was one issue in NTLMSSP and it has been fixed and the patch hasbeen posted, discussed, and ack'ed by Jeff Layton. I am not aware of any other issues at this time that break NTLMSSP authentication.
Quoted 10 lines
Only change we would want to see is reconciliation of flags sent by client in type 1 (negotiation) exchange packet and flags sent by server in type 2 (challenge) exchange packet and resultant flags and data according to those flags sent by client in type 3 (authentication) exchange packet.
Quoted 3 lines
Acked-by Suresh Jayaraman <[email protected]>--
Thanks,Steve
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
A message that is not in the archive (sent off-list or not yet received): 1291820625-20907-4-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Suresh Jayaraman
Reviewed-byRe: [PATCH 3/4] cifs: remove CIFSSMBQueryReparseLinkInfo and CONFIG_CIFS_EXPERIMENTAL
Quoted 5 lines · Jeff Layton
Nothing calls this function. Remove it.
With this, the last user of
CONFIG_CIFS_EXPERIMENTALhas been removed. Also, update the README.
Quoted 8 lines
Signed-off-by Jeff Layton <[email protected]>--- 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(-)
Looks good to me.
PATCH 4/4 cifs: replace /proc/fs/cifs/Experimental with a module parm
In reply to a message not in the archiveThis flag currently only affects whether we allow "zero-copy" writes with signing enabled. Typically we map pages in the pagecache directly into the write request. If signing is enabled however and the contents of the page change after the signature is calculated but before the write is sent then the signature will be wrong. Servers typically respond to this by closing down the socket.
Still, this can provide a performance benefit so the "Experimental" flag was overloaded to allow this. That's really not a good place for this option however since it's not clear what that flag does.
Move that flag instead to a new module parameter that better describes its purpose. That's also better since it can be set at module insertion time by configuring modprobe.d.
--- fs/cifs/README | 16 ---------------- fs/cifs/cifs_debug.c | 43 ------------------------------------------- fs/cifs/cifsfs.c | 6 ++++-- fs/cifs/cifsglob.h | 2 +- fs/cifs/file.c | 4 ++-- 5 files changed, 7 insertions(+), 64 deletions(-)
fs/cifs/README +0 -16
@@ -680,22 +680,6 @@ LinuxExtensionsEnabled If set to one then the client will attempt to support and want to map the uid and gid fields to values supplied at mount (rather than the actual values, then set this to zero. (default 1) -Experimental When set to 1 used to enable certain experimental - features (currently enables multipage writes - when signing is enabled, the multipage write - performance enhancement was disabled when - signing turned on in case buffer was modified - just before it was sent, also this flag will - be used to use the new experimental directory change - notification code). When set to 2 enables - an additional experimental feature, "raw ntlmssp" - session establishment support (which allows - specifying "sec=ntlmssp" on mount). The Linux cifs - module will use ntlmv2 authentication encapsulated - in "raw ntlmssp" (not using SPNEGO) when - "sec=ntlmssp" is specified on mount. - This support also requires building cifs with - the CONFIG_CIFS_EXPERIMENTAL configuration flag. These experimental features and tracing can be enabled by changing flags in /proc/fs/cifs (after the cifs module has been installed or built into the
fs/cifs/cifs_debug.c +0 -43
67 lines not on this page · raw message
fs/cifs/cifsfs.c +4 -2
@@ -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 ;
@@ -77,7 +76,10 @@ unsigned int cifs_max_pending = CIFS_MAX_REQ;module_param (cifs_max_pending, int,0 );MODULE_PARM_DESC (cifs_max_pending,"Simultaneous requests to server. " "Default: 50 Range: 2 to 256" ); - +bool sign_zero_copy = false; +module_param (sign_zero_copy, bool,0644 ); +MODULE_PARM_DESC (sign_zero_copy,"Don't copy pages on write with signing " +"enabled. Default: N" );extern mempool_t *cifs_sm_req_poolp;extern mempool_t *cifs_req_poolp;extern mempool_t *cifs_mid_poolp;
fs/cifs/cifsglob.h +1 -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 */
@@ -787,6 +786,7 @@ GLOBAL_EXTERN unsigned int CIFSMaxBufSize; /* max size not including hdr */ GLOBAL_EXTERN unsigned int cifs_min_rcv; /* min size of big ntwrk buf pool */ GLOBAL_EXTERN unsigned int cifs_min_small; /* min size of small buf pool */ GLOBAL_EXTERN unsigned int cifs_max_pending; /* MAX requests at once to server*/ +GLOBAL_EXTERN bool sign_zero_copy; /* don't copy written pages with signing */void cifs_oplock_break (struct work_struct *work);void cifs_oplock_break_get (struct cifsFileInfo *cfile);
fs/cifs/file.c +2 -2
@@ -1054,7 +1054,7 @@ static ssize_t cifs_write(struct cifsFileInfo *open_file,if (rc !=0 )break ; } -if (experimEnabled || (pTcon->ses->server && +if (sign_zero_copy || (pTcon->ses->server && ((pTcon->ses->server->secMode & (SECMODE_SIGN_REQUIRED |SECMODE_SIGN_ENABLED )) ==0 ))) {
@@ -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 (!sign_zero_copy && 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): 1291820625-20907-5-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Suresh Jayaraman
Reviewed-byRe: [PATCH 4/4] cifs: replace /proc/fs/cifs/Experimental with a module parm
Quoted 15 lines · Jeff Layton
This flag currently only affects whether we allow "zero-copy" writes with signing enabled. Typically we map pages in the pagecache directly into the write request. If signing is enabled however and the contents of the page change after the signature is calculated but before the write is sent then the signature will be wrong. Servers typically respond to this by closing down the socket.
Still, this can provide a performance benefit so the "Experimental" flag was overloaded to allow this. That's really not a good place for this option however since it's not clear what that flag does.
Move that flag instead to a new module parameter that better describes its purpose. That's also better since it can be set at module insertion time by configuring modprobe.d.
Quoted 9 lines
Signed-off-by Jeff Layton <[email protected]>--- fs/cifs/README | 16 ---------------- fs/cifs/cifs_debug.c | 43 ------------------------------------------- fs/cifs/cifsfs.c | 6 ++++-- fs/cifs/cifsglob.h | 2 +- fs/cifs/file.c | 4 ++-- 5 files changed, 7 insertions(+), 64 deletions(-)
Making it a module param sounds appropriate to me.
Quoted 10 lines · Jeff Layton
This is the second version of this patchset. The changes since the last set are:
1) The patch to remove "
/proc/fs/cifs/Experimental" did not remove the deregistration of that file, which caused a warning on rmmod.2) The patch to remove "
/proc/fs/cifs/Experimental" now adds a new module parameter so that people relying on it to allow zero-copy writes with signing have a way to continue using that.
Quoted 6 lines
A modified description of the set follows...
The
CONFIG_CIFS_EXPERIMENTALKConfig 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.
In general, I like the overall idea of removing heavily overloaded CIFS_EXPERIMENTAL config option. It's true that it was at times hard to narrow down suspect once this option is enabled.
However, the dependency of a few options on EXPERIMENTAL (fscache and acl) is not removed. CIFS_FSCACHE can be marked as not dependent on EXPERIMENTAL. Not sure about CIFS_ACL though.
Can you make this patchset or a subsequent patch accomodates this change too?
Signature · 1 line
Suresh Jayaraman
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 22 lines · On Fri, 17 Dec 2010 20:58:22 +0530 Suresh Jayaraman…
Quoted 10 lines · Jeff Layton
This is the second version of this patchset. The changes since the last set are:
1) The patch to remove "
/proc/fs/cifs/Experimental" did not remove the deregistration of that file, which caused a warning on rmmod.2) The patch to remove "
/proc/fs/cifs/Experimental" now adds a new module parameter so that people relying on it to allow zero-copy writes with signing have a way to continue using that.Quoted 6 lines
A modified description of the set follows...
The
CONFIG_CIFS_EXPERIMENTALKConfig 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.In general, I like the overall idea of removing heavily overloaded
CIFS_EXPERIMENTALconfig option. It's true that it was at times hard to narrow down suspect once this option is enabled.
Quoted 8 lines
However, the dependency of a few options on EXPERIMENTAL (fscache and acl) is not removed.
CIFS_FSCACHEcan be marked as not dependent on EXPERIMENTAL. Not sure aboutCIFS_ACLthough.Can you make this patchset or a subsequent patch accomodates this change too?
There's a difference between CONFIG_CIFS_EXPERIMENTAL and CONFIG_EXPERIMENTAL. Those options depend on the latter. I'm removing the former. I think it's still appropriate to mark these new features as EXPERIMENTAL and to leave them dependent on CONFIG_EXPERIMENTAL.
Note, that I don't necessarily think we must leave these features tagged CONFIG_EXPERIMENTAL just that if we want to remove those labels, we should do that in the context of a separate discussion...
Signature · 1 line
Jeff Layton <[email protected]>
A message that is not in the archive (sent off-list or not yet received): 20101217103717.22ce07b1-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org
Quoted 29 lines · Jeff Layton
Quoted 26 lines · On Fri, 17 Dec 2010 20:58:22 +0530 Suresh Jayaraman…
Quoted 10 lines · Jeff Layton
This is the second version of this patchset. The changes since the last set are:
1) The patch to remove "
/proc/fs/cifs/Experimental" did not remove the deregistration of that file, which caused a warning on rmmod.2) The patch to remove "
/proc/fs/cifs/Experimental" now adds a new module parameter so that people relying on it to allow zero-copy writes with signing have a way to continue using that.Quoted 6 lines
A modified description of the set follows...
The
CONFIG_CIFS_EXPERIMENTALKConfig 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.In general, I like the overall idea of removing heavily overloaded
CIFS_EXPERIMENTALconfig option. It's true that it was at times hard to narrow down suspect once this option is enabled.However, the dependency of a few options on EXPERIMENTAL (fscache and acl) is not removed.
CIFS_FSCACHEcan be marked as not dependent on EXPERIMENTAL. Not sure aboutCIFS_ACLthough.
Quoted 8 lines
Quoted 3 lines
Can you make this patchset or a subsequent patch accomodates this change too?
There's a difference between
CONFIG_CIFS_EXPERIMENTALandCONFIG_EXPERIMENTAL. Those options depend on the latter. I'm removing the former. I think it's still appropriate to mark these new features as EXPERIMENTAL and to leave them dependent onCONFIG_EXPERIMENTAL.
Doh, I missed it. Indeed they are different. Sorry about the noise.
Quoted 4 lines
Note, that I don't necessarily think we must leave these features tagged
CONFIG_EXPERIMENTALjust that if we want to remove those labels, we should do that in the context of a separate discussion...
Agreed.
Signature · 1 line
Suresh Jayaraman