From owner-freebsd-stable Thu Feb 21 11: 8:39 2002 Delivered-To: freebsd-stable@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 1A7E837B400 for ; Thu, 21 Feb 2002 11:08:32 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g1LJ8UK98232; Thu, 21 Feb 2002 11:08:30 -0800 (PST) (envelope-from dillon) Date: Thu, 21 Feb 2002 11:08:30 -0800 (PST) From: Matthew Dillon Message-Id: <200202211908.g1LJ8UK98232@apollo.backplane.com> To: Kirk McKusick Cc: Mike Silbersack , Valentin Nechayev , "David W. Chapman Jr." , stable@FreeBSD.ORG Subject: Re: Softupdates failure during buffer syncing at shutdown (was Re: cvs commit: src/sys/ufs/ffs ffs_softdep.c) References: <200202211243.g1LChpi21455@beastie.mckusick.com> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Great! Thanks for tracking this down for us, Kirk, it would have taken me a lot longer. I don't want to mess around with the sysdaemon shutdown code so what I have done is incorporated the io_sync call into the shutdown code. Considering the potential complexity in softupdates I wait until normal flushing is as done as it is going to get (just in case softupdate's sync crashes or panics) and then I call bioops.io_sync in the remaining loop iterations. I have tested it and it works like a charm! I now get: syncing disks... 110 21 16 14 13 12 11 11 11 11 11 11 11 done And, bang, on the 6th iteration after it can't sync any more it calls io_sync and its happy. This will be going into -current today and -stable in three days. Index: kern/kern_shutdown.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_shutdown.c,v retrieving revision 1.72.2.11 diff -u -r1.72.2.11 kern_shutdown.c --- kern/kern_shutdown.c 4 Feb 2002 13:09:24 -0000 1.72.2.11 +++ kern/kern_shutdown.c 21 Feb 2002 18:52:03 -0000 @@ -257,6 +257,8 @@ if (nbusy < pbusy) iter = 0; pbusy = nbusy; + if (iter > 5 && bioops.io_sync) + (*bioops.io_sync)(NULL); sync(&proc0, NULL); DELAY(50000 * iter); } -Matt Matthew Dillon :I have had an opportunity to log into test1.backplane.com to look :at the problem (thanks to the wireless network at the conference :here in Helsinki :-) The buffers that are being held locked :contain the indirect block pointers for files that are to be :... :syncer daemon has been stopped. They will be used and freed :if the syncer daemon is permitted to run. I am not sure what :... : /* : * Do soft update processing. : */ : if (bioops.io_sync) : (*bioops.io_sync)(NULL); : :This call needs to be done after all the other buffers have been :written as the writes of some of the other buffers cause the :deletes related to these buffers to be put on the soft updates :... : Kirk McKusick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message