From owner-freebsd-stable@FreeBSD.ORG Thu Jul 14 20:25:04 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 BD71316A41C; Thu, 14 Jul 2005 20:25:04 +0000 (GMT) (envelope-from mkb@mkbuelow.net) Received: from luzifer.incubus.de (incubus.de [80.237.207.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DE0343D45; Thu, 14 Jul 2005 20:25:04 +0000 (GMT) (envelope-from mkb@mkbuelow.net) Received: from drjekyll.mkbuelow.net (p54AA90CE.dip0.t-ipconnect.de [84.170.144.206]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by luzifer.incubus.de (Postfix) with ESMTP id B9DB932899; Thu, 14 Jul 2005 22:27:55 +0200 (CEST) Received: from drjekyll.mkbuelow.net (mkb@localhost.mkbuelow.net [127.0.0.1]) by drjekyll.mkbuelow.net (8.13.3/8.13.3) with ESMTP id j6EKPCBT024317; Thu, 14 Jul 2005 22:25:13 +0200 (CEST) (envelope-from mkb@drjekyll.mkbuelow.net) Received: (from mkb@localhost) by drjekyll.mkbuelow.net (8.13.3/8.13.3/Submit) id j6EKPABq024316; Thu, 14 Jul 2005 22:25:10 +0200 (CEST) (envelope-from mkb) Date: Thu, 14 Jul 2005 22:25:09 +0200 From: Matthias Buelow To: David Sze Message-ID: <20050714202509.GB23666@drjekyll.mkbuelow.net> References: <42D6B117.5080302@plab.ku.dk> <20050714191449.A8A615D07@ptavv.es.net> <20050714195253.GA23666@drjekyll.mkbuelow.net> <20050714201236.GA15856@mail.distrust.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050714201236.GA15856@mail.distrust.net> User-Agent: Mutt/1.4.2.1i Cc: freebsd-stable@freebsd.org, freebsd-questions@freebsd.org Subject: Re: dangerous situation with shutdown process X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2005 20:25:04 -0000 David Sze wrote: >> Until a journalled fs that uses write request barriers is available >> for FreeBSD, you better had a reliable UPS. > >How do OS-level request barriers help if the disk reorders pending >writes in its cache? By separating journal updates from the corresponding metadata (and/or data) actions, and by guaranteeing (by flushing the cache, or a singular disabling/enabling of the wb cache at the barrier) that the journal is updated on disk before the actions take place. This imposes an ordering on the journal vs. action requests, which is what a journalled fs needs for filesystem integrity. It doesn't really matter if the disk reorders writes within those two blocks, the only thing that really matters is that the journal update is completed before metadata (or data) updates take place. With softupdates, as far as I understand, that doesn't work, because there is no journal. All requests must be in the order that softupdates decrees. You'd have to issue a barrier request after every write request, which would be equivalent to disabling the wb cache. mkb.