Re: fsync in ext3: A question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, 2004-02-13 at 21:47, Vijayan Prabhakaran wrote:

> I have a question on fsync() and ext3's journaling modes.
> 
> Assume that I call fsync(fd) on a file.
> 
> If that file is in 'data=journal' mode, would the fsync() return once the
> data gets safely into the journal ?

Should do, yes.  We don't record buffers as being on the inode dirty
list after a write() in data=journal mode, so fsync's dirty-buffer-flush
is a NOOP there.  We _do_ record the buffers as being on the transaction
list, so the transaction commit that fsync() does flushes to the journal
but not to backing store.  The eventual writeback still happens because
of the normal journal checkpointing rules: we don't allow a journal wrap
until the final writeback has happened.

> On the other hand, if that file is in 'data=writeback' mode, would the
> fsync() return only when the data gets safely into its actual location ?

Yes.

--Stephen



_______________________________________________

Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux