Re: MSDOSFS woes

From: Bruce Evans <bde_at_zeta.org.au>
Date: Sun, 3 Aug 2003 02:31:18 +1000 (EST)
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
Received on Sat Aug 02 2003 - 07:35:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:17 UTC