stop using O_DIRECT until the cach does async io

This commit is contained in:
Joe Thornber 2013-07-09 16:52:31 +01:00
parent 8b1a284ad4
commit 4deb1751a6

View File

@ -37,7 +37,9 @@ namespace {
using namespace std;
int const DEFAULT_MODE = 0666;
int const OPEN_FLAGS = O_DIRECT | O_SYNC;
// FIXME: these will slow it down until we start doing asyn io. O_DIRECT | O_SYNC;
int const OPEN_FLAGS = 0;
// FIXME: introduce a new exception for this, or at least lift this
// to exception.h
@ -341,7 +343,7 @@ namespace persistent_data {
unsigned max_concurrent_blocks,
typename block_io<BlockSize>::mode mode)
: io_(new block_io<BlockSize>(path, nr_blocks, mode)),
cache_(max(1024u, max_concurrent_blocks)),
cache_(max(64u, max_concurrent_blocks)),
tracker_(0, nr_blocks)
{
}