From: Clemens Gruber <clemens.gruber@pqgruber.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Fast ext4 cleanup to avoid data loss after power failure
Date: Tue, 07 Oct 2014 00:04:02 +0200 [thread overview]
Message-ID: <543311D2.10102@pqgruber.com> (raw)
In-Reply-To: <20141004034707.GA4581@thunk.org>
Thank you very much for your thorough response, Ted! It helped me out a
lot. Also big thanks to Lukáš and Eric!
At the moment I am changing every application state update to an atomic
"fwrite to tempfile, fsync (or fdatasync) tempfile, rename, fsync parent
dir".
As the amount of writes I need for application updates is usually small
(1-3 fwrites), I decided to update the application state file without an
extra journal log for now. But if the amount of necessary writes grows,
then I'll introduce a journal log file to minimize the writes needed for
each application state update.
Or would you consider adding an application level journal anyway?
So after following this design pattern for the application and locking
the filesystem with FIFREEZE before the power fails, does it matter what
flags I set for the ext4 filesystem?
Should I stay with the default settings data=ordered and commit=5?
Regards,
Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-10-06 22:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-03 13:09 Fast ext4 cleanup to avoid data loss after power failure Clemens Gruber
2014-10-03 14:08 ` Lukáš Czerner
2014-10-03 15:39 ` Clemens Gruber
2014-10-03 15:44 ` Eric Sandeen
2014-10-04 3:47 ` Theodore Ts'o
2014-10-06 22:04 ` Clemens Gruber [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=543311D2.10102@pqgruber.com \
--to=clemens.gruber@pqgruber.com \
--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).