Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Managing oplocks

Setting a system-wide oplock  Top

There is a system-wide oplock setting on the filer. If you enable this oplock setting, you can enable or disable oplocks for individual qtrees.

To set the system-wide oplock setting, complete the following step.

Step

Action

1

Enter the following command:

options cifs.oplocks.enable [ on | off ]

Result

If the cifs.oplocks.enable option is set to On, the oplock setting per qtree takes effect. Otherwise, the oplocks for all qtrees are disabled regardless of the per-qtree oplock setting.

Setting an oplock for each qtree  Top

To enable or disable an oplock for an individual qtree, complete the following step.

Step

Action

1

Enter the following command:

qtree oplocks qtree_name [ enable | disable ]

qtree_name is the name of the qtree.

Result

If the cifs.oplocks.enable option is set to On, the qtree oplocks command for a qtree takes effect immediately. If the cifs.oplocks.enable option is Off, the qtree oplocks command does not take effect until the option is changed to On.

About the delay time for sending oplock breaks  Top

If a client that owns a file oplock sends a file open request, it is temporarily vulnerable to a "race condition" that can occur if the filer requests an oplock break. To prevent this condition, the filer delays sending an oplock break according to the delay time value (in milliseconds) specified by the cifs.oplocks.opendelta option. The default delay time is 8 milliseconds. This means that after the filer receives or responds to a request to open a file, the filer will make sure that 8 milliseconds have elapsed before sending an oplock break to that client.

Changing the delay time for sending oplock breaks  Top

You can change the default delay time for sending oplock breaks. For example, you might want to increase the delay time if you issue the cifs stat command and the output shows a non-zero value for the OpLkBkNoBreakAck field.

You may also see syslog messages similar to the following example and want to increase the delay time for sending oplock breaks.

Example

Mon Jan 21 15:18:38 PST [CIFSAdmin:warning]: oplock break timed out 
to station JOHN-PC for file \\FILER\share\subdir\file.txt

Changing the delay time for sending oplock breaks  Top

To change the delay time for sending oplock breaks, complete the following step.

Step

Action

1

Enter the following command:

options cifs.oplocks.opendelta time

time is the delay time in milliseconds.

Note
Setting the cifs.oplocks.opendelta option postpones oplock break requests to clients that have just opened files. Do not set this number higher than 35 without first consulting Network Appliance Technical Support.

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments