linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fast ext4 cleanup to avoid data loss after power failure
@ 2014-10-03 13:09 Clemens Gruber
  2014-10-03 14:08 ` Lukáš Czerner
  0 siblings, 1 reply; 6+ messages in thread
From: Clemens Gruber @ 2014-10-03 13:09 UTC (permalink / raw)
  To: linux-ext4

Hi,

I am using ext4 as root filesystem of my TQMa28-based board with 2GB eMMC.
In case of a power failure I have to clean up the filesystem in 1.5 to 2
seconds, that's how long the caps can sustain the power.

I pass the following rootflags on the kernel cmdline: data=journal,commit=1
In my user space application I open important files with O_SYNC.

Is there something else I can or should do to avoid data corruption?

I can detect when the power fails over a GPIO line, so I close open file
descriptors in one important application but doing a "normal"
poweroff/shutdown takes too long.

What would you do if you had 1.5 seconds until the power is gone?

Maybe a read-only rootfs and a separate small data partition?

Thanks for your help.

Best regards,
Clemens

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

end of thread, other threads:[~2014-10-06 22:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).