Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Feb 2002 09:08:47 +0200
From:      Valentin Nechayev <netch@iv.nn.kiev.ua>
To:        Mike Silbersack <silby@silby.com>
Cc:        Matthew Dillon <dillon@apollo.backplane.com>, "David W. Chapman Jr." <dwcjr@inethouston.net>, stable@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/ufs/ffs ffs_softdep.c
Message-ID:  <20020212090847.A3341@iv.nn.kiev.ua>
In-Reply-To: <20020211010801.K8897-100000@patrocles.silby.com>; from silby@silby.com on Mon, Feb 11, 2002 at 01:10:12AM %2B0000
References:  <200202101911.g1AJBOk30917@apollo.backplane.com> <20020211010801.K8897-100000@patrocles.silby.com>

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




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