From owner-freebsd-arch@FreeBSD.ORG Mon Mar 31 23:18:30 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 127CF106566C; Mon, 31 Mar 2008 23:18:30 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (bitblocks.com [64.142.15.60]) by mx1.freebsd.org (Postfix) with ESMTP id C4A498FC27; Mon, 31 Mar 2008 23:18:29 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost.bitblocks.com [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 26D865B50; Mon, 31 Mar 2008 16:18:29 -0700 (PDT) To: Alfred Perlstein In-reply-to: Your message of "Mon, 31 Mar 2008 15:29:38 PDT." <20080331222938.GS95731@elvis.mu.org> Date: Mon, 31 Mar 2008 16:18:29 -0700 From: Bakul Shah Message-Id: <20080331231829.26D865B50@mail.bitblocks.com> Cc: Christopher Arnold , arch@freebsd.org, Poul-Henning Kamp , qpadla@gmail.com, Martin Fouts Subject: Re: Flash disks and FFS layout heuristics X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2008 23:18:30 -0000 On Mon, 31 Mar 2008 15:29:38 PDT Alfred Perlstein wrote: > * Poul-Henning Kamp [080331 15:24] wrote: > > In message <20080331222154.C976C5B50@mail.bitblocks.com>, Bakul Shah writes > : > > >On Mon, 31 Mar 2008 13:06:10 PDT Matthew Dillon om> wrote: > > >> But how do you index that information? You can't simply append the > > >> information to the NAND unless you also have a way to access it. So > > >> does the filesystem have to scan the NAND (or significant portions o > f it) > > >> in order to build an index of the filesystem topology in system memo > ry? > > > > > >One possible way: > > > > > >I'd design the system so that each update ends with the write > > >of a root block[1]. > > > > This is sort of the approach Margo Seltzer used for her (Kludge-)LFS > > it has many drawbacks, in particular when it comes to recovery. > > Can you explain why? > > I could see it being a problem because recovering the filesystem's > most recent change might require significant scanning? Let us take the mtron MSD-SATA3025-032 device for example. It has a capacity of 32GB + can do 16,000 random & 78,000 sequential reads per second (of 512 byte blocks). If you write a root block every megabyte, you have 2^15 potential root blocks. Locating the latest one will require 16 random reads + a scan of at most 1MB; which translates to about 26ms. Not too bad since this cost is incurred only on the first mount or reboot.