From owner-cvs-all@FreeBSD.ORG Tue Aug 10 08:32:57 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 E3B0A16A4CE; Tue, 10 Aug 2004 08:32:57 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97F3943D39; Tue, 10 Aug 2004 08:32:57 +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 i7A8WmG4013169; Tue, 10 Aug 2004 01:32:52 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200408100832.i7A8WmG4013169@gw.catspoiler.org> Date: Tue, 10 Aug 2004 01:32:48 -0700 (PDT) From: Don Lewis To: njl@FreeBSD.org In-Reply-To: <200408100132.i7A1W5D0088677@repoman.freebsd.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: Tue, 10 Aug 2004 08:32:58 -0000 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: Index: kern_shutdown.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_shutdown.c,v retrieving revision 1.161 diff -u -r1.161 kern_shutdown.c --- kern_shutdown.c 30 Jul 2004 01:30:05 -0000 1.161 +++ kern_shutdown.c 31 Jul 2004 06:40:59 -0000 @@ -303,8 +303,11 @@ nbusy++; } } - if (nbusy == 0) + if (nbusy == 0) { + if (first_buf_printf) + printf("no buffers busy"); break; + } if (first_buf_printf) { printf("syncing disks, buffers remaining... "); first_buf_printf = 0; @@ -338,7 +341,7 @@ PICKUP_GIANT(); #endif } - + printf("\n"); /* * Count only busy local buffers to prevent forcing * a fsck if we're just a client of a wedged NFS server @@ -370,6 +373,7 @@ printf("giving up on %d buffers\n", nbusy); DELAY(5000000); /* 5 seconds */ } else { + printf("final sync complete\n"); /* * Unmount filesystems */