First of all love the project! Excellent work in bringing out the untapped potential hidden in these devices! ( btw the $22.77 donation is from me :)
Ok, I got everything installed on my new Sansa c250 under Windows via the installer. I then added a few music files (MP3s), boot up the device and all works well. Then I popped over to Linux, mount the device and add some more music files (E.g., the 'Melt Banana' directory/MP3s in the example below). I unmount and boot the device; the new files show up under 'Files', but they're not playable.
So I remount to see what happened and I see the files/directory I just added are corrupted. I can't enter the directory nor delete it.
$ ls -al
drwxr-xr-x 3 dit dit 32768 2008-07-27 23:50 Black Francis
d????????? ? ? ? ? ? Melt Banana
drwxr-xr-x 2 dit dit 32768 2008-07-27 23:31 MUSIC
drwxr-xr-x 3 dit dit 32768 2008-07-28 00:10 Phish
drwxr-xr-x 2 dit dit 32768 2008-07-27 23:31 PHOTO
...
Here's the relevant mount line in my fstab.
/dev/sdc1 /media/sdc1 vfat rw,user,noauto 0 0
FYI. I use this same fstab entry for mounting flash drives that I use back and forth on Linux and Windows w/o any problems.
I've been able to reproduce this file system corruption problem 3-4 times now with different assortments of files and have it narrowed down to file manipulation when mounted in Linux. No problems when moving files around in Windows.
Here's some dmesg output trying to mount the device
after the file system has some corrupted data. The following section repeats a few times before I'm actually able to mount it.
[ 2948.897875] usb 4-4: new high speed USB device using ehci_hcd and address 33
[ 2949.030843] usb 4-4: config 128 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 100, changing to 10
[ 2949.032752] usb 4-4: configuration #128 chosen from 1 choice
[ 2949.102746] scsi26 : SCSI emulation for USB Mass Storage devices
[ 2949.109796] usb-storage: device found at 33
[ 2949.109805] usb-storage: waiting for device to settle before scanning
[ 2954.115165] usb-storage: device scan complete
[ 2959.717549] usb 4-4: reset high speed USB device using ehci_hcd and address 33
[ 2964.841945] usb 4-4: failed to restore interface 0 altsetting 0 (error=-110)
[ 2964.842200] usb 4-4: USB disconnect, address 33
[ 2964.842476] scsi 26:0:0:0: Device offlined - not ready after error recovery
After last section repeats 3-4 times my system finally recognizes the device and I can mount it.
[ 2965.081460] usb 4-4: new high speed USB device using ehci_hcd and address 34
[ 2965.214641] usb 4-4: config 128 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 100, changing to 10
[ 2970.207208] usb 4-4: configuration #128 chosen from 1 choice
[ 2970.264104] scsi27 : SCSI emulation for USB Mass Storage devices
[ 2970.274366] usb-storage: device found at 34
[ 2970.274375] usb-storage: waiting for device to settle before scanning
[ 2975.266634] usb-storage: device scan complete
[ 2980.869646] usb 4-4: reset high speed USB device using ehci_hcd and address 34
[ 2983.017784] scsi 27:0:0:0: Direct-Access SanDisk Sansa c250 Sans PQ: 0 ANSI: 0
[ 2985.015263] scsi 27:0:0:1: Direct-Access SanDisk Sansa c250 Sans PQ: 0 ANSI: 0
And here's the badness that is thrown while trying to access corrupt directories/files.
[ 2610.831125] FAT: Filesystem panic (dev sdc1)
[ 2610.831138] fat_get_cluster: invalid cluster chain (i_pos 0)
[ 2610.831143] File system has been set read-only
One final note. When I was trying to reproduce this problem just now I couldn't get it happen when I just copied over 2-3 files at a time (I.e., the songs played fine). But once I copied over a directory with >10 files the corruption happened.
Some info:
Original Firmware: 01.01.05P
Rockbox version: r18134-080727
Any ideas? Thanks a lot for reading,
SD