linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Theodore Tso <tytso@MIT.EDU>
Cc: Mark Busheman <markbusheman@gmail.com>, linux-ext4@vger.kernel.org
Subject: Re: Does ext4 send FUA to flush disk cache
Date: Mon, 11 Apr 2011 19:16:06 -0400	[thread overview]
Message-ID: <20110411231606.GA9406@infradead.org> (raw)
In-Reply-To: <DE099CBA-6478-4651-B3E5-F406D0C11C3D@mit.edu>

On Sun, Apr 10, 2011 at 08:17:58AM -0400, Theodore Tso wrote:
> 
> On Apr 8, 2011, at 6:02 PM, Mark Busheman wrote:
> 
> > I plan to use data=journal option with ext4. Would like to know if
> > ext4 send FUA (Forced Unit Access)
> > to flush the disk cache?
> 
> FUA doesn't cause a cache flush.   Ext4 does send cache flush commands, or barriers, to make sure the data written to disk is flushed all the way down to the disk platters on transaction commits.

Ext4 actually does send FUA requests, just grep for it.  With the default
libata config they will be turned into a regular write with a
post-flush, but if you enable the fua module option to the libata module
or use plain SCSI devices the FUA bit (if supported) gets sent all the
way down to the device.

The same also applies to btrfs, gfs2, nilfs2, xfs and if you enable the
non-default config ext3 and reiserfs.  Note that all the filesystem also
do regular flushes as pre-flushes during the journal commit or
equivalent and as part of the fsync implementation.

  parent reply	other threads:[~2011-04-11 23:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 22:02 Does ext4 send FUA to flush disk cache Mark Busheman
2011-04-10 12:17 ` Theodore Tso
2011-04-11 18:23   ` Mark Busheman
2011-04-11 18:44     ` Ted Ts'o
2011-04-11 21:18       ` Mark Busheman
2011-04-11 23:16   ` Christoph Hellwig [this message]
2011-04-12  2:14     ` Ted Ts'o
2011-04-12  4:40       ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110411231606.GA9406@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=markbusheman@gmail.com \
    --cc=tytso@MIT.EDU \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).