From owner-cvs-all@FreeBSD.ORG Wed Aug 11 22:52:23 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AEB6516A4CE; Wed, 11 Aug 2004 22:52:23 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B4B443D54; Wed, 11 Aug 2004 22:52:23 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.11/8.12.11) with ESMTP id i7BMqELT018444; Wed, 11 Aug 2004 15:52:18 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200408112252.i7BMqELT018444@gw.catspoiler.org> Date: Wed, 11 Aug 2004 15:52:14 -0700 (PDT) From: Don Lewis To: nate@root.org In-Reply-To: <411A4B4F.6070007@root.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_shutdown.c vfs_subr.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Aug 2004 22:52:23 -0000 On 11 Aug, Nate Lawson wrote: > Don Lewis wrote: >> On 10 Aug, Nate Lawson wrote: >> >>>njl 2004-08-10 01:32:05 UTC >>> >>> FreeBSD src repository >>> >>> Modified files: >>> sys/kern kern_shutdown.c vfs_subr.c >>> Log: >>> Skip the syncing disks loop if there are no dirty buffers. Remove a >>> variable used to flag the initial printf. >>> >>> Submitted by: truckman (earlier version) >>> >>> Revision Changes Path >>> 1.162 +13 -5 src/sys/kern/kern_shutdown.c >>> 1.519 +1 -1 src/sys/kern/vfs_subr.c >> >> >> BDE had a number of objections to this patch. This is the alternative >> that I came up with: > > Feel free to rework/commit it. I think your patch is a little rough > still but generally think it's a good idea to reuse the check for nbufs. I wasn't terribly happy with three slightly different copies of the code to compute nbufs and neither was BDE. He also wanted sync() to be called even if no buffers were initially busy, because sync() itself can dirty some buffers. BDE also claimed that kernel printf() messages should not be sentences and should not begin with a capital letter. This doesn't seem to be documented anywhere, and we're hardly consistent in terms of the latter, but I changed this anyway. I tossed in the printf("\n") because I used VT2xx terminals as serial consoles for many years, and they always seemed to get set to line-wrapping disabled mode. I didn't want the "giving up" or "final sync complete" messages to get lost because the outer loop went through an arbitrarily large number of iterations. I just now noticed that the "normal" case is a bit too verbose, so I just tossed a if (!first_buf_printf) before the printf("final sync complete\n"); I'm open to any reasonable suggestions on how to decorate this particular bikeshed before I do the commit.