From owner-freebsd-arch Thu Apr 5 16:53:17 2001 Delivered-To: freebsd-arch@freebsd.org Received: from Awfulhak.org (awfulhak.demon.co.uk [194.222.196.252]) by hub.freebsd.org (Postfix) with ESMTP id 1350A37B43C for ; Thu, 5 Apr 2001 16:53:13 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.3/8.11.3) with ESMTP id f35NqSU12607; Fri, 6 Apr 2001 00:52:44 +0100 (BST) (envelope-from brian@lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.3/8.11.3) with ESMTP id f35NqOP02879; Fri, 6 Apr 2001 00:52:24 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200104052352.f35NqOP02879@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: freebsd-arch@FreeBSD.org Cc: mckusick@mckusick.com, Brian Somers Subject: A soft-updates optimisation ? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 06 Apr 2001 00:52:24 +0100 From: Brian Somers Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I was thinking about soft-updates a bit today and an irritating problem that I (and I assume others) am seeing. If I'm doing a build of some sort (probably make world) and I lose my machine for whatever reason, the machine almost always comes back up with either a binary or object of zero length. I guess the reason is because the write queue looks something like this (from a simplistic point of view): o Create inode with 0 size o Allocate bitmaps o Do a [clustered] write o Update the inode size and times o Repeat previous 3 steps lots of times and the optimiser must be optimising-out all of the inode updates except for the last one. *Assuming* that this is what's happening (to be honest, I haven't looked at the code), wouldn't it be infinitely better if the first step (inode creation) could be delayed 'till the end and merged with that final update ? For build scenarios, this would change the FS behaviour so that the file is either all there or not there. A ``make -DNOCLEAN buildworld'' would pick up where the previous one left off. Comments ? -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message