Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: error in disk write code
From: Greg Haerr (greg_at_censoft.com)
Date: 2002-11-08


: "Panic: Cluster chain too short"
:
: This happens only when the disk is formatted with
: sectors per cluster = 1. (./fat ds 0, byte 14 = 01)

I have fixed the problem. The cache_fat_sector code is
incorrect. When the hash FAT cache entry is inuse and dirty,
but required by a new FAT hash, the cache_fat_sector
code writes out the first FAT entry using the NEW sector
number, rather than the cached sector value. To fix change the line:

if (ata_write_sector(secnum + ...

to

if(ata_write_sector(fat_cache_sectors[cache_index].secnum + ...

And the filesystem will work properly for any file size
that requires > 4092 clusters.

I was incorrect in an earlier statement: the read code
does work in the current CVS code because no
FAT cache entries are ever modified, so the wrong
sector doesn't ever get written...

Regards,

Greg



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa