From owner-freebsd-arch Fri Mar 30 10:32:44 2001 Delivered-To: freebsd-arch@freebsd.org Received: from beastie.mckusick.com (beastie.mckusick.com [209.31.233.184]) by hub.freebsd.org (Postfix) with ESMTP id 1AE1937B71A; Fri, 30 Mar 2001 10:32:42 -0800 (PST) (envelope-from mckusick@mckusick.com) Received: from beastie.mckusick.com (localhost [127.0.0.1]) by beastie.mckusick.com (8.9.3/8.9.3) with ESMTP id KAA10132; Fri, 30 Mar 2001 10:32:41 -0800 (PST) (envelope-from mckusick@beastie.mckusick.com) Message-Id: <200103301832.KAA10132@beastie.mckusick.com> To: Robert Watson Subject: Re: Background Fsck Cc: arch@freebsd.org In-Reply-To: Your message of "Fri, 30 Mar 2001 09:05:10 EST." Date: Fri, 30 Mar 2001 10:32:41 -0800 From: Kirk McKusick Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Date: Fri, 30 Mar 2001 09:05:10 -0500 (EST) From: Robert Watson To: Kirk McKusick cc: arch@freebsd.org Subject: Re: Background Fsck Kirk, I haven't had a chance to look at the tunefs source lately, but quick question: does tunefs block the setting of the soft updates flag on a dirty file system? It seems to me that, if it doesn't, a possible nasty sequence of events is: system does unclean shutdown without soft updates, administrator (possibly not realizing this) boots to single-user mode, and sets soft updates, then attempts to enter multi-user mode, where fsck says "ah, soft updates, doesn't matter if it's unclean, let's background fsck". Shortly thereafter, an inconsistency is discovered and the system panics. As such, tunefs should only allow the setting of soft updates on a file system marked clean. It may already do this, but figured I should ask. Thanks! Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services Your observation is absolutely correct. I have modified tunefs exactly as you suggest and will be checking in that change as part of my next set of updates which enable background fsck. I will also note in passing that this is yet another reason why the setting of soft updates needs to be done in newfs and/or tunefs and not as an option in /etc/fstab. Kirk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message