From: Paolo Minazzi <Paolo.Minazzi@mitrol.it>
To: linux-f2fs-devel@lists.sourceforge.net
Subject: f2fs, mount -o sync, sync and cut-off power
Date: Thu, 30 Oct 2014 08:35:40 +0100 [thread overview]
Message-ID: <5451EA4C.2040304@mitrol.it> (raw)
I'm Paolo.
I'm integrating f2fs on an ARM board.
I do not have the power-off button.
The normal way to power-off is to cut-off the power.
I tried to mount in sync mode
mount -t f2fs -o sync /dev/mmcblk0 /data
echo Hello > /data/Hello.txt
I realize that if I cut-off the power after "echo" finishes, at the new
boot I see that f2fs execute the recovery that can be also very long.
If I add the "sync" command
mount -t f2fs -o sync /dev/mmcblk0 /data
echo Hello > /data/Hello.txt
sync
I realize that if I cut-off the power after "sync" finishes, at the new
boot I do not see the f2fs
recovery and the boot process is very fast.
This means that -o sync is different that execute a sync command after
each write.
I study deeper the problem reading the source code and I realize that
"sync" produce a checkpoint.
I tried to add the code to make a checkpoint every n writes. It works
but is not a clean solution.
I read and tried ipu-policy but I do not think it is realted to my needs.
Is there a solution to force a checkpoint automatically after each write ?
I need
- not lose data on cut-off
- fast boot (I would like to avoid different mount time)
For me the spped of write is not so important.
I would like avoid the following ...
while true
do
sync
sleep 1
done
Thanks for your time and for this great project
Paolo Minazzi
------------------------------------------------------------------------------
next reply other threads:[~2014-10-30 7:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-30 7:35 Paolo Minazzi [this message]
2014-10-30 23:11 ` f2fs, mount -o sync, sync and cut-off power Changman Lee
2014-10-31 6:22 ` Jaegeuk Kim
2014-10-31 9:17 ` Paolo Minazzi
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=5451EA4C.2040304@mitrol.it \
--to=paolo.minazzi@mitrol.it \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.