UBIFS in-place vs out-of-place GC

Russ Dill russ.dill at gmail.com
Wed Sep 1 12:08:49 EDT 2010


I'm doing a bit of research on UBIFS and something I read from a few
sources has me confused regarding garbage collection:

http://osl.sed.hu/~havasi/ubifs/#gc

>> Out-place mode:
>>
>> This mode deletes the active nodes from the tree and inserts them
>> again into a new location. Because of the wandering algorithm it
>> makes dirty nodes as well. After garbage collection, it can be
>> possible that an erase block has more dirty space created than freed
>> up.In-place mode:
>>
>> This method copies the active nodes into an empty erase block
>> and creates a displacement table to its beginning. Afterwards, it
>> logically swaps these two erase blocks, so the active nodes will
>> be accessible at the same place as before, thus modifying other
>> parts of the tree is not necessary. A big advantage of this method
>> is that it can convert all dirty space in the erase block to free space.
>> Its disadvantage is that it can cause fragmentation.
>>
>> The default GC mode of the UBIFS is in-place mode and it will
>> use a heuristic method to detect fragmentation and call out-place
>> mode.

Looking at the source, I can find the code that does the out of place
updates, but I can't find any references to in place updates or
displacement tables. What gives?



More information about the linux-mtd mailing list