On 08/30/15 16:55, Denis Heidtmann wrote: > On Sun, Aug 30, 2015 at 9:04 AM, Galen Seitz <[email protected]> wrote: ... >> Well, to my mind, commands like mdir and mcopy are about as routine as >> it gets, but if you're keen to use the GUI, then mtools won't be of much >> use. I will point out that not mounting a floppy has at least the one >> advantage that you avoid the possibility of corrupting the floppy by >> ejecting it when it is mounted. >> >> galen >> > > I am often hesitant to post questions here because my ignorance and > inexperience get laid bare. I do not understand how not mounting provides > that protection. This lack of understanding is because I do not have a > clear view of what happens when a device is mounted, and how the device is > accessed without mounting.
When a filesystem is mounted, the linux will typically cache blocks of filesystem data in RAM for performance reasons. Blocks of data that need to be written back to the device (aka dirty blocks) may sit in RAM for multiple seconds before being flushed to the device. This is one of the reasons that graceful shutdowns are always preferred over pressing reset or yanking the cord. In the case of a floppy or USB drive, ejecting or unplugging is the equivalent of yanking the cord. There is no opportunity for the system to write the data to the device, and filesystem corruption is often the end result. AFAIK, the mtools commands don't do any caching of writes. When you get the next command prompt after executing an mtool command, it is safe to immediately eject the disk. As described above, this is not true of a mounted filesystem. Hope this helps. galen -- Galen Seitz [email protected] _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
