linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Potential data consistency issue with ASYNC_COMMIT feature
@ 2009-12-11  6:45 Oleg Drokin
  2009-12-11  7:14 ` Oleg Drokin
  0 siblings, 1 reply; 5+ messages in thread
From: Oleg Drokin @ 2009-12-11  6:45 UTC (permalink / raw)
  To: linux-ext4; +Cc: Alex Zhuravlev, Andreas Dilger

Hello!

   I think ext4 ASYNC_COMMIT feature is potentially pretty unsafe 
   when write-back cache is enabled on the device.
   Since no barriers are ever done with this feature even if
   the barriers are enabled, we might end up in the situation
   where we write the journal blocks, then commit block, they 
   hit the device write-back cache, after that actual metadata
   blocks would be allowed to go to disk and eventually they will.

   In the end the device might decide to reorder some of the
   actual metadata updates in front of journal updates and
   if metadata updates will hit the disk and a power or other
   failure occurs after that, we have inconsistent filesystem
   as a result.

   I do not see an easy way to remedy the problem in this case
   other than to insert empty barrier after the commit block
   and wait for it completion, but I think that would negate
   the entire gain from this feature. I wish we actually had
   real ordered writes implemented, not just barrier/FUA
   sent to the device before every ordered buffer.

   Am I missing something?

   Thanks.

Bye,
    Oleg

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-16 20:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11  6:45 Potential data consistency issue with ASYNC_COMMIT feature Oleg Drokin
2009-12-11  7:14 ` Oleg Drokin
2009-12-11 16:01   ` Eric Sandeen
2009-12-11 20:52   ` tytso
2009-12-16 20:33     ` Jan Kara

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).