From owner-freebsd-current@FreeBSD.ORG Sun Mar 30 09:59:30 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0ED0537B40A for ; Sun, 30 Mar 2003 09:59:30 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-131.client.attbi.com [12.233.57.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D9C343FB1 for ; Sun, 30 Mar 2003 09:59:28 -0800 (PST) (envelope-from das@FreeBSD.org) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h2SNquah022168; Fri, 28 Mar 2003 15:52:56 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h2SNqo9X022167; Fri, 28 Mar 2003 15:52:50 -0800 (PST) (envelope-from das@FreeBSD.ORG) Date: Fri, 28 Mar 2003 15:52:50 -0800 From: David Schultz To: Terry Lambert Message-ID: <20030328235250.GA22044@HAL9000.homeunix.com> Mail-Followup-To: Terry Lambert , The Anarcat , current@freebsd.org, Alexander Langer References: <20030324215712.GA844@fump.kawo2.rwth-aachen.de> <3E7FE3CE.ECD2775F@mindspring.com> <20030325110843.GF1700@fump.kawo2.rwth-aachen.de> <3E804392.40844D63@mindspring.com> <20030325161632.GB600@lenny.anarcat.ath.cx> <3E810547.3653FFEA@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E810547.3653FFEA@mindspring.com> cc: current@FreeBSD.org cc: Alexander Langer Subject: Re: [Re: several background fsck panics X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2003 17:59:32 -0000 Thus spake Terry Lambert : > o Put a counter in the first superblock; it would be > incremented when the BG fsck is started, and reset > to zero when it completes. If the counter reaches > 3 (or some command line specified number), then the > BG flagging is ignored, and a full FG fsck is then > performed instead. I like this idea because it will > always work, and it's not actually a hack, it's a > correct solution. I'm glad you like it because AFAIK, it is already implemented. ;-) > o Implement "soft read-only". The place that most of > the complaints are coming from is desktop users, with > relatively quiescent machines. Though swap is used, > it does not occur in an FS partition. As a result, > the FS could be marked "read-only" for long period of > time. This marking would be in memory. The clean bit > would be set on the superblock. When a write occurs, > the clean bit would be reset to "dirty", and committed > to disk prior to the write operation being permitted > to proceed (a stall barrier). I like this idea because, > for the most part, it eliminates fsck, both BG and FG, > on systems that crash while it's in effect. The net > result is a system that is statistically much more > tolerant of failures, but which still requires another > safety net, such as the previous solution. I was thinking of doing something like this myself as part of an ``idle timeout'' for disks. (Marking the filesystem clean after a period of quiescence would actually interfere with ATA disks' built-in mechanism for spinning down after a timeout, which is important for laptops, so the OS would have to track the true amount of idle time.) Annoyingly, I can never get the disk containing /var to remain quiescent for long while cron is running (even without any crontabs), and I hope this can be solved without disabling cron or adding a nontrivial hack to bio.