From owner-freebsd-stable@FreeBSD.ORG Tue Jun 21 12:49:42 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 099A816A41C; Tue, 21 Jun 2005 12:49:42 +0000 (GMT) (envelope-from root@r2d2.multiplay.co.uk) Received: from r2d2.multiplay.co.uk (host7.iclon.multiplay.co.uk [212.135.219.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93A5F43D1D; Tue, 21 Jun 2005 12:49:41 +0000 (GMT) (envelope-from root@r2d2.multiplay.co.uk) Received: from r2d2.multiplay.co.uk (localhost [127.0.0.1]) by r2d2.multiplay.co.uk (8.13.3/8.13.3) with ESMTP id j5LDomZ5000650; Tue, 21 Jun 2005 13:50:48 GMT (envelope-from root@r2d2.multiplay.co.uk) Received: (from root@localhost) by r2d2.multiplay.co.uk (8.13.3/8.13.3/Submit) id j5LDomF4000649; Tue, 21 Jun 2005 13:50:48 GMT (envelope-from root) Date: Tue, 21 Jun 2005 13:50:48 GMT Message-Id: <200506211350.j5LDomF4000649@r2d2.multiplay.co.uk> To: FreeBSD-gnats-submit@freebsd.org From: Steven Hartland X-send-pr-version: 3.113 X-GNATS-Notify: Cc: freebsd-stable-list Subject: hptmv ( Highpoint RocketRaid 1820a ) corrupts fs on shutdown -p X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Steven Hartland List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2005 12:49:42 -0000 >Submitter-Id: current-users >Originator: Steven Hartland >Organization: Multiplay >Confidential: no >Synopsis: hptmv ( Highpoint RocketRaid 1820a ) corrupts fs on shutdown -p >Severity: serious >Priority: high >Category: kern >Class: sw-bug >Release: FreeBSD 5.4-RELEASE-p2 i386 >Environment: System: FreeBSD r2d2.multiplay.co.uk 5.4-RELEASE-p2 FreeBSD 5.4-RELEASE-p2 #5: Tue Jun 21 13:29:02 UTC 2005 root@r2d2.multiplay.co.uk:/.usr/i386/src/sys/i386/compile/MPUK_SMP_200HZ i386 >Description: When shutting down with power off e.g. shutdown -p now a machine with a Highpoint RocketRaid 1820a ( more than likely the 1820 as well ) corrupts the FS bad enough to force recorvery in single user mode. The problem occurs because the disk flush is async and no time is given for this to happen. >How-To-Repeat: Shutdown a box with a hptmv based controller with power off. >Fix: Apply the following patch which adds a 5 second delay after calling flush. Note: the fix is only relavent for i386 as there is no source for amd64, which is also affected. I've informed Highpoint of the issue but as yet no updated driver has been released. --- entry.c.orig Tue Jun 21 13:23:05 2005 +++ entry.c Tue Jun 21 13:27:38 2005 @@ -2157,6 +2157,10 @@ return (EINVAL); - EVENTHANDLER_DEREGISTER(shutdown_final, pAdapter->eh); FlushAdapter(pAdapter); + + /* give the flush some time to happen */ + DELAY( 1000 * 1000 * 5 ); + + EVENTHANDLER_DEREGISTER(shutdown_final, pAdapter->eh); return 0;