From: gt8134b@prism.gatech.EDU (Howlin' Bob) Subject: Re: No sync in linux DOS file system ?? Date: 18 May 1993 15:52:26 GMT
In <SCT.93May17203300@ascrib.dcs.ed.ac.uk> sct@dcs.ed.ac.uk (Stephen Tweedie) writes:
>On 16 May 93 05:58:55 GMT, dhliu@solar.csie.ntu.edu.tw (Der-Hua Liu) said:
>Are you trying to access a single partition simultaneously through the
>dos emulator and a mounted msdos filesystem? This is dangerous in a
>*BIG* way! The trouble is that if you have, say, /dev/hda1 mounted in
>the Linux directory tree as an msdos partition, the dos emulator
>itself will use /dev/hda (ie. the image of the _entire_ hard disk) to
>access it, rather than /dev/hda1 (the image of the single partition).
>Anyway, to cut a long story short, this means that the same physical
>disk blocks will be being accessed through two entirely different
>logical devices, and there is absolutely no coordination between them.
This is true. Raw (unbuffered) block devices would alleviate this,
but at a godawful performance hit. If there were ever any legitimate
use of /dev/hda except for fdisk, then it might be worthwhile to
coordinate the devices' buffers, but there really isn't, so I guess
it'll never happen. dosemu uses /dev/hda because it was a nasty
hack, but a nasty hack that worked. Of course, the limits of "work"
lie somewhere around mounting the partition as a Linux DOS file system.
Don't do this.
Stephen is (of course) right. Although you can get the DOS file
system's buffers flushed to disk with sync, dosemu is accessing
the device through /dev/hda. It has a different set of buffers
altogether, which may or may not get flushed before /dev/hda1's.
>*NEVER* run dosemu-0.48 or older on a mounted msdos partition, unless
>you use the dos redirector to access it through the linux filesystem
>code.
This may partly be my fault. I thought I had explained this in the
README, but it doesn't look like I did.
--
Robert Sanders
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt8134b
Internet: gt8134b@prism.gatech.edu