On Wed, Mar 14, 2012 at 2:58 PM, Sachin Prabhu <sprabhu@xxxxxxxxxx> wrote: > ----- Original Message ----- >> I don't mind reviewing this, but it does appear to change behaviour >> significantly from existing code. Does this fix a reported bug? >> >> The linux cifs kernel driver, like some other >> network clients, allows partial option matching to ease >> usability for users of other platforms (e.g. "pass" or >> "passwd" or "password" are intentionally all accepted >> since we match on the first four bytes of that keyword). >> Is there a way to get that to work with your patchset. >> I worry that some users will be confused that their >> mount options won't work if this is taken. >> > > The reason I was looking at this code was because I was helping Jeff include in the sloppy mount option for cifs. The current if/elseif block is difficult to read through. There are also hidden gotchas like ordering the if blocks correctly if in case a mount option is also a substring in a different mount option. The decision to use the standard token parser was simply for consistency and to make the code easier to understand. > > Multiple versions of mount options can be accepted for the same mount option. For example, in the patch sent earlier, for the password, we accept the following mount options to pass the password. > > > + { Opt_pass, "pass=%s" }, > + { Opt_pass, "password=%s" }, > > So the user can use pass or password and they will both be accepted as the mount option to set the password. > We can add more options if I have missed any. > > The only difference I see is that the options matching is case sensitive and therefore will reject upper case mount options. > > Also, in my opinion the number of mount options is large at the moment and we should consider deprecating a few of the mount options. We should have far fewer mount options with SMB2, so that will help the usability. With SMB2 there is far less need for the varoius mount options that deal with compatibility to broken old servers or to workaround protocol limitations, and certain other features in SMB2 would be enabled by default and no point in allowing them to be disabled unless we run into badly broken smb2 servers. -- Thanks, Steve -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html