From owner-freebsd-doc@FreeBSD.ORG Sun May 11 05:40:07 2003 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCACE37B404 for ; Sun, 11 May 2003 05:40:07 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B6DC43FF2 for ; Sun, 11 May 2003 05:40:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h4BCe5Up052978 for ; Sun, 11 May 2003 05:40:05 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h4BCe5Rc052977; Sun, 11 May 2003 05:40:05 -0700 (PDT) Resent-Date: Sun, 11 May 2003 05:40:05 -0700 (PDT) Resent-Message-Id: <200305111240.h4BCe5Rc052977@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "öÎ Àî" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1AD5E37B401 for ; Sun, 11 May 2003 05:33:30 -0700 (PDT) Received: from hotmail.com (f109.law10.hotmail.com [64.4.15.109]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4E1143FAF for ; Sun, 11 May 2003 05:33:29 -0700 (PDT) (envelope-from delphij@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 11 May 2003 05:33:29 -0700 Received: from 61.149.88.153 by lw10fd.law10.hotmail.msn.com with HTTP; Sun, 11 May 2003 12:33:29 GMT Message-Id: Date: Sun, 11 May 2003 20:33:29 +0800 From: "öÎ Àî" To: FreeBSD-gnats-submit@FreeBSD.org cc: delphij@freebsdchina.org Subject: docs/52071: [PATCH] Add more information about soft updates into ata(4) manpage X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 12:40:08 -0000 >Number: 52071 >Category: docs >Synopsis: [PATCH] Add more information about soft updates into ata(4) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun May 11 05:40:05 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Xin LI >Release: FreeBSD 5.1-BETA i386 >Organization: Frontfree Technology Network >Environment: System: FreeBSD beastie.frontfree.net 5.1-BETA FreeBSD 5.1-BETA #53: Wed May 7 05:03:46 CST 2003 root@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386 >Description: In the ata(4) driver on -CURRENT systems, hw.ata.wc is enabled by default. The information supplied with ata(4) only said write cache may cause data loss, but it might be insuffient because: o With tagged queuing, write cache will not break soft updates. o Without tagged queuing, write cache can cause even more data loss if soft updates is enabled. >How-To-Repeat: >Fix: Because the hw.ata.wc is now enabled by default for performance reasons, users who are using ata(4) hard drivers should be warned for the fact that writing cache may break soft updates because it blinds the soft updates code by telling it the data is on stable storage before it really goes to. On systems running critical applications, especially databases, this problem will be severe. In addition, as Dr. McKusick mentioned, on ATA devices, by enabling tagged queueing feature, the confilict between write caching and soft updates will go away. So document this also. This patch also adds two references to: loader(8) and device.hints(5). hw.ata.wc and hw.ata.tags are tunnable in loader(8). I am not sure if this information should be held in BUGS section, so if I was wrong, please change it. Hopefully this patch is useful :P Apply the following patch: --- ata.4.orig Sun May 11 02:04:11 2003 +++ ata.4 Sun May 11 04:11:16 2003 @@ -245,7 +245,9 @@ older devices do not like this. .Sh SEE ALSO .Xr atacontrol 8 , -.Xr burncd 8 +.Xr burncd 8 , +.Xr loader 8 , +.Xr device.hints 5 .Sh HISTORY The .Nm @@ -265,3 +267,21 @@ and .An S\(/oren Schmidt .Aq sos@FreeBSD.org . +.Sh BUGS +By default the hw.ata.wc is enabled while hw.ata.tags disabled. +Enabling write cache without tagged queuing is even more risky on +soft updates enabled file systems, because doing so will cause your +hardware to tell soft updates code that data was written on disk +once they are acquired to write cache on drives, rather than when it +really goes to the stable storage. This is unexpected and tend to +cause more data loss across system crashes. + +However, disabling write cache will dramatically decrease disk +performance so it is now enabled by default. If your data is *very* +important, please consider either enable tagged queuing support by +setting hw.ata.tags to 1, or disable write cache by setting hw.ata.wc +to 0. Currently, tagged queuing feature is only supported by IBM DPTA, +DTLA, ICxxxxxxAT, ICxxxxxxAV drives, so you may want to disable +hw.ata.wc to work around the problem on older hardware. This may be +accomplished by adding an item in +.Xr device.hints 5 . _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus >Release-Note: >Audit-Trail: >Unformatted: >manpage