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

@ -74,7 +74,7 @@ impl RRDMap {
if let Some(rrd) = self.map.get(rel_path) {
let mut path = self.config.basedir.clone();
path.push(rel_path);
rrd.save(&path, self.config.file_options.clone())
rrd.save(&path, self.config.file_options.clone(), true)
} else {
bail!("rrd file {} not loaded", rel_path);
}