From owner-freebsd-fs@FreeBSD.ORG Mon Jan 24 14:57:44 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97585106564A for ; Mon, 24 Jan 2011 14:57:44 +0000 (UTC) (envelope-from kpielorz_lst@tdx.co.uk) Received: from mail.tdx.com (mail.tdx.com [62.13.128.18]) by mx1.freebsd.org (Postfix) with ESMTP id 361AB8FC15 for ; Mon, 24 Jan 2011 14:57:43 +0000 (UTC) Received: from HexaDeca64.dmpriest.net.uk (HPQuadro64.dmpriest.net.uk [62.13.130.30]) (authenticated bits=0) by mail.tdx.com (8.14.3/8.14.3/Kp) with ESMTP id p0OEvefD091633 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Mon, 24 Jan 2011 14:57:40 GMT Date: Mon, 24 Jan 2011 14:56:48 +0000 From: Karl Pielorz To: Bruce Cran Message-ID: In-Reply-To: <20110123221651.000037f2@unknown> References: <1ABA88EDF84B6472579216FE@Octa64> <20110122111045.GA59117@icarus.home.lan> <20110122172714.00002274@unknown> <1032CC037935BA2DC2E60A4F@Octa64> <20110123221651.000037f2@unknown> X-Mailer: Mulberry/4.0.8 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: freebsd-fs@freebsd.org Subject: Re: Write cache, is write cache, is write cache? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2011 14:57:44 -0000 --On 23 January 2011 22:16 +0000 Bruce Cran wrote: > You might also find http://brad.livejournal.com/2116715.html > interesting. Ok, the utility provided via the Blog reports zero errors when run from both UFS, and ZFS with the BIOS set to 'Enabled drive write cache: No'. Flip the BIOS to 'Yes' - for UFS, things get messy (as you'd kind of expect) - the file system gets trashed (enough that autoboot / background checking fails), and you can't complete the test because the test file doesn't exist after reboot (side effect of softupdates I'd guess). For ZFS the test still completes - with 'zero errors'. Checking via 'camcontrol' - the BIOS option 'Enabled drive write cache' just seems to affect the 'Write cache enable' features on the drive, i.e. " test# camcontrol identify ada0 | grep -E "(Feature)|(cache)" Feature Support Enabled Value Vendor write cache yes no flush cache yes yes " And with it set to 'Yes' in the BIOS: " test# camcontrol identify ada0 | grep -E "(Feature)|(cache)" Feature Support Enabled Value Vendor write cache yes yes flush cache yes yes " So in a very round-the-houses way, that's all it appears to change... Guess it's nice to have the option. I'd also guess whilst enabling it for ZFS is good, having it enabled for UFS is slightly dangerous (and that by enabling it machine wide you may trash the UFS file systems on that machine if it suffers a catastrophic power outage). -Karl