From ba59b00736b5b8dc0f0bd46397575aaf0cd4d44f Mon Sep 17 00:00:00 2001 From: Antonin Kral Date: Thu, 1 Mar 2012 13:43:25 +0100 Subject: Imported Upstream version 2.0.3 --- util/log.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'util/log.h') 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(); } -- cgit v1.2.3