Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Aug 2004 01:32:48 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        njl@FreeBSD.org
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_shutdown.c vfs_subr.c
Message-ID:  <200408100832.i7A8WmG4013169@gw.catspoiler.org>
In-Reply-To: <200408100132.i7A1W5D0088677@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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
 			 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408100832.i7A8WmG4013169>