[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090114165952.GH6222@mit.edu>
Date: Wed, 14 Jan 2009 11:59:52 -0500
From: Theodore Tso <tytso@....EDU>
To: Jan Kara <jack@...e.cz>
Cc: Fernando Luis Vázquez Cao
<fernando@....ntt.co.jp>, Alan Cox <alan@...rguk.ukuu.org.uk>,
Pavel Machek <pavel@...e.cz>,
kernel list <linux-kernel@...r.kernel.org>,
Jens Axboe <jens.axboe@...cle.com>, sandeen@...hat.com
Subject: Re: ext2 + -osync: not as easy as it seems
On Wed, Jan 14, 2009 at 03:37:56PM +0100, Jan Kara wrote:
> > Um, we have that already; the sync_inode() followed by
> > blkdev_issue_flush() is the path taken by fdatasync(), I do believe.
>
> Maybe ext4-patch-queue changes that area but in Linus's tree I see:
>
> if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
> goto out;
>
> So if we just overwrite some data, we send them to disk via fdatawrite()
> and then we quickly bail out from ext4_sync_file() without doing
> blkdev_issue_flush().
So you're thinking about fdatawrite() being called by some code path
other than ext4_sync_file() before we call fsync()? Yeah, that could
happen.... I think that will only happen if the file is opened
O_SYNC, but that raises another issue, which is that we're not forcing
a flush for writes when the file is opened O_SYNC.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists