Rockbox General > Rockbox General Discussion

Directory cache rebuilds for no obvious reason

(1/3) > >>

pondlife:
If I repeatedly start and immediately shut down my H340, I get similar symptoms.  That is, every OTHER time I start up, I get a "Scanning disk..." splash.

USB is not involved at all.

If I let the player run for awhile before shutting down, this doesn't happen.  So perhaps it's a result of shutting down while the audio is still being buffered?

Whenever I check the dircache status, it's active, and size is well below it's limit (about 1MB, 13829 entries).

pondlife

Multiplex:
I have similar bahaviour on my H320 - hadn't characterised it in such detail, but it often does a quick re-scan on startup - doesn't take long on 5500 tracks and lots of other things to deal with to look into it.

I did wonder if it was down the using USB for charging triggering the "USB used, must check the disk logic"

Will pay more attention...

LambdaCalculus:
I'm also seeing this as well on my 5.5G iPod video. If I stop an audio track while it's playing, then shut down the iPod, it gives me the "Scanning disk..." splash on startup.

My stats are:

Files: 15323
Music: 4254
Dirs: 569
Max files in Dir: 621

I do get "Scanning disk..." when I start up after having transferred files to my iPod, but it's strange seeing it when I start it up when I haven't used USB.

Lear:
Actually, the directory cache rebuilds on every boot (unless you run Rockbox from flash on a H1x0, I think, in which case it is loaded from a file). :)

However, it should normally be done in the background, without  a "Scanning disk..." splash. I've no idea why it would do it on every other boot though. Once it has done a proper scan, it should ideally only happen again if you add a "large enough" number of files, so that certain buffer allocations aren't enough any more. Or that's at least how I've understood it.

Sounds like you should make a test build with a few splashes in init_dircache (main.c) and dircache_build (dircache.c) to figure out what is going on.

AlexP:
I believe it will do a full rescan on boot if you interupt a background scan on the previous boot.  Therefore you get:

Boot 1)  Starts a background scan, you shut it down before it has finished.

Boot 2)  Previous boot had interupted background scan, so do foreground scan

Boot 3)  Previous boot did full foreground scan, therefore start background scan, you shut it down before it has finished.

Boot 4)  Previous boot had interupted background scan, so do foreground scan

and so on.

I don't know whether the behaviour of doing a full foreground scan on next boot if previous boot background scan did not complete is a bug or not, but that is what seems to happen.

Navigation

[0] Message Index

[#] Next page

Go to full version