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: Free HD space and PANIC
From: Michael O'Quinn (michael_at_oquinn.info)
Date: 2003-06-17


On Tue, 17 Jun 2003, Linus Nielsen Feltzing wrote:

> c s wrote:
> > Can this fix also be extended to provide the correct
> > amount of free space in the info menu? I know that the
> > free space readout is wrong because of Microsoft's
> > buggy and inconsistant behavior, but we wouldn't be
> > the first ones to program around MS bugs.
>
> It is actually very simple. All we have to do is search the entire FAT
> for free clusters and sum them up. That takes quite a few seconds,
> depending on the size of the FAT. We have code that does exactly that,
> but only in the debug menu.
>
> If the user accepts this (battery-draining) behaviour, we can change
> that in an instance. But it means that the disk will spin up and search
> the FAT for 5-10 (or more) seconds when the info menu is entered.
>
> Opinions? Comments?

What's the point of showing it if it's wrong? Yet that's a really nasty
hit both on the battery and in just plain real time. *I* don't want to
have to wait, just because others have already upgraded to XP while it's
still in Beta. ;-) (i.e., before the next version of WinDoze is
released.)

Perhaps is should be a configurable option, with a nice explanation in
the manual and appropriate FAQ that explains why it's there, without
actually saying You Know Who screwed up again.

It could be called "Alternate Free space Calculation." The FAQ entry could
be...

===[ BEGIN ]===

99. Q: What is the "Alternate Free Space Calculation" in the config menu
all about?

A: There are multiple ways to compute the space remaining on a hard drive.
One method is very fast and efficient, but relies on every operating
system that uses that drive to update certain data -- called FSInfo --
correctly.

It appears that some newer versions of Windows do NOT update all of the
FSInfo data. This results in incorrect free space calculations when the
more efficient FSInfo method is used. As a workaround, the "Alternate
Free Space Calculation" uses a much slower but more reliable method to
compute the free space.

The normal (preferred) method usually takes less than half a second, while
the alternate method can take from 5 to 10 (or more) seconds to complete.
Obviously you should use the normal method if it works, and the alternate
method if you have to.

Note that this is not a Rockbox issue. ANY operating system or computer
that accesses the hard drive will have the same problem.

===[ END ]===

Having just written all that, it occurs to me to ask: is it possible to
detect (quickly!) if the FSInfo data has not been correctly updated? If
so, then could Rockbox could choose automatically?

Michael



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