From owner-freebsd-stable Mon Feb 11 23:49:27 2002 Delivered-To: freebsd-stable@freebsd.org Received: from sivka.carrier.kiev.ua (sivka.carrier.kiev.ua [193.193.193.101]) by hub.freebsd.org (Postfix) with ESMTP id 10FAC37B687 for ; Mon, 11 Feb 2002 23:48:27 -0800 (PST) Received: from segfault.kiev.ua (segfault.kiev.ua [193.193.193.4]) by sivka.carrier.kiev.ua (8/Kilkenny_is_better) with ESMTP id JEM63916 for ; Tue, 12 Feb 2002 09:11:38 +0200 (EET) (envelope-from netch@iv.nn.kiev.ua) Received: (from uucp@localhost) by segfault.kiev.ua (8) with UUCP id JDW34458; Tue, 12 Feb 2002 09:10:03 +0200 (EET) (envelope-from netch@iv.nn.kiev.ua) Received: (from netch@localhost) by iv.nn.kiev.ua (8.11.6/8.11.6) id g1C78l103533; Tue, 12 Feb 2002 09:08:47 +0200 (EET) (envelope-from netch) Date: Tue, 12 Feb 2002 09:08:47 +0200 From: Valentin Nechayev To: Mike Silbersack Cc: Matthew Dillon , "David W. Chapman Jr." , stable@FreeBSD.ORG Subject: Re: cvs commit: src/sys/ufs/ffs ffs_softdep.c Message-ID: <20020212090847.A3341@iv.nn.kiev.ua> References: <200202101911.g1AJBOk30917@apollo.backplane.com> <20020211010801.K8897-100000@patrocles.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020211010801.K8897-100000@patrocles.silby.com>; from silby@silby.com on Mon, Feb 11, 2002 at 01:10:12AM +0000 X-42: On Organization: Dark side of coredump 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 Mon, Feb 11, 2002 at 01:10:12, silby (Mike Silbersack) wrote about "Re: cvs commit: src/sys/ufs/ffs ffs_softdep.c": > I was seeing the problem by just making a kernel (just a few files > changed with no config or clean steps), installing the kernel, and doing a > shutdown -r now. So, only a few files were active at most. The system in > question only has a /, /usr, and /var partition, if that matters. Only > /usr was mounted softupdates. Really, I saw such problem a few times in -CURRENT. The last occurence was somehow tragicomic: after executing a script shown below (moving from 5.0-current to 4-stable on the same box and the same disks), the system failed to sync and unmount fs'es, and after reboot it booted without /bin, /usr/bin, /etc and some other directories. After fsck, they appeared in /lost+found. (On this host, all system lays in /, /usr is on /, /var is separated and includes /usr/obj, /usr/src, /usr/ports and some others.) One can agree that the script performs quite few operations and it is easy to sync them quickly. I think the bug history is longer that supposed, and some explicit checks should be added. OTOH it is very strange that softupdates code doesn't react on sync(). At least, IMO, sync() should stimulate softupdates code to flush more quickly. As a variant, old ("asynchronous") Unix sync() behavior can be restored when sync() stimulates flushing, but doesn't return while previous flushing is in progress. ==={{{ #!/bin/sh PATH=/bin4:/bin5:/sbin4:/sbin5:"$PATH" TFROM=5 TTO=4 export PATH if [ -d /bin -a -d /bin4 -a ! -d /bin5 ]; then mv /bin /bin5 || exit 1 mv /bin4 /bin || exit 1 fi if [ -d /bin5 -a -d /bin4 -a ! -d /bin ]; then mv /bin4 /bin || exit 1 fi for DIR in /boot /bin /sbin /etc \ /usr/bin /usr/sbin /usr/lib /usr/libdata /usr/libexec /usr/share \ /usr/games \ /var/local /var/db do if [ -d ${DIR} -a -d ${DIR}"$TTO" -a ! -d ${DIR}"$TFROM" ]; then mv ${DIR} ${DIR}"$TFROM" || exit 1 mv ${DIR}"$TTO" ${DIR} || exit 1 fi if [ -d ${DIR}"$TFROM" -a -d ${DIR}"$TTO" -a ! -d ${DIR} ]; then mv ${DIR}"$TTO" ${DIR} || exit 1 fi done ===}}} /netch To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message