From owner-freebsd-arch@FreeBSD.ORG Mon Mar 31 22:38:47 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6F401065671; Mon, 31 Mar 2008 22:38:47 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (mail.bitblocks.com [64.142.15.60]) by mx1.freebsd.org (Postfix) with ESMTP id AD7E08FC19; Mon, 31 Mar 2008 22:38:47 +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 CFD975BAE; Mon, 31 Mar 2008 15:38:46 -0700 (PDT) To: "Poul-Henning Kamp" In-reply-to: Your message of "Mon, 31 Mar 2008 22:23:37 -0000." <26080.1207002217@critter.freebsd.dk> Date: Mon, 31 Mar 2008 15:38:46 -0700 From: Bakul Shah Message-Id: <20080331223846.CFD975BAE@mail.bitblocks.com> Cc: Christopher Arnold , Martin Fouts , arch@freebsd.org, qpadla@gmail.com, freebsd-arch@freebsd.org 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 22:38:47 -0000 On Mon, 31 Mar 2008 22:23:37 -0000 "Poul-Henning Kamp" wrote: > In message <20080331222154.C976C5B50@mail.bitblocks.com>, Bakul Shah writes: > >On Mon, 31 Mar 2008 13:06:10 PDT Matthew Dillon > 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 of > it) > >> in order to build an index of the filesystem topology in system memory > ? > > > >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. [Poul, use positive encouragement and you'd inspire a lot more people!] Note that in effect this is exactly what zfs does. Update of any block implies finding a new place for the updated copy, which means the block pointing to it must be also updated, which means a new place for it etc. etc. But hey, I spent just a few minutes sketching out the idea so it is possible I missed a whole bunch of things! If I was actually implementing this (which I am tempted to...) I'd certainly want to know what others did. One thing I forgot to add: I'd let the lower level handle bad block forwarding and wear levelling (like on the m-tron device).