Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Nov 1995 02:05:01 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        chuck@fang.cs.sunyit.edu, hackers@freebsd.org
Subject:   Re: MsDoss FileSystem
Message-ID:  <199511281505.CAA01593@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>        I've heard a lot about msdos filesystem support and that there are
>limitations (bugs?). What exactly are the limitations of the the msdos

See the open and analyzed Problem Reports about msdosfs.

There are several locking problems.  The main one is msdosfs_lookup() can
deadlock because the buffer containing the directory entry is not released
until too late.  For ufs, IIRC the buffer containing the directory entry
is released early and the required locking is provided by the buffer
containing the inode is released late.  This method doesn't work for
msdosfs because the inode isn't separate.

rename() is quite broken.  The lock on the target directory must be
given up before calling doscheckpath() to avoid deadlock.  The resulting
races are not handled properly.  ufs has the same problem, but IIRC the
consequences of races are less severe for ufs.  Renaming to an empty
directory with the same parent does the wrong thing:

	mkdir a b a/a1
	rename("a", "b");

renames b to a/b instead of renaming a to b (atomically deleting b).
There are several races.  Races can't be fixed easily by locking
everything because deadlock is close.

Writing is slow and buggy.  `dd if=/dev/zero of=/mnt/foo', where fd0 is
mounted on /mnt, gets a throughput of less than 1K/sec.
`dd if=/dev/zero of=/mnt/z bs=1m; ls' hangs in getblk().  This is probably
related to other hangs in getblk() that have been reported recently.  The
msdosfs block size is 512 bytes, so 2048 buffers are required to cache
the write effectively.  FreeBSD can't supply that many buffers, so its
buffer cache is even less effective than usual, and there are apparently
problems when the buffer cache is stressed.

>support? Does BSD/OS, NetBSD, Lites suffer from the same problems? 

NetBSD has kept it up to date better.  E.g., in 4.4lite introduced waiting
on VXLOCK in ufs_lock().  This change has propagated to msdosfs_lock() in
NetBSD and not in FreeBSD.  I don't know about Lites.  Linux has better
msdosfs support in half as much code.

>If there is a problem, is there anyone working on it? (Yes, I might be able
>to help).

No one seems to be working on the FreeBSD version.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511281505.CAA01593>