From: Jan Kara <jack@suse.cz>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Jan Kara <jack@suse.cz>,
linux-ext4@vger.kernel.org, Ted Tso <tytso@mit.edu>
Subject: Re: Journal async commit broken for data=ordered?
Date: Wed, 15 Feb 2012 16:57:07 +0100 [thread overview]
Message-ID: <20120215155707.GB9015@quack.suse.cz> (raw)
In-Reply-To: <15A0337B-5C65-4C36-9AD9-BE5D0E8EF812@dilger.ca>
On Tue 14-02-12 13:56:30, Andreas Dilger wrote:
> On 2012-02-14, at 8:55 AM, Jan Kara wrote:
> > I've just realized that JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT breaks
> > guarantees of data=ordered mode in ext4. The problem is that async commit
> > code assumes that when a checksum of a transaction in the journal matches,
> > all necessary data is on disk. This is true for metadata but need not be so
> > for data - the whole transaction may be correctly on pernament storage
> > while some data is still sitting in drive's caches. Thus if a power failure
> > happens at that moment, we have broken guarantees of data=ordered mode.
> > Seeing that async commit code isn't used by default anyway (I remember
> > there used to be some problems with it), shouldn't we just rip it out?
>
> A better long-term solution would be to submit the block IO in advance of
> marking the metadata dirty, so the data is safe on disk before the journal
> becomes involved.
Umm, I don't see how that would really make difference. Unless you flush
disk's caches you can never be sure data made it to disk. And you must make
sure data is on disk before anyone has a chance to see transaction writing
these data fully written into the log.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2012-02-15 15:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-14 15:55 Journal async commit broken for data=ordered? Jan Kara
2012-02-14 20:56 ` Andreas Dilger
2012-02-15 15:57 ` Jan Kara [this message]
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=20120215155707.GB9015@quack.suse.cz \
--to=jack@suse.cz \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--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).