Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Drivers
  • Assigned To No-one
  • Operating System Sansa e200
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by mc2739 - 2010-01-14
Last edited by pamaury - 2010-05-21

FS#10913 - File Browser not updated properly upon microSD insert/removal with dircache enabled

With dircache disabled, if you are in the file browser and insert or remove the microSD card it will consistently update the list by adding <microSD1> on insert and removing it when the card is removed.

With dircache enabled, the list is not consistently updated.

Tested with r24224 and as old as r22000 on e280v1
Tested with r24224 on e260v2

Process to reproduce:
1. Boot and clear all settings
2. Enable dircache setting
3. Power off and reboot
4. Enter the file browser by selecting Files on the Main Menu
5. Insert and remove microSD card and observe the Files list

If the microSD card was not inserted on boot, the list is not updated on the first insert. After the card is removed, subsequent inserts/removals seem to update properly.

If the microSD card was inserted on boot, the list is not updated on the first removal. Upon insert, the list may or may not update. The updates are very inconsistent on subsequent inserts/removals. If you exit the file browser and then reenter, the correct state is shown.

Closed by  pamaury
2010-05-21 09:28
Reason for closing:  Fixed
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

r26222

I'm investigating the bug and I think it's due to the following issue:
On microSD insertion/removal, SYS_FS_CHANGED (SFC) is triggered. This SFC message is used in two placed:
- in the file browser (tree.c:dirbrowse) (1)

=> it triggers a complete reload of the current directory and a complete redraw

- in the dircache thread (dircache.c:dircache_thread) (2)

=> it disables dircache and ask for a transparent rebuild

Now, the problem is the synchronization because if (1) happen before (2), (1) will call ft_load that will ask dircache to opendir/readdir the current directory, but as (2) as not yet happened, dircache is still enabled and thus the sd insertion has not yet been taken into the dircache subsystem.

So the solution is to make sure that (2) happens before (1).

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing