From owner-freebsd-fs@FreeBSD.ORG Fri Jul 28 09:27:55 2006 Return-Path: X-Original-To: freebsd-fs@FreeBSD.ORG Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 050C016A4E0 for ; Fri, 28 Jul 2006 09:27:55 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3019D43D46 for ; Fri, 28 Jul 2006 09:27:53 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (fezkly@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k6S9RR2J072246; Fri, 28 Jul 2006 11:27:32 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k6S9RG2B072245; Fri, 28 Jul 2006 11:27:16 +0200 (CEST) (envelope-from olli) Date: Fri, 28 Jul 2006 11:27:16 +0200 (CEST) Message-Id: <200607280927.k6S9RG2B072245@lurza.secnetix.de> From: Oliver Fromme To: freebsd-fs@FreeBSD.ORG, rick-freebsd@kiwi-computer.com In-Reply-To: <20060727175436.GA48057@megan.kiwi-computer.com> X-Newsgroups: list.freebsd-fs User-Agent: tin/1.8.0-20051224 ("Ronay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Fri, 28 Jul 2006 11:27:47 +0200 (CEST) Cc: Subject: Re: Advice for hacking on ufs/ffs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-fs@FreeBSD.ORG, rick-freebsd@kiwi-computer.com List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2006 09:27:55 -0000 Rick C. Petty wrote: > Dag-Erling Smørgrav wrote: > > Rick C. Petty wrote: > > > Shane Adams wrote: > > > > I used dd to create 1G file. > > > A faster way is: > > > touch filename > > > truncate -s 1g filename > > > > no, this will result in a fragmented image, which will hurt run-time > > performance. Indeed. > Not necessarily. If you install a variant of windoze, the installer will > format the disk first, writing zeros (and metadata) sequentially, and > thus the allocation will not be fragmented. Not true. Last time I installed Windows, it did not overwrite the whole disk. If it did that, it would have taken _way_ too long (hours instead of minutes). > In the case of UFS newfs > only the metadata will be written for each cylinder group No. Only the superblock copies and block bitmaps are written during newfs, nothing else. > and thus the > logical blocks for all metadata will be contiguous. Nope. As soon as you start writing to such a file system, it will start allocating space for inodes, indirect block lists, directories and file data, which will probably lead to massive fragmentation. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. With Perl you can manipulate text, interact with programs, talk over networks, drive Web pages, perform arbitrary precision arithmetic, and write programs that look like Snoopy swearing.