mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
direct flag to File
This commit is contained in:
parent
4480e0f3af
commit
66ae70ace9
@ -140,9 +140,9 @@ namespace mongo {
|
||||
#define O_NOATIME 0
|
||||
#endif
|
||||
|
||||
void open(const char *filename, bool readOnly=false ) {
|
||||
void open(const char *filename, bool readOnly=false , bool direct=false) {
|
||||
fd = ::open(filename,
|
||||
O_CREAT | ( readOnly ? 0 : ( O_RDWR | O_NOATIME ) ) ,
|
||||
O_CREAT | ( readOnly ? 0 : ( O_RDWR | O_NOATIME ) ) | ( direct ? O_DIRECT : 0 ) ,
|
||||
S_IRUSR | S_IWUSR);
|
||||
if ( fd <= 0 ) {
|
||||
out() << "couldn't open " << filename << ' ' << errnoWithDescription() << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user