Thread (6 messages) 6 messages, 2 authors, 2011-08-17

Re: [PATCH] ext4: fake direct I/O mode for data=journal

From: Ted Ts'o <tytso@mit.edu>
Date: 2011-08-15 18:03:14

On Mon, Aug 15, 2011 at 01:59:39PM +0200, Jan Kara wrote:
  Why have you chosen to set O_DSYNC?
O_DSYNC was the closest thing to O_DIRECT, in that writes get forced
to disk after the write finished.  I did this fix a test failure
caused by missing direct I/O writes with a buffered read.  OTOH, there
is a performance cost in doing this since it will force a journal
commit after every write.  That's probably not acceptable.  Hmph.
  Also what about reads? Mixing of buffered writes and direct IO reads will
not work because filemap_write_and_write() does not write data block to the
final location on disk but only to a journal.
Given that, we're probably better off forcing reads drop O_DIRECT as
well and drop O_DSYNC.

I'll change the patch and then give it a test.

     	    	      	       	       	 - Ted
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help