summaryrefslogtreecommitdiff
path: root/util/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/log.h')
-rw-r--r--util/log.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/log.h b/util/log.h
index d5c7e55..660bfbe 100644
--- a/util/log.h
+++ b/util/log.h
@@ -507,6 +507,12 @@ namespace mongo {
int x = errno;
cout << "Failed to write to logfile: " << errnoWithDescription(x) << ": " << out << endl;
}
+
+#ifdef POSIX_FADV_DONTNEED
+ // This only applies to pages that have already been flushed
+ RARELY posix_fadvise(fileno(logfile), 0, 0, POSIX_FADV_DONTNEED);
+#endif
+
}
_init();
}