From owner-freebsd-stable@FreeBSD.ORG Mon Nov 27 19:58:27 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF42A16A403 for ; Mon, 27 Nov 2006 19:58:27 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail23.syd.optusnet.com.au (mail23.syd.optusnet.com.au [211.29.133.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6ABAA43D99 for ; Mon, 27 Nov 2006 18:41:37 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c58-107-94-118.belrs4.nsw.optusnet.com.au [58.107.94.118]) by mail23.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id kARIbxeY029119 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 28 Nov 2006 05:38:02 +1100 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id kARIbwRM003300; Tue, 28 Nov 2006 05:37:58 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id kARIbwag003299; Tue, 28 Nov 2006 05:37:58 +1100 (EST) (envelope-from peter) Date: Tue, 28 Nov 2006 05:37:58 +1100 From: Peter Jeremy To: Kevin Oberman Message-ID: <20061127183758.GC865@turion.vk2pj.dyndns.org> References: <200611271353.kARDr6tN034491@lurza.secnetix.de> <20061127164119.E63DB45054@ptavv.es.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EuxKj2iCbKjpUGkD" Content-Disposition: inline In-Reply-To: <20061127164119.E63DB45054@ptavv.es.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: ohartman@mail.zedat.fu-berlin.de, freebsd-stable@freebsd.org Subject: Re: Problems unmounting/fssyncking extern UFS filesystem X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 19:58:28 -0000 --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I realise the original posting was related to amd(8) and NFS is not a normal filesystem but in the interest of trying to stamp out this myth... On Mon, 2006-Nov-27 08:41:19 -0800, Kevin Oberman wrote: >The traditional mantra was >sync >sync >sync =2E.. >That mantra is about 25 years old, so its validity on modern hardware is >questionable, but the need for a delay is very real. For any modern Un*x, it is totally unnecessary. All current Un*x filesystems will automatically flush all buffers as part of the unmount process - specifically, any FS with a 'CLEAN' flag can be guaranteed to do so. > I would suggest something like: sync && sleep 5 In the specific case of softupdates, this is not adequate to flush all outstanding writes. The sync will flush one level of dependencies but can still leave outstanding writes. 'sleep 5' may or may not be adequate, depending on the amount of dirty cached data. As an experiment, I suggest creating or deleting a FS tree on an otherwise idle system and looking at the 'dirtybuf' value reported by 'systat -v 1'. See how many sync's and how long it takes to get it to blank (0). --=20 Peter Jeremy --EuxKj2iCbKjpUGkD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFazCG/opHv/APuIcRAnxpAJ9lVYONYg3gHXO9cF7d3XrjD/M2LgCeJNtM 5csH82Vai+876pP+VFnyq+M= =SGwy -----END PGP SIGNATURE----- --EuxKj2iCbKjpUGkD--