8f23cae1c0
The vfs-cache-max-size parameter is probably confusing to many users. The cache cleaner checks cache size periodically at the --vfs-cache-poll-interval (default 60 seconds) interval and remove cache items in the following order. (1) cache items that are not in use and with age > vfs-cache-max-age (2) if the cache space used at this time still is larger than vfs-cache-max-size, the cleaner continues to remove cache items that are not in use. The cache cleaning process does not remove cache items that are currently in use. If the total space consumed by in-use cache items exceeds vfs-cache-max-size, the periodical cache cleaner thread does not do anything further and leaves the in-use cache items alone with a total space larger than vfs-cache-max-size. A cache reset feature was introduced in 1.53 which resets in-use (but not dirty, i.e., not being updated) cache items when additional cache data incurs an ENOSPC error. But this code was not activated in the periodical cache cleaning thread. This patch adds the cache reset step in the cache cleaner thread during cache poll to reset cache items until the total size of the remaining cache items is below vfs-cache-max-size. |
||
---|---|---|
.. | ||
test_vfs | ||
vfscache | ||
vfscommon | ||
vfsflags | ||
vfstest | ||
dir.go | ||
dir_handle.go | ||
dir_handle_test.go | ||
dir_test.go | ||
errors.go | ||
errors_test.go | ||
file.go | ||
file_test.go | ||
help.go | ||
make_open_tests.go | ||
open_test.go | ||
rc.go | ||
rc_test.go | ||
read.go | ||
read_test.go | ||
read_write.go | ||
read_write_test.go | ||
vfs.go | ||
vfs_case_test.go | ||
vfs_test.go | ||
vfstest_test.go | ||
vstate_string.go | ||
write.go | ||
write_test.go |