Re: ext2 + -osync: not as easy as it seems

From: Jan Kara
Date: Tue Jan 13 2009 - 09:30:46 EST


On Tue 13-01-09 09:03:47, Theodore Tso wrote:
> Adding a barrier shouldn't be that hard; just a matter adding a call
> to blkdev_issue_flush() to ext2_sync_file() before it returns.
Yes. Something like the patch below?

But it's not the whole story. Strictly speaking we should also call
blkdev_issue_flush() whenever we write things because of O_SYNC or
O_DIRSYNC flags. My patch does also that (it's based on the previous ext2
patch I've sent a while before).

Honza
--
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR

---