[PATCH] FileJournal: stop using sync_file_range

2011-11-03 Thread Christoph Hellwig
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, bu

Re: [PATCH] FileJournal: stop using sync_file_range

2011-11-03 Thread Tommi Virtanen
On Thu, Nov 3, 2011 at 14:45, 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. One clarification h

Re: [PATCH] FileJournal: stop using sync_file_range

2011-11-03 Thread Christoph Hellwig
On Thu, Nov 03, 2011 at 03:48:15PM -0700, Tommi Virtanen wrote: > On Thu, Nov 3, 2011 at 14:45, Christoph Hellwig wrote: > One clarification here that came up in a conversation: the code quoted > was explicitly inside if (is_bdev), that is, it is only used when the > journal was on a raw block dev

Re: [PATCH] FileJournal: stop using sync_file_range

2011-11-04 Thread Sage Weil
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

Re: [PATCH] FileJournal: stop using sync_file_range

2011-11-05 Thread Christoph Hellwig
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_