Subject: Re: halting in msdos filesystem
To: None <current-users@NetBSD.ORG, trevin@xmission.com>
From: Wolfgang Solfrank <ws@kurt.tools.de>
List: current-users
Date: 05/29/1996 14:35:27
> This is very annoying.  When mount_msdos added support for Windows 95
> filesystems I called it good and gave up working on my own code.  After
> adding a 4GB hard drive and (finally) moving NetBSD onto it, I again mounted
> the Windows 95 filesystem to grab a file from it -- and the operating system
> promptly froze.

[...]

> The Micropolis drive (which I can't read) has a 2047MB DOS partition with
> these files in the root:

[...]

> If anybody familiar with the msdos filesystem driver can figure out what's
> going wrong, I'll be more than happy to provide any other information you
> need about my system configuration.

Well, information needed to look into this further includes things like
cluster size, number of clusters, etc.

But from the size of your filesystem, we can deduce that the cluster size
is 32k which isn't currently supported :-(. But I don't understand why
the system halted instead of panicing. Did you by chance run X-Windows, so
you couldn't see the panic message?

Anyway, consensus is that this is a bug (or less strongly a deficiency) of
the implementation of the buffer cache, not one in msdosfs.

The problem is that msdosfs wants to read whole clusters into buffers, and
the buffer size is currently limited to 16k. You can make it work by
increasing MAXBSIZE in <sys/param.h> to 32768, but beware that this will
eat precious kernel virtual memory, so be prepared to increase the kernel
virtual size by increasing NKPDE (at least I think this does it).

Why MAXBSIZE is defined in the machine independent <sys/param.h>, and not
even protected by #ifndef to allow for overwriting it, I don't understand,
but maybe someone else can shed some light on this. Probably it's purely
historical.
--
ws@TooLs.DE     (Wolfgang Solfrank, TooLs GmbH) 	+49-228-985800