From 4a3f3aad9e917798852c60342ef0778dc098d491 Mon Sep 17 00:00:00 2001 From: oetiker Date: Wed, 30 May 2007 11:26:50 +0000 Subject: [PATCH] dropping cache after update does not help (in this implementation) git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@1091 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_update.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/program/src/rrd_update.c b/program/src/rrd_update.c index ed79a6a1..7a73fdfa 100644 --- a/program/src/rrd_update.c +++ b/program/src/rrd_update.c @@ -1404,20 +1404,6 @@ _rrd_update(const char *filename, const char *tmplt, int argc, const char **argv return(-1); } -#ifdef HAVE_POSIX_FADVISExxx - - /* with update we have write ops, so they will probably not be done by now, this means - the buffers will not get freed. But calling this for the whole file - header - will let the data off the hook as soon as it is written when if it is from a previous - update cycle. Calling fdsync to force things is much too hard here. */ - - if (0 != posix_fadvise(fileno(rrd_file), rra_begin, 0, POSIX_FADV_DONTNEED)) { - rrd_set_error("setting POSIX_FADV_DONTNEED on '%s': %s",filename, rrd_strerror(errno)); - fclose(rrd_file); - return(-1); - } -#endif - /* OK now close the files and free the memory */ if(fclose(rrd_file) != 0){ rrd_set_error("closing rrd"); @@ -1455,14 +1441,6 @@ _rrd_update(const char *filename, const char *tmplt, int argc, const char **argv rra_start += rrd.rra_def[i].row_cnt *rrd.stat_head->ds_cnt*sizeof(rrd_value_t); } -#ifdef HAVE_POSIX_FADVISExxx - /* same procedure as above ... */ - if (0 != posix_fadvise(fileno(rrd_file), rra_begin, 0, POSIX_FADV_DONTNEED)) { - rrd_set_error("setting POSIX_FADV_DONTNEED on '%s': %s",filename, rrd_strerror(errno)); - fclose(rrd_file); - return(-1); - } -#endif fclose(rrd_file); } rrd_free(&rrd); -- 2.30.2