From: Tobias Oetiker Date: Thu, 26 Feb 2015 07:14:07 +0000 (+0100) Subject: only write cdp to disk if we are NOT in MMAP mode X-Git-Tag: v1.5.0~9^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0dbf0280fe53108b70a881f9217db8aae7c6c34;p=thirdparty%2Frrdtool-1.x.git only write cdp to disk if we are NOT in MMAP mode --- diff --git a/src/rrd_hw.c b/src/rrd_hw.c index 5509c8c8..944c8af5 100644 --- a/src/rrd_hw.c +++ b/src/rrd_hw.c @@ -277,6 +277,8 @@ int apply_smoother( (rrd->cdp_prep[offset]).scratch[CDP_hw_intercept].u_val += baseline[j]; } +/* if we are not running on mmap, lets write stuff to disk now */ +#ifndef MMAP /* flush cdp to disk */ if (rrd_seek(rrd_file, sizeof(stat_head_t) + rrd->stat_head->ds_cnt * sizeof(ds_def_t) + @@ -296,6 +298,8 @@ int apply_smoother( free(rrd_values); return -1; } +#endif + } /* endif CF_SEASONAL */