diff options
author | Steve French <sfrench@us.ibm.com> | 2008-10-23 00:42:37 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-10-23 00:42:37 -0400 |
commit | 84210e9120a8c01a14379ba1f9a9b0f963641d94 (patch) | |
tree | ed20b210bb554f283d8458ee6d146a5c4439e37f /fs/cifs/README | |
parent | a364bc0b37f14ffd66c1f982af42990a9d77fa43 (diff) |
[CIFS] improve setlease handling
fcntl(F_SETLEASE) currently is not exported by cifs (nor by local file
systems) so cifs grants leases based on how other local processes have
opened the file not by whether the file is cacheable (oplocked). This
adds the check to make sure that the file is cacheable on the client
before checking whether we can grant the lease locally
(generic_setlease). It also adds a mount option for cifs (locallease)
if the user wants to override this and try to grant leases even
if the server did not grant oplock.
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/README')
-rw-r--r-- | fs/cifs/README | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/cifs/README b/fs/cifs/README index cbe26fe40120..a439dc1739b3 100644 --- a/fs/cifs/README +++ b/fs/cifs/README | |||
@@ -491,6 +491,19 @@ A partial list of the supported mount options follows: | |||
491 | Note that this differs from the sign mount option in that it | 491 | Note that this differs from the sign mount option in that it |
492 | causes encryption of data sent over this mounted share but other | 492 | causes encryption of data sent over this mounted share but other |
493 | shares mounted to the same server are unaffected. | 493 | shares mounted to the same server are unaffected. |
494 | locallease This option is rarely needed. Fcntl F_SETLEASE is | ||
495 | used by some applications such as Samba and NFSv4 server to | ||
496 | check to see whether a file is cacheable. CIFS has no way | ||
497 | to explicitly request a lease, but can check whether a file | ||
498 | is cacheable (oplocked). Unfortunately, even if a file | ||
499 | is not oplocked, it could still be cacheable (ie cifs client | ||
500 | could grant fcntl leases if no other local processes are using | ||
501 | the file) for cases for example such as when the server does not | ||
502 | support oplocks and the user is sure that the only updates to | ||
503 | the file will be from this client. Specifying this mount option | ||
504 | will allow the cifs client to check for leases (only) locally | ||
505 | for files which are not oplocked instead of denying leases | ||
506 | in that case. (EXPERIMENTAL) | ||
494 | sec Security mode. Allowed values are: | 507 | sec Security mode. Allowed values are: |
495 | none attempt to connection as a null user (no name) | 508 | none attempt to connection as a null user (no name) |
496 | krb5 Use Kerberos version 5 authentication | 509 | krb5 Use Kerberos version 5 authentication |
@@ -641,6 +654,9 @@ requires enabling CONFIG_CIFS_EXPERIMENTAL | |||
641 | cifsacl support needed to retrieve approximated mode bits based on | 654 | cifsacl support needed to retrieve approximated mode bits based on |
642 | the contents on the CIFS ACL. | 655 | the contents on the CIFS ACL. |
643 | 656 | ||
657 | lease support: cifs will check the oplock state before calling into | ||
658 | the vfs to see if we can grant a lease on a file. | ||
659 | |||
644 | DNOTIFY fcntl: needed for support of directory change | 660 | DNOTIFY fcntl: needed for support of directory change |
645 | notification and perhaps later for file leases) | 661 | notification and perhaps later for file leases) |
646 | 662 | ||