All of lore.kernel.org
 help / color / mirror / Atom feed
* f2fs, mount -o sync, sync and cut-off power
@ 2014-10-30  7:35 Paolo Minazzi
  2014-10-30 23:11 ` Changman Lee
  2014-10-31  6:22 ` Jaegeuk Kim
  0 siblings, 2 replies; 4+ messages in thread
From: Paolo Minazzi @ 2014-10-30  7:35 UTC (permalink / raw)
  To: linux-f2fs-devel

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


------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-31  9:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-30  7:35 f2fs, mount -o sync, sync and cut-off power Paolo Minazzi
2014-10-30 23:11 ` Changman Lee
2014-10-31  6:22 ` Jaegeuk Kim
2014-10-31  9:17   ` Paolo Minazzi

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.