proxmox-rrd: add option to avoid page cache for load/save

use fadvice(.., POSIX_FADV_DONTNEED) for RRD files. We read those files only once,
and always rewrite them.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
Dietmar Maurer
2021-10-19 09:46:05 +02:00
parent 98eb435d90
commit 934c8724e2
3 changed files with 62 additions and 10 deletions

View File

@ -53,7 +53,7 @@ fn load_callback(
dst: DST,
) -> RRD {
match RRD::load(path) {
match RRD::load(path, true) {
Ok(rrd) => rrd,
Err(err) => {
if err.kind() != std::io::ErrorKind::NotFound {