bool MongoMMF::create(string fname, unsigned long long& len, bool sequentialHint) { setPath(fname); _view_write = map(fname.c_str(), len, sequentialHint ? SEQUENTIAL : 0); if( cmdLine.dur && !testIntent && _view_write ) { dur::createdFile(fname, len); } return finishOpening(); }
bool MongoMMF::create(string fname, unsigned long long& len, bool sequentialHint) { setPath(fname); bool preExisting = MemoryMappedFile::exists(fname.c_str()); _view_write = map(fname.c_str(), len, sequentialHint ? SEQUENTIAL : 0); if( cmdLine.dur && _view_write && !preExisting ) { getDur().createdFile(fname, len); } return finishOpening(); }
bool MongoMMF::open(string fname, bool sequentialHint) { setPath(fname); _view_write = mapWithOptions(fname.c_str(), sequentialHint ? SEQUENTIAL : 0); return finishOpening(); }
bool DurableMappedFile::create(const std::string& fname, unsigned long long& len, bool sequentialHint) { LOG(3) << "mmf create " << fname << endl; setPath(fname); _view_write = map(fname.c_str(), len, sequentialHint ? SEQUENTIAL : 0); return finishOpening(); }
bool DurableMappedFile::open(const std::string& fname, bool sequentialHint) { LOG(3) << "mmf open " << fname << endl; setPath(fname); _view_write = mapWithOptions(fname.c_str(), sequentialHint ? SEQUENTIAL : 0); return finishOpening(); }