Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Aug 2003 02:31:18 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Ruslan Ermilov <ru@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: MSDOSFS woes
Message-ID:  <20030803022259.R580@gamplex.bde.org>
In-Reply-To: <20030802150850.GB20186@sunbay.com>
References:  <20030802150850.GB20186@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2 Aug 2003, Ruslan Ermilov wrote:

> While working with Marcel on a bootable CD-ROM for IA64 issue,
> I've stumbled upon the following problem.  I needed to increase
> the size of the EFI partition (which is an MS-DOS file system)
> to 64M, and that made two of my machines stuck solidly -- a lot
> of process are waiting on the "wdrain" event.
>
> The issue is not IA64 specific, both machines in question are
> i386.  The following script makes my machines unhappy:
>
> EFISZ=131072
> dd if=/dev/zero of=$BASE/$EFIPART count=$EFISZ
> md=`mdconfig -a -t vnode -f $BASE/$EFIPART`
> newfs_msdos -F 12 -S 512 -h 4 -o 0 -s $EFISZ -u 16 $md
> mount -t msdosfs /dev/$md /mnt
> dd if=/dev/zero of=/mnt/foo

Try fixing newfs_msdos so that the -s option actually works, or adjusting
sizes.  Otherwise the file system doesn't fit on the device:

Filesystem    1024-blocks    Used   Avail Capacity iused   ifree %iused  Mounted on
/dev/md0            65568      64   65504     0%     512       0  100%   /mnt

so bad things should be expected to happen when msdosfs runs off the end.
The kernel should handle this gracefully, but might not.

newfs has an end-of-partition check to avoid this problem.

I still get assorted panics and strange behaviour after increasing the
device size, but suspect unrelated bugs from version skew.  The
strangeness was the second dd failing with EINVAL for one run and with
the correct error ENOSPC for another.

Bruce



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