Remove a compile-time optional selection of O_DIRECT (was never used)

The mmap() manpage tells us to avoid using O_DIRECT with mmap() - so
do so.
This commit is contained in:
nick
2014-02-24 13:47:29 +00:00
parent 8cf92af900
commit 97c8d7a358

View File

@@ -80,13 +80,8 @@ int open_and_mmap(const char* filename, int* out_fd, off64_t *out_size, void **o
{
off64_t size;
/* O_DIRECT seems to be intermittently supported. Leaving it as
* a compile-time option for now. */
#ifdef DIRECT_IO
*out_fd = open(filename, O_RDWR | O_DIRECT | O_SYNC );
#else
/* O_DIRECT should not be used with mmap() */
*out_fd = open(filename, O_RDWR | O_SYNC );
#endif
if (*out_fd < 1) {
warn("open(%s) failed: does it exist?", filename);