From owner-freebsd-current@FreeBSD.ORG Sun Jan 10 15:27:43 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA588106566B; Sun, 10 Jan 2010 15:27:43 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 73A9E8FC0A; Sun, 10 Jan 2010 15:27:43 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id o0AFRd7h064668; Sun, 10 Jan 2010 08:27:39 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Scott Long In-Reply-To: Date: Sun, 10 Jan 2010 08:27:39 -0700 Content-Transfer-Encoding: 7bit Message-Id: <83031A5C-87E5-4052-A4C7-6108FD5E2F36@samsco.org> References: <4B4851FE.2020907@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1076) X-Spam-Status: No, score=-13.0 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: FreeBSD-Current List , Jeff Roberson Subject: Re: Help test softupdates journaling (SUJ) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 15:27:43 -0000 On Jan 9, 2010, at 3:12 AM, Jeff Roberson wrote: > On Sat, 9 Jan 2010, Alexander Motin wrote: > >> Hi. >> >> Jeff Roberson wrote: >>> I have been augmenting softupdates with a small journal that will be >>> processed in lieu of fsck in the event of a crash. I have written >>> some >>> about this project here: http://jeffr_tech.livejournal.com/ >> >> Sounds cool, but I have one question. Excuse my possible ignorance. >> >> I was looking for BIO_FLUSH consumers and haven't found UFS there. >> Unbacked write caching probably can make SoftUpdates unreliable, >> but it >> is bearable while foreground fsck is used. As I understand, journaled >> recovery is more dependent on data coherency, and so needs either >> unbacked write caching to be disabled, or BIO_FLUSH to be used in >> respective points by FS code. Am I right? So what's about BIO_FLUSH? > > Softupdates definitely relies on proper disk ordering. People who > want reliability in the face of power failure need to buy nice disks > and buy battery backup systems. Many cheap disks lie about flush > and this has bitten ZFS. SU+J will still work with foreground fsck > if you want to be absolutely certain of your data in the event of a > power outage. > > It would be possible to implement a flush barrier in between writing > the journal and permitting the meta-data modifications, and again > after metadata modifications and before journal free. SU+J would be > more tolerant to out of order filesystem operations following the > journal write than vanilla softupdates. However, I'm not sure how > much it will help, and it is not part of my current plans. It is > probably worthwhile to study further. > The write barrier here probably doesn't need to be as heavy-weight as the cache-flush that BIO_FLUSH tries to do. For devices that implement ordered tags (i.e. SCSI and SAS, not SATA), a barrier op would be preferable. This has been the source of recent arguments that I don't want to re-open on this discussion, but please let me know in private if you'd like to discuss it. Scott