Permalink
Browse files

SERVER-6414 - fixed posix_fadvise call

  • Loading branch information...
1 parent 61d3a31 commit accb562a78780160e6844863193960b4c9ecc8ca @erh erh committed Jul 12, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 db/extsort.cpp
View
@@ -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 );

0 comments on commit accb562

Please sign in to comment.