FS#8423 - Fixes two database problem

Attached to Project: Rockbox
Opened by Lee Kang Hyuk (alwaysbluepop) - Monday, 07 January 2008, 14:36 GMT
Last edited by Miika Pekkarinen (miipekk) - Monday, 07 January 2008, 15:10 GMT
Task Type Patches
Category Database
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I've noticed that tag cache system does not work properly on a certain situation, since r15955. (X5 player and sim, 'load to ram','auto update', and 'dircache' enabled)

1. deleted file's tag entry continues to show up even when that tags are no longer in use in database:
deeply looked into logf, and diff between 15954 and 15955, I finally concluded that necessary codes are removed by accident.
FLAG_DELETED is not saved to masterfd, so the value of in_use[tag] is always minimum 1, not 0.
This situation may causes FS8414(duplicated entries).

2. Whenever I modified a metadata(and do not rename it), Rockbox results in crash(FS8384):
due to newly added 'Resurrection' code, we have to refference old tag_seek, i guess.

I'm not sure if it's right solution, but worked as expected by now, including 'Preserve Runtime Statistics'.
This task depends upon

Closed by  Miika Pekkarinen (miipekk)
Monday, 07 January 2008, 15:10 GMT
Reason for closing:  Accepted
Comment by Miika Pekkarinen (miipekk) - Monday, 07 January 2008, 15:03 GMT
Thanks, this looks great. Going to commit now.