DMA leads to FS corruption on iPod 4G?
I'm experiencing a reproducible issue on multiple iPods (all fourth-generation ones), regardless of whether I'm using the original hard drive or a compact flash card, and running either on version 3.14 or the latest development version (with or without custom patches).
Basically, sooner or later (can be after only a few – clean – restarts or sometimes after dozens of them) the file system becomes corrupt and/or bad data has been written to the database files, config files or playlist_control or the files outright disappear, are duplicated or renamed so that I have files like DATAB~1.TCD, DATABA~5.TCD etc.. with the effect that the database has to be re-initialized (sometimes only possible after first fixing the file system).
My working assumption / wild guess is that some files don't get correctly closed when shutting down the iPod?! But I could be way off-base there.
The only thing possibly vaguely related (?) that I could find was this: https://www.rockbox.org/tracker/task/11883 . Not sure whether this is still in any way current.
Anyone have an idea how to get to the bottom of this?
Re: DMA leads to FS corruption on iPod 4G?
Huh. This leads me to think it has something to do with DMA ?
After some furious testing today, I'm now growing ever more confident that the culprit is indeed DMA. Rockbox's implementation does not seem to work reliably on the fourth-generation iPod.
Between the devices I've probably gone through the shutdown and restart cycle hundreds of times, had them play back songs, switched between songs, and created dynamic playlists by selecting something from the database somewhat randomly.
Once again, and as expected, device A, the one with the built-in hard drive and DMA enabled, eventually asked me to re-initialize the database and ended up with a corrupted FS after a few dozen restarts.
On the other hand, both B and C have run without even a single hiccup so far.
As I mentioned, I had previously run into FS corruption on each of these devices when DMA was enabled (both on 3.14 and the latest dev version).
At this point I'm 99% sure that disabling DMA is the "solution". I've run into no issues since disabling it and using the heck out of my iPod. Battery life doesn't appear to be noticeably worse. Whatever decrease in battery life there may be (I might measure it one of these days) is arguably worth it to assure data integrity. As a nice (maybe not so surprising) side effect, it appears that Rockbox's USB mass storage functionality, which I'd avoided before in favor of the OF, also seems to finally have become reliable – although it may be too early to tell at this point.
d) can't be bothered to leave feedback about it.
Even better of course, would be making DMA work reliably on this model, but I'm not sure that is a realistic outcome in the short term (or possibly even long term).