X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_open.c;h=d09f640daa681c1f2075e4481a54ff6f1b1fc8dd;hb=bf56d63f06ccc77c8fad7e87d9082a6ee99b028c;hp=062de236b0b41c77674dd8fabc202e48e8482c50;hpb=896f660d222db6362e6171c68d33e8eecdc0d57a;p=rrdtool.git diff --git a/src/rrd_open.c b/src/rrd_open.c index 062de23..d09f640 100644 --- a/src/rrd_open.c +++ b/src/rrd_open.c @@ -259,12 +259,14 @@ rrd_file_t *rrd_open( #ifdef USE_MADVISE if (rdwr & RRD_COPY) { /* We will read everything in a moment (copying) */ - madvise(data, rrd_file->file_len, MADV_WILLNEED | MADV_SEQUENTIAL); + madvise(data, rrd_file->file_len, MADV_WILLNEED ); + madvise(data, rrd_file->file_len, MADV_SEQUENTIAL ); } else { /* We do not need to read anything in for the moment */ madvise(data, rrd_file->file_len, MADV_RANDOM); /* the stat_head will be needed soonish, so hint accordingly */ - madvise(data, sizeof(stat_head_t), MADV_WILLNEED | MADV_RANDOM); + madvise(data, sizeof(stat_head_t), MADV_WILLNEED); + madvise(data, sizeof(stat_head_t), MADV_RANDOM); } #endif @@ -675,6 +677,13 @@ ssize_t rrd_write( } +/* this is a leftover from the old days, it serves no purpose + and is therefore turned into a no-op */ +void rrd_flush( + rrd_file_t *rrd_file __attribute__((unused))) +{ +} + /* Initialize RRD header. */ void rrd_init(