]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: forbid journal_async_commit in data=ordered mode
authorJan Kara <jack@suse.cz>
Wed, 26 Nov 2014 01:19:17 +0000 (20:19 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 26 Nov 2014 01:19:17 +0000 (20:19 -0500)
commita69820dc5652a5667cfb94448f1f8e342e94a09e
tree906be3cb6a3c591e8ed1257f17ed9eeb50bfcde2
parentee14b2a087a7ac12ceee7b2d05b3ce93f0bff0d3
ext4: forbid journal_async_commit in data=ordered mode

Option journal_async_commit breaks gurantees of data=ordered mode as it
sends only a single cache flush after writing a transaction commit
block. Thus even though the transaction including the commit block is
fully stored on persistent storage, file data may still linger in drives
caches and will be lost on power failure. Since all checksums match on
journal recovery, we replay the transaction thus possibly exposing stale
user data.

To fix this data exposure issue, remove the possibility to use
journal_async_commit in data=ordered mode.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c