diff options
| author | Bharath SM <bharathsm@microsoft.com> | 2025-09-29 15:57:46 -0500 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2025-10-01 21:49:53 -0500 |
| commit | 63eb8bd6c81d84a23fdc18fffd604e3ea38bb96c (patch) | |
| tree | a9c7c02f27c2e621b34286cea8122284ad27ed08 /fs/smb/client/cifsfs.c | |
| parent | smb: client: add drop_dir_cache module parameter to invalidate cached dirents (diff) | |
| download | linux-63eb8bd6c81d84a23fdc18fffd604e3ea38bb96c.tar.gz linux-63eb8bd6c81d84a23fdc18fffd604e3ea38bb96c.zip | |
smb: client: account smb directory cache usage and per-tcon totals
Add lightweight accounting for directory lease cache usage
to aid debugging and limiting cache size in future. Track
per-directory entry/byte counts and maintain per-tcon
aggregates. Also expose the totals in /proc/fs/cifs/open_dirs.
Signed-off-by: Bharath SM <bharathsm@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/cifsfs.c')
| -rw-r--r-- | fs/smb/client/cifsfs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c index 9a83f528d39d..1775c2b7528f 100644 --- a/fs/smb/client/cifsfs.c +++ b/fs/smb/client/cifsfs.c @@ -121,6 +121,8 @@ unsigned int dir_cache_timeout = 30; module_param(dir_cache_timeout, uint, 0644); MODULE_PARM_DESC(dir_cache_timeout, "Number of seconds to cache directory contents for which we have a lease. Default: 30 " "Range: 1 to 65000 seconds, 0 to disable caching dir contents"); +/* Module-wide total cached dirents (in bytes) across all tcons */ +atomic64_t cifs_dircache_bytes_used = ATOMIC64_INIT(0); /* * Write-only module parameter to drop all cached directory entries across |
