summaryrefslogtreecommitdiff
path: root/util/log.h
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2012-03-01 13:43:27 +0100
committerAntonin Kral <a.kral@bobek.cz>2012-03-01 13:43:27 +0100
commit6d23757cc66fc1560c37ef7a0394d66ad0872563 (patch)
tree5889aba73d6f1850f2a156285ed3f9dd794aa6c4 /util/log.h
parent8da59cfea929c62213d7c87f17304e6f5c85230c (diff)
parentba59b00736b5b8dc0f0bd46397575aaf0cd4d44f (diff)
downloadmongodb-6d23757cc66fc1560c37ef7a0394d66ad0872563.tar.gz
Merge tag 'upstream/2.0.3'
Upstream version 2.0.3
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();
}