Subject: Re: buf/msdosfs problem
To: Jaromir Dolecek <dolecek@ics.muni.cz>
From: Jeff Roberson <nomad@nop.aliensystems.com>
List: tech-kern
Date: 02/10/2000 11:05:01
I can't provide any more information as to what is actually wrong, but I
can tell you that msdosfs doesn't work on either of my alphas in 1.4.1.  I
can mount floppies, but if I copy a file from the floppy it gets
corrupted.  Also if I copy a file to the floppy I get argument list too
long.  This hindered me from using a digital camera which uses floppies
until I discovered that it works alright on my old sparc.  I don't know if
the issues are related, but it seems suspicious to me that it works on
x86, and sparc (both 32 bit), but it breaks on my alpha (64 bit).  I also
noticed considerable odities with multiple directories on my x86 machine
some time ago, but I can't remember what exactly went wrong, and the
machine is long gone by now.

Jeff

On Thu, 10 Feb 2000, Jaromir Dolecek wrote:

> Date: Thu, 10 Feb 2000 10:27:45 +0100 (MET)
> From: Jaromir Dolecek <dolecek@ics.muni.cz>
> To: tech-kern@netbsd.org
> Subject: buf/msdosfs problem
> 
> Hi,
> I'm investigating strange issue I have with msdosfs. Basically,
> when a file of "proper" size was copied to directory deep on
> filesystem (say /dos/b/c/), that directory suddenly appeared to be
> same as root directory - ls /dos/b/c/ was same as ls /dos. /dos/b/c/.
> didn't exist at that stage. After umount/mount everything was ok
> again, just the file was copied in root directory instead of the
> original destination directory.
> 
> After quite some time of hunting, I found out that this bug appears
> when the code in msdosfs_write() get's a buf (size 8192 if it matters)
> and writes whole 8192 bytes into it at once (I tried to replace
> the uiomove() with memset() and got same results). I didn't find what are
> other coencidences needed, but found out that if I write
> only 8191 or less bytes into the buffer, everything is happy.
> 
> I'm not sure whether this is some bug in buf handling code (i.e.
> buf alloc problem ? or b*write() problem ?) or prolly other problem
> in msdosfs (though the latter seems unlikely).
> 
> Has anyone an idea what the real problem might be ? Note that I never
> had such problem with 1.4.*, it appeared after I upgraded the machine
> to -current (1.4P I think).
> 
> Jaromir
> -- 
> Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
> @@@@  Wanna a real operating system ? Go and get NetBSD, damn!  @@@@
>