lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151024194017.GB17642@quack.suse.cz>
Date:	Sat, 24 Oct 2015 21:40:17 +0200
From:	Jan Kara <jack@...e.cz>
To:	Eunji Lee <alicia0729@...il.com>
Cc:	linux-ext4@...r.kernel.org, tytso@....edu
Subject: Re: [PATCH] fix jbd2 asynchronous commit

On Sat 24-10-15 17:14:15, Eunji Lee wrote:
> This patch is to fix a (seemingly) bug of asynchronous commit process
> (pinging w/ a patch). 
> 
> In asynchronous commit, JBD2 issues a "FLUSH" request only once after
> issuing a commit record if a file system and a journal reside on the same
> device. This can reduce redundant storage flushes relying on the checksum. 
> 
> However, it seems to incur an undesirable result in ordered mode.
> Specifically, the system can crash after metadata blocks and a commit record
> are successfully written to the journal (i.e., with no checksum error), but
> before data blocks are reflected to the file system. Then, on the system
> recovery, metadata updates in a journal area will be replayed as the
> checksum has no error, even though the associated data blocks are not
> reflected to the file system. This fails to provide the correct ordering -
> associated data blocks are written before metadata updates are written. 
> 
> This patch flushes a storage device before issuing a commit record, even if
> a journal and a file system use a same device, thereby guaranteeing the
> correct ordering between metadata and data block updates. 
> 
> Without asynchronous commit, it does not matter because the commit record
> with WRITE_FUA guarantees to flush storage cache before the commit record is
> written to the journal. 

Thanks for your report and detailed analysis. However this bug is already
fixed - parse_options() in fs/ext4/super.c already makes sure that
journal_async_commit cannot be enabled in data=ordered mode.

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ