Skip to content

Commit

Permalink
FileJournal: Don't cache journal data if journal w/o directio mode
Browse files Browse the repository at this point in the history
Only read journal data in osd starting.So no need to keep journal
data in kernel cache/buffer.

Signed-off-by: Jianpeng Ma <[email protected]>
  • Loading branch information
majianpeng committed Dec 26, 2014
1 parent 3e6195b commit 45fb9a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/os/FileJournal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,10 @@ void FileJournal::do_write(bufferlist& bl)
::fsync(fd);
#else
::fdatasync(fd);
#endif
#ifdef HAVE_POSIX_FADVISE
if (g_conf->filestore_fadvise)
posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
#endif
}

Expand Down

0 comments on commit 45fb9a3

Please sign in to comment.