Flash disks and FFS layout heuristics

Bakul Shah bakul at bitblocks.com
Mon Mar 31 16:18:30 PDT 2008


On Mon, 31 Mar 2008 15:29:38 PDT Alfred Perlstein <alfred at freebsd.org>  wrote:
> * Poul-Henning Kamp <phk at phk.freebsd.dk> [080331 15:24] wrote:
> > In message <20080331222154.C976C5B50 at mail.bitblocks.com>, Bakul Shah writes
> :
> > >On Mon, 31 Mar 2008 13:06:10 PDT Matthew Dillon <dillon at apollo.backplane.c
> 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.


More information about the freebsd-arch mailing list