]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
only write cdp to disk if we are NOT in MMAP mode
authorTobias Oetiker <tobi@oetiker.ch>
Thu, 26 Feb 2015 07:14:07 +0000 (08:14 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Thu, 26 Feb 2015 07:14:07 +0000 (08:14 +0100)
src/rrd_hw.c

index 5509c8c8946f12fde0860772939421f86f9a4f35..944c8af53ffeb2f694e959008863f6d0f833bc85 100644 (file)
@@ -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 */