Spare blocks

The spare_blocks attribute indicates how many blocks should be left as spare. A value of 0 implies a "read/write" (or "write-once") flash filesystem, whereas a value greater than 0 implies a "read/write/reclaim" filesystem.

The default is 1, but the number of spare blocks you'll need depends on the amount of writing you'll do. You should specify an odd number of spare blocks, usually 1 or 3.

The filesystem doesn't use a spare block until it's time to perform a reclaim operation. A nonspare block is then selected for "reclamation", and the data contained in that block is coalesced into one contiguous region in the spare block. The nonspare block is then erased and becomes the new spare block. The former spare block takes the place of the reclaimed block.

Note: If you don't set aside at least one spare block (i.e. the spare_blocks attribute is 0), then the flash filesystem driver won't be able to reclaim space — it won't have any place to put the new copy of the data. The filesystem will eventually fill up since there's no way to reclaim space.