diff options
author | Jeff Layton <jlayton@redhat.com> | 2011-02-22 20:17:19 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-04-12 00:40:43 +0000 |
commit | bdf1b03e093bdbc571f404e751c7b0e2dca412ea (patch) | |
tree | 59034d81cfd01c14c21256229a355a06310ce6b5 /fs/cifs/file.c | |
parent | 7797069305d13252fd66cf722aa8f2cbeb3c95cd (diff) | |
download | op-kernel-dev-bdf1b03e093bdbc571f404e751c7b0e2dca412ea.zip op-kernel-dev-bdf1b03e093bdbc571f404e751c7b0e2dca412ea.tar.gz |
cifs: replace /proc/fs/cifs/Experimental with a module parm
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.
Reviewed-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 5ae061c..e2d7b6b 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -981,7 +981,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))) { @@ -1242,7 +1242,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); |