linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Daniel Pocock <daniel@pocock.com.au>
Cc: linux-ext4@vger.kernel.org
Subject: Re: ext4 barrier on SCSI vs SATA?
Date: Wed, 9 May 2012 21:50:56 +0200	[thread overview]
Message-ID: <20120509195056.GH5092@quack.suse.cz> (raw)
In-Reply-To: <4FA7A584.5060902@pocock.com.au>

On Mon 07-05-12 10:35:48, Daniel Pocock wrote:
> 
> 
> I understand that for barriers to work, the fs needs to be able to tell
> the drive when to move data from hardware cache to the platter.
> 
> I notice various pages mention the SYNCHRONIZE CACHE command (SCSI) and
> the FLUSH_CACHE_EXT command (ATA) as if they are equivalent.
> 
> Looking more closely, I found the SYNCHRONIZE CACHE supports a block
> range, whereas it appears that FLUSH_CACHE_EXT always flushes the entire
> cache (maybe 32MB or 64MB on a SATA drive)
> 
> Does ext4 always flush all of the cache contents?  Or if the system is
> SCSI, does it only selectively flush the blocks that must be flushed to
> maintain coherency?
  We always flush the complete cache. Actually, there's no interface for
filesystem to tell lower layers that only some blocks should be flushed
AFAIK. And even if we could, journaling is designed so that we need to
flush caches for most of blocks because usually data blocks need to be on
stable storage when transaction commits.

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  reply	other threads:[~2012-05-09 19:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 10:35 ext4 barrier on SCSI vs SATA? Daniel Pocock
2012-05-09 19:50 ` Jan Kara [this message]
2012-05-11  5:08   ` Asdo
2012-05-14  9:02     ` Jan Kara
2012-05-14 10:33       ` Asdo
2012-05-14 10:51         ` Jan Kara

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=20120509195056.GH5092@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=daniel@pocock.com.au \
    --cc=linux-ext4@vger.kernel.org \
    /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).