All of lore.kernel.org
 help / color / mirror / Atom feed
* UBIFS: How to reserve space to be used right before power cut
@ 2013-06-13 11:42 Helmut Raiger
  2013-06-13 11:50 ` Matthieu CASTET
  0 siblings, 1 reply; 6+ messages in thread
From: Helmut Raiger @ 2013-06-13 11:42 UTC (permalink / raw)
  To: linux-mtd

Hi,

     we try the following:

1) setup some data in an 8kByte block in RAM
2) frequently modify this data during normal operation
3) on a power fail signal write the block to a file on an UBIFS partition
4) recover from the written data after the power cut

   The time between power failure notification and the uP-reset is 
guaranteed by hardware
and is about 20ms.

We first thought about using fallocate() to allocate a corresponding 
block on the partition
but soon found that UBIFS does not implement a native fallocate() and 
thus the generic
one simply wrote the file to 8k of zeros. This of course will not help.

Simply fsync()ing the file in case of a power cut does not seem 
reliable, for
   - the file system might be full
   - write back cache operation may interfere with the synch-ing of our file
   - the garbage collector might run to free dirty LEBs and erase the 
corresponding PEBs
The latter 2 overstretching our timing requirements.

This is on an embedded system (i.mx31, arm1136@532MHz) running Linux 
3.something
(we are quite flexible in adapting new kernel versions), currently 
testing on 3.0.45.

Could someone hint the course to follow for this szenario?

Any pointers appreciated,
Helmut


--
Scanned by MailScanner.

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

end of thread, other threads:[~2013-06-26  8:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-13 11:42 UBIFS: How to reserve space to be used right before power cut Helmut Raiger
2013-06-13 11:50 ` Matthieu CASTET
2013-06-13 13:29   ` Raiger Helmut
2013-06-13 14:20     ` Matthieu CASTET
2013-06-17  9:02       ` Helmut Raiger
2013-06-26  8:03         ` Helmut Raiger

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.