From owner-freebsd-current Sat Jan 23 21:54:19 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA15228 for freebsd-current-outgoing; Sat, 23 Jan 1999 21:54:19 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (castles94.castles.com [208.214.165.94]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA15223 for ; Sat, 23 Jan 1999 21:54:17 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (LOCALHOST [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id VAA00672; Sat, 23 Jan 1999 21:50:35 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199901240550.VAA00672@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: "D. Rock" cc: current@FreeBSD.ORG Subject: Re: dirty fs after apm power off In-reply-to: Your message of "Sat, 23 Jan 1999 22:44:31 +0100." <199901232144.WAA10840@wurzelausix.cs.uni-sb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 23 Jan 1999 21:50:35 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I have noticed this behaviour on at least one machine. > If I shutdown the machine with apm power off, the filesystem is dirty and > has to been checked on the next reboot. It seems, the power is cut too fast. > I don't have any problems with reboots. > It seems the drive doesn't have the time to write the superblock back to disk. > > I simply put a DELAY(4000000) in the apm_power_off() routine and the problem > fades away. > Any thoughts on doing this a configurable option? It doesn't break anything, > it only takes a few seconds longer for the machine to power off. > > The drive is a Maxtor Diamond Max (90432D2) 4GB IDE drive in an Asus SP98 > board. Ok, simple programming project for you. Find a suitable location, and add a SYSCTL node (eg. kern.shutdown.poweroff_delay) and SYSINIT to register an at_shutdown function that delays that long just before the power-off routines are called. Test it, file a PR and gimme the PR number. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message