Flexible I/O Tester development
 help / color / mirror / Atom feed
* Why does 'direct' influence 'fsync'?
@ 2013-01-25 11:42 Stefan Hajnoczi
  2013-01-26 16:28 ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Hajnoczi @ 2013-01-25 11:42 UTC (permalink / raw)
  To: fio; +Cc: Asias He

Is there a way to flush the disk write cache when O_DIRECT is in use?

It seems that direct=1 causes the fsync setting to be ignored.  Asias
writes:

> The O_DIRECT do affect the flush behaviour. e.g
> 
> guest$ fio --fsync=100 --direct=1
> No virtio_blk_handle_flush is observed on host side every 100 IOs
> 
> guest$ fio --fsync=100 --direct=0
> virtio_blk_handle_flush is observed on host side every 100 IOs

Am I missing a reason for this behavior?  To me it seems weird since you
could already use --fsync=0 --direct=1 if you want to guarantee that
fsync is not called.  I don't see a need to override the fsync setting.

Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-27  1:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25 11:42 Why does 'direct' influence 'fsync'? Stefan Hajnoczi
2013-01-26 16:28 ` Jens Axboe
2013-01-26 16:51   ` Stefan Hajnoczi
2013-01-27  1:37     ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox