From owner-freebsd-current@FreeBSD.ORG Sat Aug 2 09:35:41 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E5BB37B401; Sat, 2 Aug 2003 09:35:41 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A87C43FA3; Sat, 2 Aug 2003 09:32:09 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id CAA17065; Sun, 3 Aug 2003 02:31:59 +1000 Date: Sun, 3 Aug 2003 02:31:18 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Ruslan Ermilov In-Reply-To: <20030802150850.GB20186@sunbay.com> Message-ID: <20030803022259.R580@gamplex.bde.org> References: <20030802150850.GB20186@sunbay.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: MSDOSFS woes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2003 16:35:41 -0000 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