From 43e4eef77f33fcc5992bc2df7fb317afe59b190a Mon Sep 17 00:00:00 2001 From: Aaron Gao Date: Wed, 12 Jul 2017 18:00:45 -0700 Subject: [PATCH] remove unnecessary fadvise Summary: We has to remove this line because previously it is only called when use_os_buffer = false. But now we have direct io to replace it. Closes https://github.com/facebook/rocksdb/pull/2573 Differential Revision: D5412824 Pulled By: yiwu-arbug fbshipit-source-id: 81f3f0cdf94566bfc09ef2ff123e40cddbe36b36 --- env/io_posix.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/env/io_posix.cc b/env/io_posix.cc index c6e0f7590..b6364eb97 100644 --- a/env/io_posix.cc +++ b/env/io_posix.cc @@ -172,9 +172,6 @@ Status PosixSequentialFile::Read(size_t n, Slice* result, char* scratch) { s = IOError("While reading file sequentially", filename_, errno); } } - // we need to fadvise away the entire range of pages because - // we do not want readahead pages to be cached under buffered io - Fadvise(fd_, 0, 0, POSIX_FADV_DONTNEED); // free OS pages return s; }