]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
FileJournal: stop using sync_file_range
authorChristoph Hellwig <hch@infradead.org>
Thu, 3 Nov 2011 21:45:08 +0000 (17:45 -0400)
committerSage Weil <sage@newdream.net>
Sat, 5 Nov 2011 00:30:09 +0000 (17:30 -0700)
commitfb70f5cc5f1414b43ac61e725af764f7ec35c424
treefeb067d2779fb87255c770747da638991651c17b
parent585a46c585020749aa5776d388d68e1c6cdfada7
FileJournal: stop using sync_file_range

Using sync_file_range means that neither any required metadata gets commited,
nor the disk cache gets flushed.  Stop using it for the journal, and add
a comment on why a fsync_range system call would be helpful here.

Btw, why does the code use O_SYNC (and not even O_DSYNC!) if using direct
I/O, but fdatasync/fsync for buffered I/O?  Avoiding cache flushes and
metadata updates for every writes is just as important for direct I/O
as it is for buffered I/O.

Signed-off-by: Christoph Hellwig <hch@lst.de>
src/os/FileJournal.cc