On Fri, Nov 04, 2011 at 05:29:04PM -0700, Sage Weil wrote: > On Thu, 3 Nov 2011, Christoph Hellwig wrote: > > 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. > > Sigh... doesn't that mean that sync_file_range is almost completely > useless? > > (Okay, not completely useless; we use it in FileStore.cc to push data to > disk quickly so that the eventual sync(2) is faster.) Yeah, you found the rare use case for it. > > 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. > > Good call.. looks like I added it in 2010-02 but I couldn't tell you why. I'm going to look into that once I have a real test setup. There's a few other I/O related bits I want to investigate, too. -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html