diff options
-rw-r--r-- | db/extsort.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/db/extsort.cpp b/db/extsort.cpp index 2b1ac0b9db7..84e9bd4a295 100644 --- a/db/extsort.cpp +++ b/db/extsort.cpp @@ -233,7 +233,9 @@ namespace mongo { _file >= 0 ); #ifdef POSIX_FADV_DONTNEED - posix_fadvise(_file, 0, 0, POSIX_FADV_SEQUENTIAL | POSIX_FADV_DONTNEED); + int err = posix_fadvise(_file, 0, 0, POSIX_FADV_SEQUENTIAL ); + if ( err ) + log() << "posix_fadvise failed: " << err << endl; #endif _length = (unsigned long long)boost::filesystem::file_size( file ); |