Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Drivers
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by PaulJam - 2007-06-26
Last edited by petur - 2007-07-05

FS#7359 - Filesystem errors after moving directorys with rockbox

When you move a directory in the filetree by using the “cut” and “paste” options in the context menu, this causes filesystem errors.
This was reproduceable with a fresh formatted (quickformat) harddrive with only the .rockbox folder and some testfiles copied to it. I started Rockbox and moved the folder “Müll” from “/Daten” to “/Aufnahmen”, then shutdown Rockbox, connected to USB and ran chkdsk.
Here is the output of chkdsk (unfortunately only in german):

Der Typ des Dateisystems ist FAT32.
Volume H300 erstellt 26.06.2007 17:50
Volumenummer: 4CBB-1706
Dateien und Ordner werden überprüft… Windows hat auf dem Datenträger Fehler gefunden, wird diese aber nicht repariere
n, weil der Parameter /F nicht angegeben wurde.
\Aufnahmen\Müll Fehler in . und/oder .. berichtigt.
Die Datei- und Ordnerüberprüfung ist abgeschlossen.
Windows hat Probleme im Dateisystem festgestellt.
Führen Sie CHKDSK mit der Option /F (Fehlerbehebung) aus, um die Probleme zu
beheben.

 19.517.424 KB Speicherplatz auf dem Datenträger insgesamt
        784 KB in 49 Ordnern
     53.824 KB in 850 Dateien
 19.462.800 KB sind verfügbar
     16.384 Bytes in jeder Zuordnungseinheit
  1.219.839 Zuordnungseinheiten auf dem Datenträger insgesamt
  1.216.425 Zuordnungseinheiten auf dem Datenträger verfügbar

I think the line with the error translates to something like:
\Aufnahmen\Müll Errors in . and/or .. corrected

H320 with version: r13721M-070626 (default settings)

Closed by  petur
2007-07-05 18:31
Reason for closing:  Fixed
Additional comments about closing:  

thanks for spotting!

petur commented on 2007-06-30 22:08

Bah… the problem was staring in my face the whole time: the .. dir entry points to the parent dir, so when moving the dir, one must update the sectornumber of the .. entry

And now for a fix….

petur commented on 2007-07-01 08:56

The attached patch does NOT work although it’s not clear why. Just put it here so I can discuss it with a FAT32 code expert. The detection of the .. entry is a bit of a hack, it assumes it is the second entry in the dir.

petur commented on 2007-07-02 00:21

v2 - still not working. If anybody would care to tell me what I’m doing wrong?
(please ignore the c++ style comments, it was late ;)

petur commented on 2007-07-04 23:28

this patch fixes the problem, but for testing only. Needs to be written a bit better:
- enumerate all entries in the dir in search of ..
- make sure the first cluster is correct in case the parent is the root
(please don’t mind the C++ style comments, they’ll go away too ;)

   p.patch (2.3 KiB)
Project Manager

Correct me if I’m wrong, but I believe the . and .. entries are always the first two entries of a FAT directory (except for the root of course), so there won’t be a need to search for the .. entry.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing