From niklasjs@ifi.uio.no  Thu Nov 21 03:52:36 2002
Return-Path: <niklasjs@ifi.uio.no>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id F213D37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 21 Nov 2002 03:52:35 -0800 (PST)
Received: from pat.uio.no (pat.uio.no [129.240.130.16])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C785E43E6E
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 21 Nov 2002 03:52:31 -0800 (PST)
	(envelope-from niklasjs@ifi.uio.no)
Received: from fimm.ifi.uio.no ([129.240.65.205])
	by pat.uio.no with esmtp (Exim 2.12 #7)
	id 18Epsg-0001lR-00
	for FreeBSD-gnats-submit@freebsd.org; Thu, 21 Nov 2002 12:52:26 +0100
Received: from localhost (niklasjs@localhost) by fimm.ifi.uio.no ; Thu, 21 Nov 2002 12:52:26 +0100 (MET)
Message-Id: <Pine.SOL.4.44.0211211250440.22700-100000@fimm.ifi.uio.no>
Date: Thu, 21 Nov 2002 12:52:26 +0100 (MET)
From: Niklas Johannes Saers <niklasjs@ifi.uio.no>
To: FreeBSD-gnats-submit@freebsd.org
Subject: mdconfig and msdosfs make fs writes hang

>Number:         45558
>Category:       kern
>Synopsis:       [msdosfs] mdconfig and msdosfs make fs writes hang
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    trhodes
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 21 04:00:03 PST 2002
>Closed-Date:    
>Last-Modified:  Fri Dec 29 20:40:29 GMT 2006
>Originator:     Niklas Saers
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD my.home.saers.com 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Wed
Nov 20 09:19:35 GMT 2002
root@my.home.saers.com:/usr/src/sys/i386/compile/my i386
        Athlon 1,33/512, FreeBSD 5.0-DP2

>Description:

See How-To-Repeat to get the precise thing I've done time and time again
to get this happening. The problem does not happen when the image is on an
ffs partition, so I suspect it's having some problems msdos-to-msdos or
such. All subsequent writes to ffs partitions will stall, yet writes to
the same msdos partition will go through.

All processes that hang have the STATE (from 'top') set to wdrain
They never come out of that state


>How-To-Repeat:
su
cd /mnt/msdos
dd if=/dev/zero bs=1024 count=760000 of=7
mdconfig -a -t vnode -u 7 -f 7
disklabel -r -w md7 auto
newfs /dev/md7c
mount /dev/md7c /mnt/7
chown me:mygroup /mnt/7
logout
cd /mnt/msdos/dump_to_cd_dir
mv * /mnt/7

>Fix:
Computer cannot be shut down and power has to be taken manually


>Release-Note:
>Audit-Trail:

From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: freebsd-gnats-submit@freebsd.org, niklasjs@ifi.uio.no
Cc:  
Subject: Re: kern/45558: [msdosfs] mdconfig and msdosfs make fs writes hang
Date: Thu, 06 Jan 2005 11:48:41 +0900 (JST)

 Good news:
 
 It looks like mdconfig now works correctly on msdos partitions.
 I built a 1G file on a 32-bit fat partition, and mounted it as ffs
 with mdconfig, and it has been working nicely for a while, with a lot
 of activity.
 
 I'm however a bit surprised by the slow writes, considering I'm using
 soft updates on the partition. Something in the intereaction with
 msdosfs?
 
 Jacques Garrigue

From: Bruce Evans <bde@zeta.org.au>
To: Kris Kennaway <kris@obsecurity.org>
Cc: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>,
	freebsd-gnats-submit@freebsd.org
Subject: Re: kern/45558: [msdosfs] mdconfig and msdosfs make fs writes hang
Date: Mon, 10 Jan 2005 07:04:07 +1100 (EST)

 On Wed, 5 Jan 2005, Kris Kennaway wrote:
 
 > On Thu, Jan 06, 2005 at 02:50:31AM +0000, Jacques Garrigue wrote:
 > >  Good news:
 > >
 > >  It looks like mdconfig now works correctly on msdos partitions.
 > >  I built a 1G file on a 32-bit fat partition, and mounted it as ffs
 > >  with mdconfig, and it has been working nicely for a while, with a lot
 > >  of activity.
 > >
 > >  I'm however a bit surprised by the slow writes, considering I'm using
 > >  soft updates on the partition. Something in the intereaction with
 > >  msdosfs?
 >
 > msdosfs is not known as a high-performance filesystem ;-)
 
 That's mainly because msdosfs is poorly implemented in FreeBSD.  Its
 main poornesses are random block allocation (for the first block in a
 file) and non-use of VMIO.  After fixing these and some non-asyncness,
 it is only about 20% slower than ffs1 for copying a cached copy of
 /usr/src (60 seconds instead of 50), and for the more interesting
 result of reading back the copy to see if the files were layed out without
 much fragmentation, it is only 10% slower than ffs1 (19 seconds instead
 of 17.2).  In -current the read-back takes over 400 seconds.  The slow
 read-back is entirely due to the poor layout from random block allocation.
 
 The only performance problem with msdosdfs should be that it fragments
 too easily.  Fragmentation can be very bad in ffs too.  It just takes
 longer and its perfermance reduction is limited to more like a factor
 of 10 than a factor of 100.  In the above, 17.2 seconds for reading
 400MB of files is very good -- almost half the disk bandwidth of about
 40MB/sec.  tar cf of my active, fragmented copy of /usr/src on a slower
 (25-30MB/sec) disk today takes 94 seconds.
 
 Bruce
Responsible-Changed-From-To: freebsd-bugs->trhodes 
Responsible-Changed-By: remko 
Responsible-Changed-When: Fri Dec 29 20:40:24 UTC 2006 
Responsible-Changed-Why:  
assign to tom 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45558 
>Unformatted:
