Quote:
Originally Posted by knc1
USB storage is unavailable to the internals while the cable is plugged in.
Runtime USB networking is protected against that case of PEBKAC, evidently the install/un-install is not.
|
If USB storage is writable by both sides (from inside the kindle, and from outside in the "real world") it can corrupt the file system. I have done this (accidentally) when I forgot to unmount an image file, then launched the VM that uses that file. Usually, the results are that newly created files get lost, but more serious changes like adding or removing directory trees could result in substantial file system corruption.
It should be safe for only ONE side to have rw access and the other side ro access though, but even then the ro side might not see recent changes done in the rw side. Part of the problem is that you can force disk flushes on the rw side, but it is a bit more difficult to force disk cache voids on the ro side.
Simpler and easier to do as kindle did and just disallow access to one side or the other. If you really need file system access by multiple processors, that's what NFS was designed for (and with usbnet, SCP does a good job too).
If you REALLY want to mount the filesystem from both sides, then AT LEAST turn off write caching (which defaults to ON for the kindles on a windoze PC), and do lots of "sync" commands on the kindles side --- and of course keep recent backup copies.
One way I though of to get data both ways over a shared kindle drive is to pre-allocate fixed-sized files, one for input and one for output, then use a program to mmap them, and then confine all writes to the proper file. In essence, one file becomes an input channel and the other an output channel. As long as no new disk clusters get allocated you should be (relatively) safe. But Windows sometimes writes crap to freshly plugged in drives (to test if it is fast enough for "readyboost"), and the kindle somethimes writes log files and whatnot to the drive as well (such as what page you last read in a book).
Just remember that bending the rules is not without risk...