FS#591 - Wrong free space display

Attached to Project: Rockbox
Opened by Anonymous Submitter - Wednesday, 04 December 2002, 07:15 GMT
Last edited by Björn Stenberg (zagor) - Tuesday, 15 April 2003, 22:39 GMT
Task Type Bugs
Category User Interface
Status Closed
Assigned To Björn Stenberg (zagor)
Operating System
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


i have recorder 20. i try daily builds very often and last 7
days i have a wrong info display about the free space on
rockbox. whatever i do it says 12.5gb. right now i have
20021204.Hw info:
thanks for your good work and time
This task depends upon

Closed by  Björn Stenberg (zagor)
Tuesday, 15 April 2003, 22:39 GMT
Reason for closing:  Fixed
Comment by Uwe Freese (thebreaker) - Friday, 06 December 2002, 12:30 GMT

I have the same problem here. It displays 0.0 GB free all the time. (AJB
Rec 20, Hitachi DK23DA-20, Archos Firmware 1.28, Rockbox from CVS
Comment by Björn Stenberg (zagor) - Monday, 09 December 2002, 15:44 GMT

I just added a recalculate feature in CVS. Try it and see if it gets it

To run it, go to Debug->Disk Info->Free and press PLAY.
Expect it to take about 1sec/gig, maybe more.
Comment by Uwe Freese (thebreaker) - Monday, 16 December 2002, 00:36 GMT

It works. Now the question is when this function should be called

At the moment, I have this idea: A boolean
variable stores if the value is up to date (set to false when recording or
deleting a file or when device was connected with usb). If the user has set a
"update free space on idle" option, the free space is recalculated the next
time the device is idle for one minute.
And if it's not, the info display
shows a special character in the free space line (maybe a star *) and the
user can then update the value with pressing play.

Updating the
value when the device is idle should be a good idea. That means that there
is no delay when this value is needed (for example, the user starts a
recording). Or am I wrong here?

How do you think the original
firmware does this calculation?
Comment by Björn Stenberg (zagor) - Monday, 16 December 2002, 09:59 GMT

You only need to do recalculation when the file system contains
incorrect information at boot time. The Rockbox FAT32 driver keeps
track of changes automatically, so periodic recalculation is not
Comment by Uwe Freese (thebreaker) - Thursday, 19 December 2002, 02:19 GMT

If I use usb, I usually change (add or remove) files from the hdd. In this case,
the free space is wrong.

To be easily updated, it would be better for
the user if is is displayed in some way that the value may be wrong in the
info display, and he should be able to update it (by button press) in the info
menu instead of somewhere in the debug menu. But that's not important
for me personally.

Probably more important is that a free-disk-
calculation should run before recording automatically. The rec function
could also display how much space is left for recording.