#4088 NORM Never A: Files should be synced to Nand when battery is critically low

Zarro Boogs per Child bugtracker at laptop.org
Tue Oct 9 05:48:47 EDT 2007


#4088: Files should be synced to Nand when battery is critically low
----------------------------------+-----------------------------------------
  Reporter:  HoboPrimate          |       Owner:  cjb           
      Type:  defect               |      Status:  new           
  Priority:  normal               |   Milestone:  Never Assigned
 Component:  power manager (OHM)  |     Version:                
Resolution:                       |    Keywords:                
  Verified:  0                    |  
----------------------------------+-----------------------------------------
Changes (by tomeu):

 * cc: bcsaller (added)


Comment:

 Replying to [comment:5 AlbertCahalan]:
 > Replying to [comment:2 marco]:
 >
 > > In general though I don't think there is way to be completely safe
 against a power failure. I think OHM or Sugar should shutdown the system
 when the batter is about to dry out.
 >
 > Databases have done this for years. Being safe means atomic
 transactions. Some filesystem operations are supposed to be atomic; jffs2
 is responsible for taking that all the way to the storage.

 Atomic transactions bring safety against inconsistent state. But what we
 want in this ticket is that the last work done from the child before the
 machine power offs is saved.

 > Bonus: if you make things safe for power loss, then you can eliminate a
 bunch of code (including any bugs) by ripping out the shutdown code.

 But we really want to do something when the machine poweroffs, we want to
 save the latest work to the datastore.

 Operations in the xapian index are atomic, not sure if the datastore
 operations that sit above are and which could be the consequences of the
 machine powering off in the middle of a datastore save. Ben?

-- 
Ticket URL: <https://dev.laptop.org/ticket/4088#comment:6>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list