diff options
author | Steve French <stfrench@microsoft.com> | 2023-08-31 06:48:41 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-08-31 18:06:36 +0300 |
commit | 238b351d0935df568ecb3dc5aef25971778f0f7c (patch) | |
tree | 1effd48a53e69677b6c7f1c70ea5d373c295a6b7 /fs/smb/client/cifsglob.h | |
parent | efc0b0bcffcba60d9c6301063d25a22a4744b499 (diff) | |
download | linux-238b351d0935df568ecb3dc5aef25971778f0f7c.tar.xz |
smb3: allow controlling length of time directory entries are cached with dir leases
Currently with directory leases we cache directory contents for a fixed period
of time (default 30 seconds) but for many workloads this is too short. Allow
configuring the maximum amount of time directory entries are cached when a
directory lease is held on that directory. Add module load parm "max_dir_cache"
For example to set the timeout to 10 minutes you would do:
echo 600 > /sys/module/cifs/parameters/dir_cache_timeout
or to disable caching directory contents:
echo 0 > /sys/module/cifs/parameters/dir_cache_timeout
Reviewed-by: Bharath SM <bharathsm@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/cifsglob.h')
-rw-r--r-- | fs/smb/client/cifsglob.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h index 259e231f8b4f..501426ee39e7 100644 --- a/fs/smb/client/cifsglob.h +++ b/fs/smb/client/cifsglob.h @@ -2016,6 +2016,7 @@ extern unsigned int CIFSMaxBufSize; /* max size not including hdr */ extern unsigned int cifs_min_rcv; /* min size of big ntwrk buf pool */ extern unsigned int cifs_min_small; /* min size of small buf pool */ extern unsigned int cifs_max_pending; /* MAX requests at once to server*/ +extern unsigned int dir_cache_timeout; /* max time for directory lease caching of dir */ extern bool disable_legacy_dialects; /* forbid vers=1.0 and vers=2.0 mounts */ extern atomic_t mid_count; |