* G. Adam Stanislav <[EMAIL PROTECTED]> [001222 09:30] wrote:
> I think I have just discovered a bug... (FreeBSD 3.1).
> 
> Here is the scenario: The program (I have written) opens a file as O_RDWR,
> then uses mmap with PROT_READ | PROT_WRITE and MAP_SHARED. It works on
> the data, optionally reduces the file size, then unmaps and closes it.
> 
> Everything works fine as long as the file is on a native FreeBSD disk.
> But if it is on a Windows formatted hard drive mounted under FreeBSD,
> *sometimes* the file ends up filled with NULs.
> 
> Could it be mmap may get confused by a Windows formated drive? It does NOT
> return an error, but it fills the mapped area with zeros. It overwrites
> the contents of the file with zeros, but does not change the directory
> information (i.e., the time of the last access, and such).
> 
> It never happens on a FreeBSD drive, only on a Windows formated drive,
> which makes it rather spooky.

Most likely a result of a bug in the msdosfs code, perhaps you can
help track it down?  I don't use msdosfs. :(

-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to