From owner-freebsd-stable@FreeBSD.ORG Tue Nov 28 19:38:05 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 F1F4716A494 for ; Tue, 28 Nov 2006 19:38:05 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0C3943CF7 for ; Tue, 28 Nov 2006 19:37:42 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin05-en2 [10.13.10.150]) by smtpout.mac.com (Xserve/8.12.11/smtpout05/MantshX 4.0) with ESMTP id kASJb4qX027140; Tue, 28 Nov 2006 11:37:04 -0800 (PST) Received: from [17.214.13.96] (a17-214-13-96.apple.com [17.214.13.96]) (authenticated bits=0) by mac.com (Xserve/smtpin05/MantshX 4.0) with ESMTP id kASJaqnx017641; Tue, 28 Nov 2006 11:37:02 -0800 (PST) In-Reply-To: <20061127164119.E63DB45054@ptavv.es.net> References: <20061127164119.E63DB45054@ptavv.es.net> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Tue, 28 Nov 2006 11:36:52 -0800 To: Kevin Oberman X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: FreeBSD Stable 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: Tue, 28 Nov 2006 19:38:06 -0000 On Nov 27, 2006, at 8:41 AM, Kevin Oberman wrote: >> As far as I know, that's not different from calling "sync" >> just once. It might make more sense to put a little sleep >> between the sync calls, though. > > The traditional mantra was > sync > sync > sync > and not sync;sync;sync. The reason was timing. By entering the sync > command three times as fast as anyone could type, the sync could > reliably complete. Agreed. Although I've heard rumors that some systems treated 3 syncs as some sort of special case, but I've never seen anything in code to support the notion. > That mantra is about 25 years old, so its validity on modern > hardware is > questionable, but the need for a delay is very real. I would suggest > something like: sync && sleep 5 The other choice would be to make sync [or the sync(2) system call, more precisely] blocking, so that it does not return until the buffer cache has been flushed and all dirty pages in VM have been written to disk. -- -Chuck