From owner-freebsd-fs@FreeBSD.ORG Thu May 12 14:08:06 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 B069B106564A for ; Thu, 12 May 2011 14:08:06 +0000 (UTC) (envelope-from bfriesen@simple.dallas.tx.us) Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74]) by mx1.freebsd.org (Postfix) with ESMTP id 770D18FC13 for ; Thu, 12 May 2011 14:08:06 +0000 (UTC) Received: from freddy.simplesystems.org (freddy.simplesystems.org [65.66.246.65]) by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id p4CE85uW015763; Thu, 12 May 2011 09:08:05 -0500 (CDT) Date: Thu, 12 May 2011 09:08:05 -0500 (CDT) From: Bob Friesenhahn X-X-Sender: bfriesen@freddy.simplesystems.org To: Jeremy Chadwick In-Reply-To: <20110512083429.GA58841@icarus.home.lan> Message-ID: References: <4DCA5620.1030203@dannysplace.net> <4DCB455C.4020805@dannysplace.net> <20110512033626.GA52047@icarus.home.lan> <4DCB7F22.4060008@digsys.bg> <20110512083429.GA58841@icarus.home.lan> User-Agent: Alpine 2.01 (GSO 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (blade.simplesystems.org [65.66.246.90]); Thu, 12 May 2011 09:08:05 -0500 (CDT) Cc: freebsd-fs@freebsd.org Subject: Re: ZFS: How to enable cache and logs. 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: Thu, 12 May 2011 14:08:06 -0000 On Thu, 12 May 2011, Jeremy Chadwick wrote: > > What guarantee is there that the intent log -- which is written to the > disk -- actually got written to the disk in the middle of a power > failure? There's a lot of focus there on the idea that "the intent log > will fix everything, but may lose writes", but what guarantee do I have > that the intent log isn't corrupt or botched during a power failure? This is pretty easy. Zfs requests that the disk containing the intent log commit its update (and waits for completion) before it returns from the "write" request. As long as the disk does not lie, the data will be present after the reboot. Note that many SSDs do lie about cache commit requests and these are best avoided for anything to do with zfs. Bob -- Bob Friesenhahn bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/