#5719 BLOC Never A: Deleting a large file from a USB stick copies it into NAND (often filling NAND)

Zarro Boogs per Child bugtracker at laptop.org
Wed Dec 26 22:28:38 EST 2007


#5719: Deleting a large file from a USB stick copies it into NAND (often filling
NAND)
-----------------------+----------------------------------------------------
 Reporter:  gnu        |       Owner:  tomeu         
     Type:  defect     |      Status:  new           
 Priority:  blocker    |   Milestone:  Never Assigned
Component:  datastore  |     Version:  Build 650     
 Keywords:             |    Verified:  1             
 Blocking:             |   Blockedby:                
-----------------------+----------------------------------------------------
 WARNING:  If your file is larger than the amount of free NAND space you
 have left, this will leave your laptop unbootable, due to #5317.  It can
 be recovered by a full wipe, so it's not a total brick, but you lose all
 your data.

 Put a 200+MB file onto a FAT-formatted USB key on a real Linux machine (I
 used a copy of os542.img called "deleteme.pls").    Unmount it and move it
 to an XO.  Go to the terminal.  Do "df -h".  Note the free space in your
 NAND.

 Now go to the Journal, click on the USB logo, find the file, go into its
 detail view, and press the "-" in a circle to "Erase" the file.
 Watch it take a long time; watch the USB access light blink a lot.

 Go back to the terminal while it's doing this.  Run "df -h" again.  Note
 that the NAND is filling up.

 I did strace on the sugar-datastore process; it was in a read/write copy
 loop.  J'accuse!

 After it was done, I noticed:

   *  The file was still there on the USB key, undeleted.
   *  There were TWO copies of it in /home/olpc/.sugar/default/data, one
 complete copy called "deleteme.pls", and one partial copy called
 "deleteme(1).pls".
   *  I had only 11 Mbytes free in my NAND.
   *  The Journal showed no change from before I tried deleting the file -
 neither in the USB page nor in the Journal page.

 I was VERY CAREFUL to remove those two files from where Sugar copied them,
 and check "df -h" again, before rebooting my system.

 Bugs:

 Deleting a file should never INCREASE the amount of space occupied.
 (Other than possibly adding tiny housekeeping records.)

 Deleting a file from one filesystem (e.g. USB) should never result in
 copying that file to another filesystem (e.g. NAND).

 Deleting a file should actually remove the file from the place that it was
 deleted from.

 This bug was reported by donor Pamela Dallas as a suspicion (rt# 2962),
 and verified by me (John Gilmore) on build 650 on a B4.

-- 
Ticket URL: <http://dev.laptop.org/ticket/5719>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list